ArticlePDF Available

ALAS: agent-oriented domain-specific language for the development of intelligent distributed non-axiomatic reasoning agents

Authors:

Abstract and Figures

This paper presents an extension of the agent-oriented domain-specific language ALAS to support Distributed Non-Axiomatic Reasoning. ALAS is intended for the development of specific kind of intelligent agents. It is designed to support the Siebog Multi-Agent System (MAS) and implementation of the Siebog intelligent agents. Siebog is a distributed MAS based on the modern web and enterprise standards. Siebog offers support to reasoning based on the Distributed Non-Axiomatic Reasoning System (DNARS). DNARS is a reasoning system based on the Non-Axiomatic Logic (NAL). So far, DNARS-enabled agents could be written only in Java programming language. To solve the problem of interoperability and agent mobility within Siebog platforms, the ALAS language has been developed. The goal of such language is to allow programmers to develop intelligent agents easier by using domain specific constructs. The conversion process of ALAS code to Java code is also described in this paper.
Content may be subject to copyright.
Full Terms & Conditions of access and use can be found at
https://www.tandfonline.com/action/journalInformation?journalCode=teis20
Enterprise Information Systems
ISSN: 1751-7575 (Print) 1751-7583 (Online) Journal homepage: https://www.tandfonline.com/loi/teis20
ALAS: agent-oriented domain-specific language for
the development of intelligent distributed non-
axiomatic reasoning agents
Dejan Sredojević, Milan Vidaković & Mirjana Ivanović
To cite this article: Dejan Sredojević, Milan Vidaković & Mirjana Ivanović (2018) ALAS:
agent-oriented domain-specific language for the development of intelligent distributed non-
axiomatic reasoning agents, Enterprise Information Systems, 12:8-9, 1058-1082, DOI:
10.1080/17517575.2018.1482567
To link to this article: https://doi.org/10.1080/17517575.2018.1482567
Published online: 06 Jun 2018.
Submit your article to this journal
Article views: 67
View Crossmark data
Citing articles: 1 View citing articles
ARTICLE
ALAS: agent-oriented domain-specic language for the
development of intelligent distributed non-axiomatic reasoning
agents
Dejan Sredojević
a
, Milan Vidaković
b
and Mirjana Ivanović
c
a
Novi Sad School of Business, Novi Sad, Serbia;
b
Department of computing and control engineering, Faculty of
Technical Sciences, University of Novi Sad, Novi Sad, Serbia;
c
Department of Mathematics and Informatics, Faculty
of Sciences, University of Novi Sad, Novi Sad, Serbia
ABSTRACT
This paper presents an extension of the agent-oriented domain-specic
language ALAS to support Distributed Non-Axiomatic Reasoning. ALAS is
intended for the development of specic kind of intelligent agents. It is
designed to support the Siebog Multi-Agent System (MAS) and implemen-
tation of the Siebog intelligent agents. Siebog is a distributed MAS based
on the modern web and enterprise standards. Siebog oers support to
reasoning based on the Distributed Non-Axiomatic Reasoning System
(DNARS). DNARS is a reasoning system based on the Non-Axiomatic
Logic (NAL). So far, DNARS-enabled agents could be written only in Java
programming language. To solve the problem of interoperability and
agent mobility within Siebog platforms, the ALAS language has been
developed. The goal of such language is to allow programmers to develop
intelligent agents easier by using domain specic constructs. The conver-
sion process of ALAS code to Java code is also described in this paper.
ARTICLE HISTORY
Received 23 November 2017
Accepted 27 May 2018
KEYWORDS
Agent-oriented domain-
specic language;
Distributed Non-Axiomatic
Reasoning System (DNARS);
Siebog middleware;
intelligent agents; agent
mobility
1. Introduction
One of the greatest motives of many scientists in the past 60 years was the formalization of human
reasoning. As a result of testing of the human brain functions, in the middle of the 20th century,
the notion of Articial Intelligence (AI) emerged. At the base of AI is a complex mathematical logic
that tends to present the humans way of thinking, reasoning and concluding (Ranković2017).
An explosion of publicly available information about everything, and huge knowledge bases
(e.g. Wikipedia (2017) or DBpedia (2017) as ordered knowledge base constructed on Wikipedia) but
also the great progress in various domains of AI made at the beginning of the 21st century
(reasoning, machine learning, expert systems, neural networks, medical diagnosis, natural language
processing etc.) enabled development of computers that are capable to support such requirements
(Tutorialspoint 2017; Müller 2013).
Agent technology and intelligent agents have appeared as the research results in the eld of AI
in past 25 years (Serenko and Detlor 2004).
Agent technology is considered as an intelligent solution that provides autonomous and exible
problem-solving capabilities in dynamic and adaptive environments, and has been widely applied
in various areas, e.g. geographical information systems, Web-based knowledge discovery systems,
ood decision support systems, enterprise information system etc. (Zhang et al. 2015, 236).
CONTACT Dejan Sredojevićdsredojevic.vps@gmail.com Novi Sad School of Business, Novi Sad, Serbia
ENTERPRISE INFORMATION SYSTEMS
2018, VOL. 12, NOS. 89, 10581082
https://doi.org/10.1080/17517575.2018.1482567
© 2018 Informa UK Limited, trading as Taylor & Francis Group
Agents are programs that can be used to solve problems in various domains. For example, in (Li
et al. 2014) collaboration agents are proposed. Collaboration agents with collaboration modeling
eectively solve the problem of process and data fragmentation of the selected enterprise network.
Wooldridge and Jennings (1995) are among the rst who predicted rapid development of
intelligent agents. Many researchers have dealt with intelligent agents and there are numerous
of denitions of the term agent. The common properties of most agents are (Badica et al. 2011):
inter-agent communication within the multi-agent environment;
execute assigned tasks as well as robots;
can be intelligent, generally have human-like and cognitive abilities;
can be autonomous;
can learn from experience;
can act proactively as well as reactively.
Agent-Oriented Programming (AOP) (Shoham 1990) and Agent-Oriented Programming
Languages (AOPLs) were created to solve problems using software and intelligent agents. Up to
now a lot of dierent agent oriented programming languages have been developed. In (Weiss
2001; Fowler 2010), some languages for communication and coordination between agents were
presented.
Often, the scope of the agents execution relates to various specic domains where in compar-
ison to General-Purpose Languages (GPLs), Domain-Specic Languages (DSLs) have the following
advantage: a DSL is a specialized computer language focused on a particular domain and designed
for a specic task. This is in contrast to GPLs like C, Python, Java that are designed to let
programmers write any sort of program with any sort of logic they need (Wikipedia 2017b;
Fowler 2010). DSLs are used for programming in specic domains where GPL cannot solve the
necessary tasks (or can, but with a lot of eort). Compared to GPLs, DSLs are more concise, more
productive, code can be written more quickly, they are easier to maintain, and they are easier to
reason about (Hudak 1998). The basic features that each DSL should provide are the appropriate
levels of abstraction, describing logical and natural solutions but also the hiding of complexity
(Kosar et al. 2010).
In most cases, intelligent agents work in groups, communicating with each other to solve
specic tasks (Garrido, Barrachina, and Francisco 2017; Lujak et al. 2017). Software systems con-
sisting of a set of agents that communicate with each other in order to solve the task are called
Multi-Agent Systems (MAS) (Wooldridge 2009; Badica et al. 2011; Weiss 2000; Weiss 2013). MAS
include an ecient agent messaging infrastructure and managing the agents life-cycle, provide
support for agent mobility, to search for the capabilities of other agents, and so on. In many
situations, multi-agent systems oer security (e.g. agent code and data integrity as well as message
encryption), a connection system that allows agents to interact in physically separated environ-
ments, and persistence of agents. MAS and agents introduce new and unconventional ideas and
concepts. According to (Badica et al. 2011; Luck, Ashri, and Inverno 2004), there are over 100 agent
environments and toolkits that were developed or are still developing.
Our motivation for research presented in this paper is the design and implementation of the
ALAS language that will support Distributed Non-Axiomatic Reasoning. Previous versions of ALAS
did not support any reasoning. Initially, ALAS was designed just to increase interoperability and to
be platform independent. There already were plenty of agent languages, but the reason for
developing a new one was to support the new, modern, Siebog multi-agent middleware
(Mitrovićet al. 2016a; Mitrovićet al. 2016b). Siebog already oers support to reasoning based on
DNARS (Mitrović2015) and will be described in Section 2.1.
The idea behind ALAS is that agents can be interoperable and can move between dierent
nodes in the network of computers, where the nodes can be independent and implemented in
dierent programming languages. For example, one system is implemented in Java, the second in
ENTERPRISE INFORMATION SYSTEMS 1059
JavaScript, the third in Python, so our goal is to develop a universal agent language whose main
feature is hot compilation which will be presented in Section 4. When arriving at the destination
platform, agents remember the previous state and attributes. One of the key advantages of ALAS
compared to other programming languages are program constructs that replace several com-
mands, thereby increasing the code development speed, so the code is more transparent and easy
to understand for other programmers.
For the development of DSLs and AOPLs, developers use a variety of tools. One of the most
used tools in recent years that oers great possibilities in the development of DSLs is Xtext (Xtext
2017; Bettini 2013) framework for the development of programming languages and DSL. Initially,
the ALAS language has been developed using Xtext framework (Sredojević, Vidaković, and Dušan
2015; Sredojevićet al. 2015). However, the Xtext is a complex environment and it is often necessary
to know in detail how it works to develop some of the advanced language features (Sredojević
et al. 2017). For example, for the ALAS development Xtext usually generates four Eclipse projects
with approximately three hundred les, of which less than ten are of interest. Therefore, we have
switched to use the novel textX framework (Dejanović2017b; Dejanovićet al. 2017) based on the
Arpeggio parser (Dejanović2017a; Dejanović, Milosavljević, and Vaderna 2016). For the same ALAS
development this framework uses seven les and does not generate any additional les besides
target source les. Having both the support for the DNARS in the Siebog, and ALAS implementa-
tion using textX, enabled the development of the NAL-based extension of ALAS, which will be
presented in this paper.
The rest of the paper is organized as follows. The background and related work section
describes couple of existing AOPLs and DSLs, technologies that had a strong inuence on the
development of ALAS as well as a brief overview of the Siebog agent middleware. Section 3
describes DNARS architecture as well as details about NAL reasoning. In Section 4 we present the
design and implementation of ALAS. Mobility of ALAS agents and conversion process of ALAS code
to Java are presented in Section 5.Section 6 presents a case study that demonstrates the practical
application of ALAS with DNARS support. The last section concludes the paper and gives directions
for possible future work.
2. Background and related work
DSLs for software agents have been developed over the last two decades. One of the rst DSLs for
agents called Agent-DSL was introduced in (Kulesza et al. 2005). Agent-DSL has dened the various
agent properties introduced in order to perform the appropriate tasks. Knowledge, interaction,
adaptation, autonomy and collaboration were the key features of Agent-DSL.
Expansion of the semantic web and the need for the implementation of new structured
knowledge had an inuence on the development of some DSLs. One such DSL for the software
agentsdevelopment is SEA_L (Demirkol et al. 2012; Demirkol et al. 2013). ALAS is partly developed
based on this language. SEA_L and ALAS have many common features. The original version of
ALAS as well as SEA_L were developed by using the Xtext environment. Both languages are
designed for programming of the software agents in specic domains. Papers (Fowler 2010;
Kosar, Bohra, and Mernik 2016) provide detailed information about a large number of DSLs that
have been developed so far.
The ALAS language is intended for programming various types of agents, from dierent
domains. For example, heterogeneous agents used for Game equilibria and unication dynamics
in networks (Matveenko, Korolev, and Zhdanova 2017) can simply be programmed using the ALAS.
This will further increase interoperability, and ALAS can be extended to support domain-specic
constructs for this eld.
The mobile agents described in (Su and Shih 2011) are programmed in Java and provide partial
interoperability. By applying the ALAS language for programming, the mobility problem can be
solved completely and thus provide additional benets for these agents.
1060 D. SREDOJEVIĆET AL.
In (Chau, Liu, and Lam 2009; Ip et al. 2010; Lam and Ip 2011) the following systems are
proposed: MAS for six sigma projects selection process, MAS for Airport Service Planning and
agent-based scheduling environment for Constraint Priority Scheduling respectively. All the sys-
tems consist of several types of agents that perform the appropriate tasks. These environments and
their agents are implemented in Java, which enables partial interoperability and sometimes writing
agent code is a complex process. By using the ALAS language and the corresponding ALAS
constructs, the agent code can be easily written and the agent interoperability could be further
improved if agents need to be executed in other environments that are not implemented in Java.
The emergence of agent technologies has led to the development of AOPLs. Compared to GPLs,
AOPLs are better suited for the design of agents, since they oer programming constructs for the
agents design (for example, in AOPLs, message constructs are part of the language, not library
calls). The basic task of the programming constructs is hiding the complexity of some operations
and enabling developers to focus on solving the specic problems. Real software systems are often
based on (social) agents designed using these programming constructs (Shoham 1993).
Several languages that are mostly used asan inspiration for ALAS development are described in this
section. For most other languages, see (Badica et al. 2011; Bordini et al. 2009;Dastani2008; Dastani et al.
2004; Davies and Edwards 1994; Feraud and Galland 2017;Shoham1993; Thomas 1995).
After AOP, AGENT0 (Shoham 1993) was the rst language used for agent implementation. The
main features of AGENT0 were capabilities, beliefs, and commitment rules. Agents created various
actions based on messages and appropriate preconditions. The basic terms used for inter-agent
communication were request, unrequest as well as inform messages. In meanwhile, new versions of
AGENT0 were created: PLACA (Thomas 1995) and Agent-K (Davies and Edwards 1994). PLACA
supports the agent planning and Agent-K replaced the custom messaging with the standardized
KQML, increasing the overall interoperability. AGENT0, PLACA and Agent-K did not nd a widely
practical use, but some later AOPLs have been developed using these languages.
Foundation for Intelligent Physical Agents (FIPA 2017a)madetherst steps in the eld of
inter-agent communications. Since 2005, FIPA becomes a part of the IEEE Computer Society
standards committees. For inter-agent communication based on messaging, Siebog middleware
uses FIPA ACL (FIPA 2017b). ALAS is designed to support FIPA ACL standard for the inter-agent
communication, too.
One of the rst AOP languages was AgentSpeak (Rao 1996). Itsrst and foremost goal was the
programming of Beliefs-Desires-Intentions (BDI) agents. It is used as an abstract framework for BDI
agents as well (Georgeet al. 1999). Originally, AgentSpeak was used for understanding of the
connection between BDI architectures with practical use (e.g. Procedural Reasoning System)
(Georgeand Lansky 1987) and formalization of the ideas in the background of the BDI. For this,
the AgentSpeak used modal logics (Rao and George1998). AgentSpeak agents communicate by
exchanging messages. ALAS is inspired by this concept of the inter-agent communication. The
main language constructs of AgentSpeak are beliefs, goals and plans. Goals can be either achieve-
ment or test.Test goals simply check the belief base and determine if some facts are correct or
incorrect. To execute plans, achievement goals are used (Bordini, Hübner, and Wooldridge 2007;
Mitrović2015). ALAS is also based on language constructs. Some of the AgentSpeak concepts such
as the dierence between private and public services, had inuence on ALAS development
although it has never been put into practical use. Development of the Jason (2017) interpreter
contributes to popularity of the AgentSpeak (Bordini et al. 2009; Wang 2013).
The new AOPL based on the principles of AgentSpeak is called ASTRA (2017) and it was
developed to facilitate OOP (Object Oriented Programming) developers understanding of AOP
concepts. Like AgentSpeak, ASTRA is Java-like language also based on Jason Interpreter. ASTRA
constructs are mapped to methods, ow-control components, loops etc. (Collier, Russell, and Lillis
2015a; Collier, Russell, and Lillis 2015b). ALAS that is also Java-like is based on the same principles
as ASTRA.
ENTERPRISE INFORMATION SYSTEMS 1061
One of the agent-oriented languages used to develop cognitive agents is GOAL. GOAL agents
can interact with their environment and with each other. GOAL is based on the rules. The actions
oered by GOAL are dened by the condition rules. GOAL agents are executed within multi-agent
systems and communicate with each other via messages. Agents receive information about their
environment through percept and can request the environment to perform actions. Cognitive
agents are autonomous decision-making agents that derive their choice of action from their beliefs
and goals (Hindriks 2018). GOAL has emerged as an extended version of 3APL (Dastani et al. 2004)
which is based on BDI, but it does not develop anymore. Most of the GOAL concepts, including the
main features of GOAL agents such as beliefs, knowledge and conditions, helped in the develop-
ment of ALAS.
Besides GOAL, 2APL (Dastani 2008) also emerged on 3APL concepts. 2APL separates indivi-
dual agent and multi-agent concepts. The multi-agent part contains a set of agents, external
environments, as well as relations between agents and external environments. The basic con-
cepts of 2APL agents are goals, beliefs, events, plans, messages and rules. 2APL connects
imperative and declarative programming styles unlike GOAL which is a purely declarative
language (Badica et al. 2011).
JADEX (2017) is a BDI reasoning engine whose architecture for the development of intelligent
agents is based on Procedural Reasoning System. JADEX agents communicate by exchanging mes-
sages. Within JADEX platform, intelligent agents can be programmed using XML or Java language.
JADEX reasoning engine is very exible and can be used in various environments. It is most commonly
used within the JADE (2017) platform which is one of the most popular agent environments that are
currently available to the open source community (Bellifemine, Caire, and Greenwood 2007).
Agent mobility is an essential property of agents. However, this property can be quite complex
to implement. Some AOPL should hide this complexity from end-users. SAFIN (Dianxiang, Guoliang,
and Xiaocong 1998) and S-CLAIM (Baljak et al. 2012) (extended version of CLAIM (Suna and El
Fallah-Seghrouchni 2007)) hide complex support for agent mobility from the programmer. They
hide the functional complexity from developers by providing them with simple, yet powerful
programming constructs. These two languages are used as inspiration for the design of ALAS
constructs that hide the complexity of some operations.
As mentioned above, there are numerous MASs intended for various domains. For example,
paper (Chen et al. 2015) describes the MAS that provides a exible and adaptive inspection process
in stock markets and eciently solves the problem of harmful information caused by the market
manipulators. It consists of several types of agents that communicate with each other and lter
textual information in the stock market. Unlike these agents that are programmed using classic IF-
THEN rules, ALAS agents are based on NAL and provide more eective reasoning.
The paper (Piao, Han, and Harris 2010) describes the e-commerce transaction networks based on
multi-agent modelling. Three types of agents based on the behavior rules were introduced. The
Siebog MAS in combination with the ALAS could greatly improve the management of e-commerce
transaction networks because the Siebog is very convenient when it comes to a large number of
participants in the system (in this case, sellers, buyers and products). The ALAS could be used for
simpler writing of these agents using appropriate constructs. ALAS is based on the Distributed
Non-Axiomatic Reasoning, so it can be used for developing of more productive agents with a
higher degree of intelligence.
JACK Intelligent Agents (JACK 2017) is a cross-platform environment for rapid development of multi-
agent systems. It oers new language constructs and keywords. After the compilation, pure Java code
is generated whereby each agent can be viewed as the corresponding Java object. Regardless of its
advantages, JACK has similar disadvantages as the Siebog: it is limited to one development platform.
Both JACK and Siebog are limited to Java. Within Siebog, this problem is solved by introducing of ALAS.
Design of ALAS enables development of mobile agents that are able to transform from universal ALAS
code into the implementation language of the destination platform. Unlike JACK which is commercial,
Siebog multi-agent middleware is free (Mitrovićet al. 2012).
1062 D. SREDOJEVIĆET AL.
SARL (Feraud and Galland 2017; Rodriguez, Gaud, and Galland 2014) is new general-purpose
agent-oriented programming language. Its basic tasks are providing abstractions to deal with
distribution, concurrency, autonomy, interaction, reactivity, decentralization and dynamic recon-
guration. Concerning the technology and the design, SARL has signicantly inuenced the initial
steps in ALAS developing because both of them are developed by using Xtext.
Inspired by the languages described in this section and using the concepts on which they are
based, ALAS has been developed. However, the basic dierence between ALAS and AOPLs based
on BDI architecture is that instead of BDI intelligent agents, ALAS allows development of intelligent
agents based on NAL formalism developed in Articial General Intelligence domain (Wang 2013;
Wang 2006; Wang and Awan 2011).
We have introduced the early version of the ALAS programming language in papers Mitrović
et al. 2011; Mitrovićet al. 2012; Mitrovićet al. 2014c). This early version has used Javacc (2017)
parser generator. Later versions of ALAS were developed by using Xtext framework for the
language development because we wanted to start with the ECore meta-model, to separate
validation from compilation and to have Eclipse plugin made for ALAS without additional pro-
gramming. This plugin oers both validation and code generation to any programming language.
Since the environment of the ALAS agents was implemented in Java, that was reason to design
ALAS as Java-like. Due to this fact, the previous version of ALAS was developed using the Xtext
because it is the most widely used tool for the development of Java-like languages. Xtext enabled a
simple conversion process of ALAS code to Java as well (Sredojevićet al. 2015; Sredojević,
Vidaković, and Dušan 2015; Sredojevićet al. 2015).
However, the problem arises when the ALAS agents move through the network and execute on
various platforms implemented in dierent programming languages. If the agent moves, for example,
to a Python platform, there will be a problem because the conversion process of the ALAS code to
Python or some other language (except Java) is complicated if using Xtext. Xtext needs multiple
Eclipse projects to be created with multitude of les which are often hard to understand. In (Sredojević
et al. 2016) a conversion process of ALAS code to JavaScript by using Google Web Toolkit (GWT 2017)
is described. This was only a partial solution when converting ALAS code to JavaScript because it is
impossible to understand the generated JavaScript code. To solve and facilitate the process of
conversion of the ALAS code into any other programming language and to enable agent mobility
and platform independence, the latest version of ALAS is developed by using a novel, textX frame-
work. textX is a framework for development of domain-specic languages. It is based on Python and
use Arpeggio parsing expression grammar (PEG) parser. textX automatically converts parse trees to
abstract representations and thus facilitates job for developers (Dejanovićet al. 2017). DSLs developed
by using textX such as: pyFlies (2017), pyTabs (Simićet al. 2015), DProfLang (Vaderna et al. 2015)and
Applang (Kosanović, Dejanović, and Gordana 2016) had a strong inuence on the ALAS developing.
2.1 Siebog middleware
In this section we briey present Siebog, multi-agent middleware designed and implemented at
the University of Novi Sad. The main purpose of Siebog is to provide the infrastructural support for
MASs with practical applications in many AI domains. It includes articial (social) life, decision
making, swarm intelligence, distributed machine learning etc. Up-to-date principles of server and
client development system are combined into a single programming framework for agents by
Siebog. Siebog middleware supports both server-side (Mitrovićet al. 2016a; Mitrovićet al. 2014b),
(application server-based) and client-side (Mitrovićet al. 2014a), (browser-based) agents. On the
server side, Siebog oers automated agent load-balancing across nodes in the cluster, as well as
hardware and software fault-tolerance.
On the client side, Siebog includes true platform independence, i.e. it is designed so that it can
be executed on a wide variety of hardware and software platforms. Web browsers are used to
execute client-side of Siebog without any external requirements.
ENTERPRISE INFORMATION SYSTEMS 1063
One disadvantage of the Siebog architecture is its bond to the Java programming language.
Java agents cannot communicate with agents that are executed in some other environment not
implemented in Java. Web services were introduced and Siebog was redesigned as a service-
oriented architecture in order to solve the problem of interoperability and enable wider use.
However, this did not solve all the problems, especially the mobility.
Due to the fact that various programming languages are used for the implementation of agent
environments, it is almost impossible to write the agent that can be executed on dierent
platforms. If the agent is written in Java and executed on some platform implemented in Java, it
cannot be moved through the network to the other platform which is implemented in e.g.
JavaScript or Python and continue to be executed there. To solve the problem of interoperability
i.e. platform independence the authors of Siebog have developed a universal language for devel-
oping of intelligent agents ALAS (Mitrović, Ivanović, and Milan 2011; Mitrovićet al. 2014c;
Okanovićet al. 2014). The main purpose of ALAS is to support the implementation and execution
of agents on heterogeneous platforms.
Unlike other MAS based on the BDI architecture for the intelligent agentsdevelopment (Bordini
et al. 2009; Hindriks 2018; Wiebe van der and Wooldridge 2013; Pokahr et al. 2014; Weiss 2013), in
the last upgrade Siebog has received a support for intelligent agents in the form of Distributed
System for Non-Axiomatic Reasoning.
After adding logic for non-axiomatic reasoning to agents, ALAS has been updated to support
that new feature. To design a more ecient programming language that will be able to develop
agents from narrowly specialized domains, but also to develop intelligent agents capable of
deriving conclusions based on appropriate knowledge bases, we used the previously mentioned
advantages of DSLs and AOPLs.
3. DNARS distributed non-axiomatic reasoning system
DNARS is a novel architecture for reasoning which can be employed for the intelligent agents
development. This architecture emerged as a support to Siebog middleware by introducing agents
with cognitive abilities. The main goal of these agents is to make conclusions based on large
knowledge bases (Big Data) whereby these knowledge bases can often be inconsistent. DNARS
intelligence is based on NAL reasoning, which just oers this possibility i.e. making conclusions
based on large amounts of knowledge that can be uncertain, and not necessarily consistent
(Mitrović2015).
3.1 NAL reasoning
Pei Wang was among the rst to introduce the concept of non-axiomatic logic in his papers
(Wang 1993a;Wang1993b;Wang1996). In these papers, NAL is presented as a reasoning
system within Articial General Intelligence. Unlike most other articial intelligence systems, NAL
is the term-oriented logic (Sommers and Englebretsen 2000;Smith2017). It can simultaneously
processes and presents fuzziness, ignorance and randomness. The major aim of NAL is deriving
new conclusions from appropriate knowledge bases where knowledge can be inconsistent or
insucient. To achieve this, NAL uses a set of inference rules described below. The term non-
axiomaticmeans that the logic is suitable for the development of systems that operate in
conditions of insucient knowledge and resources. For example, it can eectively manage the
inconsistent knowledge bases and summarize the existing knowledge and thus reduce the total
number of statements in the database. NAL is based on subject-predicate-object format of the
statements, where subject and predicate can be atomic or compound terms. All the NAL
statements contain two-dimensional truth-value (f, c) at the end. Truth-value represents the
degree of consistency of any belief. Truth-value is dened with two values, frequency (f)and
condence (c)(Wang2013).
1064 D. SREDOJEVIĆET AL.
Besides deriving a new knowledge, inference rules are used to answer questions or to solve
problems of inconsistent statements. Depending on the purpose, inference rules can be forward,
backward, and local.
The knowledge can be uncertain, insucient and from time to time inconsistent, new evidence
that can include any content can come at any time and the truth of any existing statement can be
aected by it. Simultaneously, in order to solve some problem, the system often cannot consult the
overall knowledge due to the lack of certain resources (memory space, time etc.) and the knowl-
edge base often contains an insucient number of statements in order to derive the appropriate
conclusion. In addition, the knowledge available to the system is organized so that the necessary
conclusions cannot be derived by using the dened algorithms or the inference rules.
In order to solve the above problems, the built-in mechanisms of NAL are used. By using these
mechanisms, NAL successfully solves the problem of insucient knowledge. Also, NAL successfully
reduces a large number of inconsistent statements in the knowledge base, the knowledge becomes
more precise and the knowledge base is reduced. Beside clear theoretical basis for logical reasoning,
NAL is very practical and modern technology can be used for its ecient implementation.
There are 9 layers of NAL. Each layer oers new properties and inference rules including the
properties of all previous layers where each higher layer increases the expressiveness of logic and
the level of intelligence of the system that is based on it. For more information about NAL layers,
see (Wang 2013). DNARS implements inference rules as well as all other properties of the rst four
NAL layers enough for performing cognitive tasks with practical applications.
3.2 DNARS fundamentals
The need for processing large amounts of data requires the application of modern standards and
technologies. DNARS uses NoSQL and Graph databases for processing of Big Data (Tiwari 2011;
Sadalage and Fowler 2012; Robinson, Webber, and Eifrem 2013).
The latest version of DNARS is based on the Titan (2017) distributed graph database which
operates on top of Apache Cassandra (2017) database. The knowledge bases consisting of NAL
statements which can be represented using of the so-called property graph. The property graph
consists of mutually connected nodes (vertices) and branches (edges). One node can have several
edges and thus be connected to multiple other nodes. Dierent data structures can be represented
by the vertices and edges. In DNARS, vertices contain atomic or compound terms of NAL state-
ments and edges contain relations of inheritance or similarity and truth-values of corresponding
NAL statements (Mitrović2015; Robinson, Webber, and Eifrem 2013). A few NAL statements
represented by the corresponding property graph are shown in Figure 1.
An expressive domain-specic language named Gremlin (2017) is incorporated by the Titan
graph database for representing property graphs. DNARS uses third-party Scala-based version of
Gremlin.
orange −> fruit (1.0, 0.9)
orange ~ citrus (0.9, 0.8)
tangerine ~ orange (0.8, 0.7)
tangerine −> fruit (0.9, 0.8)
lemon −> citrus (0.7, 0.8)
copula: ~
truth: (0.8, 0.7)
copula:
−>
truth: (0.9, 0.8)
copula: −>
truth: (1.0, 0.9)
copula:
−>
truth: (0.7, 0.8)
copula:
~
truth: (0.9, 0.8)
orange
fruit
tangerine
citrus
lemon
Figure 1. NAL statements shown in the corresponding property graph.
ENTERPRISE INFORMATION SYSTEMS 1065
In order to ll out the key requirements of AI, including an ecient processing of large amounts
of knowledge, DNARS implements the main Big Data concepts such as a distributed, highly-
scalable backend knowledge base and fault-tolerance realized through data replication. In order
to realize the basic requirements when it comes to working with Big Data (e.g. answering to a huge
number of questions in real time based on millions of statements from knowledge base), DNARS
implements NALs inference rules. DNARS is a standalone system and various external clients
(software agents or some similar intelligent units, human users etc.) can easily use interface
which it oers. However, the main goal of DNARS is to provide a high degree of intelligence to
Siebog agents.
Two basic components of DNARS are DNARS inference engines and backend knowledge base.
3.3 DNARS inference engines
DNARS inference engines consist of two inference engines:
Forward inference engine implements NALs forward inference rules and derives new knowl-
edge. External clients or an internal process can trigger inference cycle.
Resolution engine that answers clients questions.
Resolution engine is used to answers on two types of questions:
(1) Questions that contain ?, i.e. S copula ?where Sis subject, or ? copula Pwhere Pis
predicate, where copula can be either inheritance or similarity. In both cases, the Resolution
engine checks the knowledge base and performs the best possible answer for ?.
(2) S copula Pwhere Sand Pare subject and predicate, respectively. In this case, the
Resolution engine gives the answer in the form of NAL statement S copula P (f, c). The
engine will derive answer by using backward inference rules under condition that the
answer is not directly available in the knowledge base.
Agent can have more answers when it makes conclusions. The best possible answer is obtained by
calculating the formula based on the truth-values (Denition 1).
Denition 1. The expectation of frequency, e, species how likely is the value of frequency to
be conrmed in the near future. It takes the value in (0, 1) and is calculated as e=(f1/2)c+ 1/2
(Mitrović2015, 33).
3.4 DNARS backend knowledge base
Backend knowledge base represents the entire knowledge and experience of the system. There are
three components within backend knowledge base:
Short-term memory: contains statements important to the current processing cycles.
Knowledge domain: one part of the complete knowledge that contains related or mutually
dependent statements.
Event manager: noties about the changes and manages events occurring as a result of these
changes in (parts of) the knowledge base.
4. ALAS design and implementation
ALAS is agent-oriented domain-specic language for writing software and intelligent agents that
are executed within Siebog MAS. Some of the most important features of the Siebog such as
automated load-balancing, as well as hardware and software fault tolerance, require a set of new
1066 D. SREDOJEVIĆET AL.
requirements that the existing agent languages do not provide. This has led to the need for the
development of a new agent language for the development of intelligent agents.
ALAS is a domain-specic language supported with elements of AI. The main idea of the
language is to use it in order to writing intelligent agents from specic domains to increase
eciency and precision in solving problems and making conclusions. An important feature of
ALAS compared to similar agent-oriented and domain-specic languages is the adaptability to
dierent platforms. When the ALAS agent arrives in a program environment implemented in the X
programming language, its code will be converted on the-y into the X programming language.
ALAS agents thus can be easily executed on various platforms implemented in, for example,
JavaScript, Python, etc. This feature can be called hot compilation (Mitrovićet al. 2012, 1212).
Other important goal of ALAS is that its agents can be written using constructs specic to the
appropriate domain in which an agents are being executed. In most cases, these constructs contain
a set of commands that are not visible to the programmer, and in this way it hides the complexity
of the entire agent-development process from developers. For example, by calling a construct, an
agent actually executes a set of operations that are hidden within the construct. To design DSL
with appropriate constructs, sometimes the help of an expert in that domain is needed, depending
on the complexity of the domain.
The latest version of ALAS which includes support to DNARS is developed with textX unlike previous
versions implemented by Xtext framework. textX has a similar notation and provides almost the same
capabilities as Xtext and it has not been dicult to adapt to it. On the other hand, textX is simpler and
fulls all ALAS requirements. textX is a framework and a tool for development of DSLs. It is based on the
Python programming language. For parsing, textX uses the Arpeggio PEG parser which enables
unlimited lookahead, there are no ambiguities and it works as interpreter.
4.1 ALAS grammar
The syntax of the language is dened using textXs grammar that consists of a set of rules. That
rules can be manual or built-in. textXs built-in rules are STRING, INT, FLOAT, BOOL and ID. Since
textX is based on the Arpeggio parser, PEG notation for describing of grammar is at the base of the
ALAS grammar. PEG notation is based on EBNF notation (EBNF 2017; Fowler 2010). The main
advantage of the PEG grammars compared to some other types of grammars is the use of ordered
choice operator that enables uniformity of parsing.
If the input text belongs to a language that describes the given PEG then there is only one valid
syntax tree that describes it, i.e. grammar cant be ambiguous. Extension of the language grammar les
is tx.Thereareseveraltx les that together form the grammar of the ALAS language (see Figure 2). This
is useful for a grammar to be more understandable or if the grammar contains several dierent
segments that they need to be separated. In order to use rules from other les within any le, a
keyword import is used. This keyword is followed by the le name which contains an appropriate rule.
import dnars
import expressions
import types
import expressions
import types
types.tx
import types
alas.tx
expressions.tx
dnars.tx
Figure 2. Hierarchy of textXALAS les.
ENTERPRISE INFORMATION SYSTEMS 1067
These rules are of dierent types. For example, dnars, expressions and types rules are imported at the
beginning of the alas.tx le.
In the rst stage of the ALAS development, standardized programming constructs for the ow
control, such as if-then-else and switch control statements, while, do-while, and for loops have
been implemented. A key component of the ALAS code is an agent.
ALAS supports nine types of data. Eight types are taken from the set of Java primitive types:
byte, short, int, long, oat, double, boolean and char, as well as the String. In the following phases
of the development, more complex constructs of language have been constructed, such as:
AgentStates it is a construct whose purpose is to save the state of an agent during the
termination of current activity (e.g. when closing the browser on which the agent is execut-
ing) or during the transfer of an agent to the other platform.
Function construct is used to execute operations within an agent and is similar to OOP
private method. Function denition begins with the return type, followed by the unique
name of the function, formal parameter list, and a body.
Services construct is used to expose agents functionality to other agents. In ALAS, services
are similar to OOP public methods. Agent service denition is the same as the function
denition, but the keyword service is specied at the beginning of the denition.
One of the more complex constructs is Action which, like the Function, is used to execute
operations, but based on preconditions.
Listing 1 shows a part of the ALAS grammar that implements of the above-described ALAS
constructs.
Listing 1. Part of the basic ALAS grammar
AgentDefinition:
(state = stateful)? (domain = domain’‘(param = ID ))?
agentname = ID {features* = Feature };
Feature:
AgentStates | Variable | Function | Service | Action;
AgentStates:
state’‘{states + = Variable };
Variable:
type = Type name = VariableName (=exp = Expression)? ;;
VariableName:
ID (,ID)?;
Function:
function = FunctionDeclaration {body* = Body };
Service:
serviceservice = Function;
Action:
action = ActionDeclaration {body* = Body };
FunctionDeclaration:
type = Type name = ID ((paramtype = Type param = ID (,
paramtype = Type param = ID)*)? );
ActionDeclaration:
@PreCondition’‘(ap = ActionParameter (name = STRING ,
Performative’‘.performative = Performative )’‘)’‘action
actionName = ID (anno = ActionParameter
(msgParamValue = STRING )’‘SerializableactionParam = ID );
1068 D. SREDOJEVIĆET AL.
Performative:
REQUEST|ACCEPT_PROPOSAL|CONFIRM|INFORM;
ActionParameter:
@MsgParam1ʹ|@MsgParam2ʹ|@MsgParam3ʹ|@MsgParam4ʹ;
Body:
Variable | Assignment | IfStatement | ForStatement |
WhileStatement | DoWhileStatement | Log;
4.1.1 Support to DNARS
The latest version of ALAS implemented by textX, which includes support for DNARS is based on
the previous version of ALAS that was implemented by Xtext. Since textX and Xtext use the same
notations to describe language grammar, it was not dicult to adapt Xtext version of grammar to
textX framework. Besides modication of existing features and rules to adapt to textX, the latest
version of ALAS introduces new rules which allow agents to support DNARS. Four new rules that
represent the relevant components of DNARS have been introduced: DnarsBeliefsAnnotation,
DnarsBeliefAU, DnarsQuestion and DnarsInference. Partial grammar for ALAS which supports
DNARS is shown in Listing 2.
Listing 2. Partial ALAS grammar to support DNARS
AgentDefinition:
(domain(param = ID ))?
agentname = ID
{Feature* };
Feature:
DnarsBeliefsAnnotation | DnarsBeliefAU
DnarsQuestion | DnarsInference;
DnarsBeliefsAnnotation:
beliefs{Judgement (,Judgement)* ;’‘};
DnarsBeliefAU:
beliefadded|beliefupdated((Term Copula Term ,)? ID)
{body* = Body };
DnarsQuestion:
TermsID =question((?Copula Term) | (Term Copula ?)
(,INT)? )’‘;;
DnarsInference:
StatementsID =inference
(Term Copula Term (,INT)?)’‘;;
Body:
Variable | Assignment | IfStatement |
ForStatement | WhileStatement | DoWhileStatement | Log;
Judgement:
Term Copula Term Truth;
Term:
BaseType | PrefixCompTerm | InfixCompTerm | ImgCompTerm;
Copula:
->|~;
Truth:
(NUMBER ,NUMBER );
An agent is declared with the agent keyword followed by the name and set of rules that
describe it. Before the agents name, a domain construct can be written. This construct denotes
ENTERPRISE INFORMATION SYSTEMS 1069
the domain that an agent uses when working with a knowledge base. If this construct is not
specied, the default domain name will be the same as the agents name. The domain construct is
important if we want more agents to use the same knowledge. In this case, we specify the same
name for domains of all agents which use the same knowledge base.
DnarsBeliefsAnnotation component allows agents to add new evidence into the knowl-
edge base. Only specic belief formats supported by NAL syntax are allowed.
DnarsBeliefsAnnotation component allows the input of eight types of NAL statements.
Using this rule we have to rst write the beliefs keyword, and then a set of beliefs. The beliefs
are dened by the Judgement rule which makes the syntax of NAL statements and it is dened
by Term, Copula and Truth rules. Subject and predicate of statements are dened by the
Term rule. Subject and predicate can be atomic or compound term whereby the atomic term is
dened by the BaseType rule and compound term is dened by using the PrefixCompTerm,
InfixCompTerm and ImgCompTerm. Copula can be either inheritance or similarity copula.
Truth rule is dened with two numerical values separated by a comma within brackets.
DnarsBeliefAU component consists of two constructs. The basic goal of these constructs is
to notify the agent about changes in the knowledge base. Based on these changes, the agent will
execute operations dened within the body of beliefadded or beliefupdated construct.
The rst construct indicated by the beliefadded keyword is used to notify agent when new
evidence is added to the knowledge base. The second construct indicated by the beliefupdated
keyword noties agent when some belief from the knowledge base is updated. beliefadded
construct can have two arguments where the rst one is optional. If this argument is not specied,
the agent will be notied about all the new evidences added to the knowledge base. If the
parameter is specied, it is a NAL statement. Based on this statement, agent will be notied if
such evidence is added to the knowledge base. The second argument is required and it is the
variable name. In this argument, the new evidence added to the knowledge base will be added.
After the arguments, the body of DnarsBeliefAU component is specied. Body allows dening
and implementing all the rules dened by the Body rule.
DnarsQuestion component represents a DNARS construct that allows the agent to derive
conclusions based on the questions asked. The syntax of the question can be as follows: ? copula P
or Scopula ?, where Sis subject and Pis predicate. Copula can be inheritance or similarity copula.
This construct consists of Terms keyword (which means that the return value should be a list of
Terms) followed by the variable name in which the result will be placed. Then, the question
keyword and one or two parameters in brackets are followed. The rst argument is required and it
represents a question in the form of one of the two above mentioned forms. The second argument
is numerical and it is optional. This argument indicates how many answers the client wants to
receive. If this parameter is not specied, the default answer number is one. The answers that the
agent oers are with the highest degree of truth compared to other answers. For example, we have
three beliefs in the knowledge base: tangerine ;-> fruit (09, 0.7), orange ;-> fruit (0.9, 0.8) and apple
;-> fruit (0.8, 0.7) and the client want the agent to list two fruits. ALAS syntax for this question is
Terms t =question(?;-> fruit, 2). Based on Denition 1 the agents answers will be orange and
tangerine in that order.
DnarsInference construct based on the question S copula Pgives the best answer in the
form of S copula P (f, c)where, like the DnarsQuestion construct, the best answer is found by
using the expectation (Denition 1). The syntax of DnarsInference construct begins with the
Statements keyword (which means that the answer should be in the form of the Statements
list), followed by variable name in which the result will be placed. Then, the inference keyword
and one or two parameters in the brackets follow. The rst argument is required and it represents a
question in the form of S copula P. The second argument is optional and it indicates how many
answers the client wants to receive. If this parameter is not specied, the default answer number
is one.
1070 D. SREDOJEVIĆET AL.
4.2 ALAS syntax
A part of the agent that contains the appropriate constructs to support DNARS is shown in Listing 3. This
textual language model is based on the grammar of the language described in the previous section.
After the package name in which the agent is placed, the agents name is specied by using the
agent keyword. As noted earlier, it can be indicated which knowledge base the agent uses. In this
case, using a domain construct, it is specied that the agent uses a knowledge base from the
dnarsdomaindomain.
After the beliefs keyword, new beliefs in the form of NAL statements are added.
Listing 3. An example of ALAS agent
package dnars.siebog.agents{
domain(dnarsdomain) agent DnarsTestAgent {
beliefs {
tangerine -> fruit (0.9, 0.7),
orange -> fruit (0.9, 0.8),
apple -> fruit (0.8, 0.7),
bee -> insect (1.0, 0.9),
(x bees honey) -> make (1.0, 0.9),
(x hemingway 1899) -> born (1.0, 0.9);
}
Terms t1 = question((\birthDate Ernest_Hemingway *) -> ?);
Terms t2 = question(? -> fruit, 3);
Statements s1 = inference(bee -> insect);
Statements s2 = inference(apple -> fruit, 2);
}
}
The next construct dened in the ALAS agent shown in Listing 3 is a question. Both question, in
the form ? copula Por S copula ?, and the number that indicates how many answers the client
wants to get are forwarded to the agent. In the rst question construct, the client asks a
question to the agent what is Ernest Hemingways date of birth?in the form of NAL statement:
(\birthDate Ernest_Hemingway *) -> ? without additional numerical parameter. The agent
searches the knowledge base i.e. property graph and the obtained result is written to the t
1
Term
list. In the second case, the client asks the agent to list three types of fruits. After searching the
knowledge base, results with the highest degree of truth that is calculated using the expectation
rule described in Denition 1 are written to the t
2
Term list.
inference construct works in a similar way. The client forwards to the agent both the
question, in the form of ScopulaP, and the number of answers it wants to receive. In the rst
example, the agent will write one answer in the form of bee ;-> insect (1.0, 0.9) to the
s
1
Statement list.
4.3 ALAS compiling and visualization of the meta-model and model
Having ALAS as specic programming language and model (agent) expressed like language
grammar, it can be easily written using a plain text editor without dependence on any develop-
ment environment. By using the appropriate commands, the syntax can be checked from the
command prompt (shell) to see if the model corresponds to the grammar and if there are syntax
errors in the text that is written and describes an agent. As noted earlier, textX is built on top of the
Python programming language and besides the command prompt, the execution can be achieved
ENTERPRISE INFORMATION SYSTEMS 1071
by writing and by running the appropriate Python script. Figure 3 shows the architecture of the
textX compiler conguration.
The main part of the compiler system is the syntax module where we specify both the ALAS grammar
and the agent model in a textual form (Figure 3). From a dened grammar, textX automatically creates
Arpeggio parser as well as a meta-model that contains the Python classes derived from grammar rules
and all the necessary information about the language. Based on the program written in the new
language, Arpeggio parser creates Python object graph a.k.a. the model conforming to the meta-
model. Parser checks the grammar validity and compatibility model (agent) with meta-model (grammar).
If the model corresponds to the meta-model, the console will print messages if model and meta-model
are OK; if there is an error, the console will print the error and the exact location of the error.
For meta-model and model visualization, GraphViz (2017) tool is used. Figures 4 and 5show
parts of ALAS meta-model and model respectively.
textX supports debugging on the meta-model (grammar) and model levels. If debugging is
enabled, textX will print various debugging messages. Additionally, if debugging is enabled, parser
and both concrete syntax tree and abstract syntax tree will be generated and visualized by using
ALAS
grammar
alas.tx Agent model
in a textual
form
agent-dnars.alas
Arpeggio
parser
Meta-modelet Model
. . .
Code
generation
Parser and meta-model
created in memory
at run-time
parse
conformsTo
created
model
in-memory
Age
in
JAVA
JS
PY
Ar
r-
Figure 3. The textX workow and architecture when it comes to ALAS.
DnarsAUAnnotation DnarsQuestion DnarsInference DnarsBeliefsAnnotation
*Body
+answer: ID
+num: INT
+answer: ID
+copula: Copula
+num: INT
*Term
BeliefAU
+ann_name: list[STRING]
+copula: Copula
+param: ID Question2
+copula: Copula
Question1
+copula: Copula Judgement
+copula: Copula
Truth
+number: list[NUMBER]
annotation
judgements 0..*
truth
AgentDefinition
+domain: STRING
+param: ID
+name: ID
*Feature
features 0..*
body 0..*
subj
pred
subj pred
subj
pred
subj
pred
question
question
Figure 4. A part of ALAS meta-model created in memory at run-time.
1072 D. SREDOJEVIĆET AL.
GraphViz tool. The whole process of visualization can be automated by creating the appropriate
Python script.
5. Mobility of ALAS agents
With the help of mobility, an agent can leave its current host node and move to some other
machine in the network where it can continue to be executed. There are dierent types of agent
mobility depending on platforms that comprise the network (Mitrovićet al. 2011). They are
classied as follows:
Homogeneous: all MAS nodes on an agents path are implemented on the same program-
ming language (e.g. Java), giving the same set of APIs (Application Programming Interfaces),
etc. During the movement between the MAS nodes, the agent code needs not to be changed.
Evidently, this type of mobility is the easiest to implement.
Cross-platform: the agents move between dierent MASs based on the same virtual
machines. In this case, it is only necessary to adjust the API calls. Agents executable code
will not change.
Agent-regeneration: the agents move between instances of the same MAS, whereas MASs can
be implemented by various programming languages (Java, JavaScript, Python, etc.). Because
of this fact the agents executable code has to be regenerated when arriving to target MAS
nodes.
Heterogeneous: the agents move between dierent types of MASs that are running on
dierent platforms or virtual machines and oer dierent sets of APIs. The agent code must
be regenerated during movement between dierent MAS nodes.
By analysing these types of agent mobility, it can easily be concluded that the heterogeneous
mobility is the most complex for the implementation. In (Mitrovićet al. 2012), the authors
described supporting heterogeneous agent mobility with ALAS. Besides the corresponding con-
structs which enable the mobility of agents, it is also necessary to enable the hot compilation
:DnarsInference
:DnarsBeliefsAnnotation
+answer: str=‘s’
+copula: str=‘−>
+num: int=0
DnarsTestAgent: AgentDefinition
+domain: str=‘domain’
+param: str=‘dnarsdomain’
:Judgement
+copula: str=‘−>
:AtomicTerm
+aterm: str=‘apple’
:Truth
+number: list=[1.0, 0.9]
:DnarsQuestion
+answer: str=‘t’
+num: int=3
:AtomicTerm
+aterm: str=‘fruit’
:AtomicTerm
+aterm: str=‘bee’
:AtomicTerm
+aterm: str=’insect’
:AtomicTerm
+aterm: str=‘fruit’
features:0 features:1 features:2
subj pred question
:Question1
+copula: str=‘−>
termtruth
subj pred
judgements
Figure 5. A part of a dynamically created ALAS object model.
ENTERPRISE INFORMATION SYSTEMS 1073
process that implies the conversion of ALAS code to some other programming language described
in Section 4. As noted earlier, it was dicult to create the engine for the conversion of ALAS code
to some other programming language with the Xtext. Because of that, we started to develop ALAS
using the textX tool. One of the main reasons for using the textX is the advantages that, Arpeggio
PEG parser on which the textX is based, possess. By using this parser, it is easy to access any
segment of the language model. Based on this fact, it is easy to create any engine for conversion of
ALAS code to any programming language. Engine construction for conversion of ALAS code to Java
is described in the following section.
5.1 Generating java code from ALAS
textX is built on top of the Python and during grammar parsing, textX dynamically creates an
appropriate Python classes derived from the grammar rules. Due to this fact, Python language is
used for the transformation of the ALAS code into the target programming language. In order to
generate the appropriate code to be maximally facilitated, textX uses Jinja2 (2017)the Python
template engine. However, the textX does not depend only on Jinja2 template engine and other
tools and templates can be used for the code generation. One of the advantages of Jinja2 template
engine is the full adaptability to the Python programming language. Based on that, we have used this
template engine. The whole conversionprocess of ALAS code to Java source code is shown in Figure 6.
In the Python le code_generator.py, both corresponding model (ALAS code) and Jinja2 tem-
plate for Java (java.template le) are loaded. Listing 4 and Listing 5 show parts of java.template and
code_generator.py les.
Listing 4. A part of Jinja2 Java template
package {{package}};
{{agent|imports}}
{% if agent.domain = = domain%}
@Domain(name = {{agent.param}})
{% endif %}
public class {{agent.name}} extends DNarsAgent {
@Override
protected void doTasks(AgentInitArgs args) {
{% for feature in agent.features %}
{% if feature.__class__.__name__ = = DnarsQuestion%}
Python code
generator
code-generator.py
Agent model
in a textual
form
agent-dnars.alas
Arpeggio
parser Model
Code
generation
Jinja2 Java
template
java.template
parse
Java
source code
agent-dnars.java
e enerat o
-
o
en
Figure 6. Conversion of ALAS code to Java.
1074 D. SREDOJEVIĆET AL.
List<Term> {{feature.answer}} = {{feature|
question_to_str}}
{% elif feature.__class__.__name__ = = DnarsInference%}
List<Statement> {{feature.answer}} =
{{feature|inference_to_str}}
{% endif %}
{% endfor %}
}
}
Listing 5. A part of Python generator
def main(debug = True):
def beliefs_to_str(self):
global count
count1 = 0
temp = initialBeliefs
if count = = 0: temp + = ‘‘
else: temp + = str(count)
temp + = () {+\n\t\treturn new String[] {
for judgement in self.judgements:
if count1 > 0: temp + = ,
temp + = \n\t\t\t”‘ + judgement_to_str(judgement) + ‘“‘
count1 + = 1
count + = 1
return temp + \n\t\t};+\n\t}
Listing 6. A part of generated Java code
package dnars.siebog.agents;
import dnars.siebog.annotations.Beliefs;
import dnars.base.Term;
//. . .
@Domain(name = dnarsdomain)
public class DnarsTestAgent extends DNarsAgent {
@Beliefs
public String[] initialBeliefs() {
return new String[] {
tangerine -> fruit (0.9, 0.7),
orange -> fruit (0.9, 0.8),
apple -> fruit (0.8, 0.7),
bee -> insect (1.0, 0.9),
(x bees honey) -> make (1.0, 0.9),
(x hemingway 1899) -> born (1.0, 0.9)
};
}
protected void doTasks(AgentInitArgs args) {
List<Term> t1 = Arrays.asList(graph().answer(
StatementParser.
apply
(
(\birthDate Ernest_Hemingway *) -> ?), 1));
List<Term> t2 = Arrays.asList(graph().answer(
StatementParser.
apply
(? -> fruit), 3));
ENTERPRISE INFORMATION SYSTEMS 1075
List<Statement> s1 = Arrays.asList(graph().
backwardInference(
StatementParser.
apply
(bee -> insect (1.0, 0.9)), 1));
List<Statement> s2 = Arrays.asList(graph().backwardInference(
StatementParser.
apply
(apple -> fruit (1.0, 0.9)), 2));
}
}
After loading the appropriate les (alas.tx that represents agent model in a textual form and
java.template that represents Java template for conversion ALAS code into Java), the Python
generator generates the corresponding Java source code. A part of the generated Java code is
shown in Listing 6. This Java code is generated from the ALAS code shown in Listing 3. All
constructs from the ALAS code are transformed into the corresponding Java components.
The Jinja2 template contains static parts that are only mapped into Java code and dynamic parts
whose contents depend on the language model. Since the agent in ALAS is equivalent to the OOP
class, the Python generator for each written agent will generate an individual Java class.
In the Jinja2 template, variable parts are written within double braces such as {{agent.name}}.
In this way, the corresponding components of the language model are accessed. The ow control (such
as loops and conditions) is achieved by tags within the braces with percentage signs at the beginning
and end of the condition {% . . . %} such as {% if agent.domain = = domain%}.
As noted earlier, parser generates language model in the form of Python objects graph (see
Figure 5). Since these objects are not readable and cannot be easily mapped to Java code, we used
Jinja2 lters that are used to convert an object into a readable string that can be further used to
generate Java code. Filters are used for transforming data inside a template expression. By using
the lters, the variables can also be modied. For example, {{feature | beliefs_to_str}}
sends feature variable to the beliefs_to_str lter. The lter (that can have the optional
arguments in brackets) and a variable are separated by a pipe symbol |. There are custom and
built-in lters in Jinja2. Like functions in standard programming languages, Jinja2 lters can also
have arguments. All lters from our Jinja2 Java template are implemented in Python generator
code_generator.py (Listing 5 shows implementation of the Jinja2 beliefs_to_str lter). Several
lters that are exclusively used to convert DNARS ALAS code to Java are described below.
The imports lter is used to import all the required classes into a Java code. In Listing 6, some
classes imported by using the imports lter can be seen.
An example {{feature|beliefs_to_str}} shows feature object that is passed to the
beliefs_to_str lter, whose implementation can be seen in Listing 5. This lter is used for
mapping of ALAS beliefs construct to a Java method. The return value of this Java method will be a
set of beliefs, specied within the beliefs construct in the ALAS code (see Listing 3). This Java
method will be marked with the @Beliefs annotation as well.
belief_added_updated lter is used to convert DnarsAUAnnotation object from the
ALAS model to Java methods marked with @BeliefAdded or @BeliefUpdated annotations
depending on the construct that is written (beliefadded or beliefupdated).
question_to_str lter converts DnarsQuestion object to a readable string. This lter is
based on the question ALAS construct which, as an argument, has the question which DNARS
Resolution engine needs to answer. The answer is obtained by calling the answer DNARS function
which returns the result in the form of atomic or compound terms based on beliefs in the
knowledge base. For example, question ALAS construct: Terms t = question
((\birthDate Ernest_Hemingway *)->?); will be mapped to the following Java code:
List<Term> t = Arrays.asList(graph().answer(StatementParser.apply
((\birthDate Ernest_Hemingway *) -> ?), 1));
1076 D. SREDOJEVIĆET AL.
Besides the question construct, the most important ALAS construct for the support of DNARS is
inference. This construct is used to derive conclusions based on inconsistent knowledge.
inference_to_str Jinja2 lter maps the inference construct code to Java code. This
construct is mapped to the DNARS backwardInference function. This function returns the
corresponding conclusions in the form of NAL statements. These conclusions are based on the
DNARS inference rules described above. An example of a Java code derived from the inference
construct Statements s = inference(bee -> insect); is as follows:
List<Statement> s = Arrays.asList(graph().backwardInference
(StatementParser.apply(bee -> insect (1.0, 0.9)), 1));
6. Case study
In (Mitrović2015) an example of the practical application of intelligent agents based on the current
implementation of DNARS is described. In this case study, DNARS relies on the ordered DBpedia
knowledge base, which downloads and structures the data from Wikipedia. DBpedia knowledge
base is available in the form of DBpedia datasets based on the Resource Description Framework
(RDF (2017)) statements. RDF uses statements in the form of ordered triplets to describe resources.
The statements are organized in the form <subject> <predicate> <object>. In this way, the relationship
between resources is described (Schreiber and Raimond 2017). During the structuring of the text there
is often a problem with the homographs. In order to solve this problem, Uniform Resource Identiers
(URIs) are used within RDF. However, some resources do not have to be presented via URI because they
already have a unique value. These resources are called literals and are represented by a set of Unicode
characters (numbers), such as dates of birth, etc. All the RDF statements are represented by an
appropriate graph whereby the subjects and objects are nodes and the predicates are branches of
the graph. In RDF format, a subject canbe an URI or a blank node, the predicate must be an URI and the
object can be either a literal or an URI or a blank node. In the example:
<http://dbpedia.org/resource/Ernest_Hemingway>
<http://dbpedia.org/ontology/birthDate> 18997-21 (8.1)
subject and predicate are URIs and the object is a string literal. The given statement describes
Ernest Hemingways date of birth.
NAL also uses ordered triplets of statements in the form of subject-predicate-object and this is
the main reason why RDF has been selected as the main data model for the case study. To adapt
the RDF statements to the NAL format, the restructuring of RDF statements is needed. RDF format
<subject> <predicate> <object> will be converted to the NAL format (x subject object);predicate.
Based on this transformation, the statement 8.1 written in the RDF format will be converted to the
following NAL format:
(x http://dbpedia.org/resource/Ernest_Hemingway 18997-21)
-> http://dbpedia.org/ontology/birthDate (1.0, 0.9) (8.2)
Listing 7 shows an example of ALAS agent which derives conclusion about Ernest Hemingways
date of birth.
Listing 7. An example of ALAS agent to support DNARS
domain(test) agent TestAgent {
beliefs {
(x http://dbpedia.org/resource/Ernest Hemingway
http://dbpedia.org/resource/Oak_Park,_Illinois)
ENTERPRISE INFORMATION SYSTEMS 1077
-> http://dbpedia.org/ontology/birthPlace (1.0, 0.9),
(x http://dbpedia.org/resource/Ernest Hemingway
http://dbpedia.org/resource/Jack_Hemingway)
-> http://dbpedia.org/ontology/child (1.0, 0.9),
(x http://dbpedia.org/resource/Ernest Hemingway 18997-21)
-> http://dbpedia.org/ontology/birthDate (1.0, 0.9);
}
Terms t=question(? -> (/birthDate Ernest Hemingway *));
log(Ernest Hemingway was born on: +t);
}
An example of the ALAS construct that will answer when was Ernest Hemingway born?is the
following line of code:
Terms t=question(? -> (/birthDate Ernest_Hemingway *)) (8.3)
Based on (8.2) the agent cannot conclude when was Ernest Hemingway born?. Because of that,
the structural transformation of this statement is required (Wang 2013). After structural transforma-
tion of this statement, we get two more structurally dierent but functionally same statements:
http://dbpedia.org/resource/Ernest_Hemingway ->
(/http://dbpedia.org/ontology/birthDate * 18997-21)
(1.0, 0.9) (8.4)
and
18997-21 -> (/http://dbpedia.org/ontology/birthDate
http://dbpedia.org/resource/Ernest_Hemingway *)
(1.0, 0.9) (8.5)
Now it is clear that the statement 8.4 has the same structure as the question within statement
8.3. Based on this statement, the agent will print the following answer: 18997-21.
7. Conclusion and future work
This paper describes an extension of the ALAS programming language to support the DNARS
reasoning system. DNARS is built into the Siebog agent middleware, which supports execution of
intelligent software agents. The essential functionality of the Siebog is to provide, besides basic
requirements, the execution in distributed environments, mobility, reliable and ecient commu-
nication channels, a yellow-pages service, etc.
Siebog supports DNARS-based intelligent agents. DNARS is based on the NAL formalism for
knowledge management. The nal result of adding DNARS to the Siebog is the incorporation of
the elements of reasoning and AI into Siebog agents. So far, DNARS supports 4 levels of NAL.
ALAS was primarily created to enable the development of the intelligent Siebog agents as well
as in order to solve the problem of agent mobility and their execution on both the client-side and
the server-side of Siebog. DNARS-related extension of the ALAS language includes constructs
which enable developer to easily and straightforward add and query beliefs. Current version of
DNARS-enhanced ALAS is transformed to the Java programming language only.
Future work will include the full support of the DNARS client-side (JavaScript-based) agents in
both ALAS and Siebog but also the upgrade of both Siebog and ALAS to support the remaining
layers of NAL in DNARS.
Acknowledgments
Author Mirjana Ivanovic would like to thanks to ICT COST Action IC1307: The European Network on Integrating
Vision and Language (iV&L Net): Combining Computer Vision and Language Processing For Advanced Search,
1078 D. SREDOJEVIĆET AL.
Retrieval, Annotation and Description of Visual Data, as some ideas presented in the paper are inspired by
intensive discussions by other members of the project during MC meetings. The authors thank the Ministry of
Education, Science and Technological Development of the Republic of Serbia for support through the projects no.
OI174023 and III-47003.
Disclosure statement
No potential conict of interest was reported by the authors.
References
ASTRA. 2017.ASTRA Agent Programming Language.Accessed 10 July 2017. http://astralanguage.com.
Badica, C., Z. Budimac, H.-D. Burkhard, and I. Mirjana. 2011.Software Agents: Languages, Tools, Platforms.Computer
Science and Information Systems 8 (2): 255298. doi:10.2298/CSIS110214013B.
Baljak, V., M. Tudor Benea, A. E. F. Seghrouchni, C. Herpson, S. Honiden, T. T. N. Nguyen, A. Olaru, R. Shimizu, K. Tei, and
S. Toriumi. 2012.S-CLAIM: An Agent-Based Programming Language for AmI, A Smart-Room Case Study.Procedia
Computer Science 10: 3037. doi:10.1016/j.procs.2012.06.008.
Bellifemine, F. L., G. Caire, and D. Greenwood. 2007.Developing Multi-Agent Systems with JADE. Chichester, United
Kingdom: John Wiley & Sons.
Bettini, L. 2013.Implementing Domain-Specic Languages with Xtext and Xtend. Birmingham, UK: Packt Publishing.
Bordini, R. H., J. F. Hübner, and M. Wooldridge. 2007.Programming Multi-Agent Systems in AgentSpeak Using Jason.
Chichester, United Kingdom: John Wiley & Sons.
Bordini, R. H., M. Dastani, J. Dix, and A. E. F. Seghrouchni. 2009.Multi-Agent Programming: Languages,Tools and
Applications. New York, NY: Springer.
Cassandra. Accessed 20 July 2017. http://cassandra.apache.org/.
Chau, K. Y., S. B. Liu, and C. Y. Lam. 2009.Multi-Agent Modeling in Managing Six Sigma Projects.International Journal
of Engineering Business Management 1 (1): 914. doi:10.5772/6786.
Chen, K., L. Xin, X. Baoxun, J. Yan, and H. Wang. 2015.Intelligent Agents for Adaptive Security Market Surveillance.
Enterprise Information Systems 11 (5): 652671. doi:10.1080/17517575.2015.1075593.
Collier, R. W., S. Russell, and D. Lillis. 2015a.Exploring AOP from an OOP Perspective.In Proceedings of the 5th International
Workshop on Programming Based on Actors, Agents, and Decentralized Control,2536. Pittsburgh, PA, USA: ACM.
Collier, R. W., S. Russell, and D. Lillis. 2015b.Reecting on Agent Programming with AgentSpeak(L).In: PRIMA 2015:
Principles and Practice of Multi-Agent Systems: 18th International Conference, Bertinoro, Italy, edited by Q. Chen, P.
Torroni, S. Villata, J. Hsu, and A. Omicini, 351366. Cham: Springer International Publishing.
Dastani, M. 2008.2APL: A Practical Agent Programming Language.Autonomous Agents and Multi-Agent Systems
(JAAMAS) 16 (3): 214248. doi:10.1007/s10458-008-9036-y.
Dastani, M. M., B. van Riemsdijk, F. Dignum, and J.-J. C. Meyer. 2004.A Programming Language for Cognitive Agents
Goal Directed 3APL.In: Programming Multi-Agent Systems: First International Workshop, PROMAS 2003, Melbourne,
Australia, July 15, 2003, Selected Revised and Invited Papers, edited by M. M. Dastani, J. Dix, and A. E. F. Seghrouchni,
111130. Berlin, Heidelberg: Springer Berlin Heidelberg.
Davies, W., and P. Edwards. 1994.Agent-K: An Integration of AOP and KQML.In: Proceedings of the CIKM 94
Workshop on Intelligent Agents, edited by T. Finin and Y. Labrou. Gaithersburg, MD: NIST.
DBpedia. Accessed 5 August 2017. http://wiki.dbpedia.org/.
Dejanović,I.2017a.Arpeggio.Accessed 28 June 2017. https://github.com/igordejanovic/Arpeggio.
Dejanović,I.2017b.textX.Accessed 28 June 2017. http://www.igordejanovic.net/textX/.
Dejanović, I., G. Milosavljević, and R. Vaderna. 2016.Arpeggio: A Flexible PEG Parser for Python.Knowledge-Based
Systems 95: 7174. doi:10.1016/j.knosys.2015.12.004.
Dejanović, I., R. Vaderna, G. Milosavljević,and V. Željko. 2017.textX: A Python Tool for Domain-Specic Languages
Implementation.Knowledge-Based Systems 115 (1): 14. doi:10.1016/j.knosys.2016.10.023.
Demirkol, S., M. Challenger, S. Getir, T. Kosar, G. Kardas, and M. Mernik. 2012.SEA_L: A Domain-Specic Language for
Semantic Web Enabled Multi-Agent Systems.In Federated Conference on Computer Science and Information
Systems (FedCSIS)2012. 13731380. Wroclaw, Poland: IEEE.
Demirkol, S., M. Challenger, S. Getir, T. Kosar, G. Kardas, and M. Mernik. 2013.A DSL for the Development of Software
Agents Working within A Semantic Web Environment.Computer Science and Information Systems 10 (4): 1525
1556. doi:10.2298/CSIS121105044D.
Dianxiang, X., Z. Guoliang, and F. Xiaocong. 1998.A Logic Based Language for Networked Agents.Information and
Software Technology 40 (8): 435442. doi:10.1016/S0950-5849(98)00061-5.
EBNF. Extended BackusNaur form.Wikipedia, Accessed 25 July 2017.https://en.wikipedia.org/wiki/Extended_
Backus%E2%80%93Naur_form.
ENTERPRISE INFORMATION SYSTEMS 1079
Feraud, M., and S. Galland. 2017.First Comparison of SARL to Other Agent-Programming Languages and
Frameworks.Procedia Computer Science 109: 10801085. doi:10.1016/j.procs.2017.05.389.
FIPA. 2017a. Accessed 3 July 2017. http://www.pa.org/.
FIPA. 2017b.FIPA ACL Message Structure Specication.FIPA, Accessed 3 July 2017
Fowler, M. 2010.Domain-Specic Languages. 1st ed. Boston, MA: Addison-Wesley Professional.
Garrido, P. J., F. M. Barrachina, and S. Francisco. 2017.Smart Tourist Information Points by Combining Agents,
Semantics and AI Techniques.Computer Science and Information Systems 14 (1): 123. doi:10.2298/
CSIS150410029G.
George, M., B. Pell, M. Pollack, M. Tambe, and M. Wooldridge. 1999.The Belief-Desire-Intention Model of Agency.
Intelligent Agents V: Agents Theories, Architectures, and Languages: 5th International Workshop, ATAL98 Paris, France
110. doi:10.1007/3-540-49057-4_1.
George, M. P., and A. L. Lansky. 1987.Reactive Reasoning and Planning.In Proceedings of the sixth National
conference on Articial intelligence, 677682. Seattle, Washington: AAAI Press.
GraphViz. 2017.Graphviz - Graph Visualization Software.Graphviz, Accessed 20 August 2017. http://www.graphviz.org/.
Gremlin. 2017.Gremlin-Scala for Apache Tinkerpop 3.Accessed 25 July 2017. https://github.com/mpollmeier/
gremlin-scala.
GWT. Accessed 15 July 2017 . http://www.gwtproject.org.
Hindriks, K. V. 2018.Programming Cognitive Agents in Goal.https://bintray.com/artifact/download/goalhub/GOAL/
GOALProgrammingGuide.pdf
Hudak, Paul. 1998.Domain-Specic Languages.In Handbook of Programming Languages, Vol. 3: Little Languages and
Tools, edited by Peter H. Salus, 3960. Indianapolis: MacMillan.
Ip, W. H., V. Cho, N. Chung, and G. Ho. 2010.A Multi Agent Based Model for Airport Service Planning.International
Journal of Engineering Business Management 2 (2): 93100. doi:10.5772/9718.
JACK. AOS Group, Accessed5 July 2017. http://aosgrp.com/products/jack/.
JADE. 2017.JAVA Agent DEvelopment Framework.Accessed 6 July 2017. http://jade.tilab.com/.
JADEX. 2017. Active Components, Accessed 8 July 2017. https://www.activecomponents.org/#/project/features.
Jason. Accessed 2 August 2017 . http://jason.sourceforge.net.
Javacc. 2017.The Java Parser Generator.Accessed 10 July 2017. https://javacc.org/.
Jinja2. Accessed 20 August 2017.http://jinja.pocoo.org/.
Kosanović, M., I. Dejanović, and M. Gordana. 2016.Applang A DSL for Specication of Mobile Applications for
Android Platform Based on textX.AIP Conference Proceedings 1738 (1): 240003. doi:10.1063/1.4952022.
Kosar, T., N. Oliveira, M. J. Marjan Mernik, V. Pereira, M. Črepinšek, D. da Cruz, and P. R. Henriques. 2010.Comparing
General-Purpose and Domain-Specic Languages.An Empirical Study Computer Science and Information Systems 7
(2): 247264. doi:10.2298/CSIS1002247K.
Kosar, T., S. Bohra, and M. Mernik. 2016.Domain-Specic Languages: A Systematic Mapping Study.Information and
Software Technology 71: 7791. doi:10.1016/j.infsof.2015.11.001.
Kulesza, U., A. Garcia, C. Lucena, and P. Alencar. 2005.A Generative Approach for Multi-Agent System Development.
In: Software Engineering for Multi-Agent Systems III, edited by C. Ricardo, G. Alessandro, L. Carlos, and R. Alexander,
5269. Heidelberg: Springer-Verlag Berlin.
Lam, C. Y., and W. H. Ip. 2011.Constraint Priority Scheduling Using an Agent-Based Approach.Industrial Management
& Data Systems 111 (2): 246263. doi:10.1108/02635571111115164.
Li, Q., Z.-Y. Wang, Z.-C. Cao, D. Rui-Yang, and H. Luo. 2014.Process and Data Fragmentation-Oriented Enterprise
Network Integration with Collaboration Modelling and Collaboration Agents.Enterprise Information Systems 9(5
6): 468498. doi:10.1080/17517575.2013.879742.
Luck, M., R. Ashri, and M. D. Inverno. 2004.Agent-Based Software Development. Norwood, MA: Artech House.
Lujak, M., H. Billhardt, J. Dunkel, A. Fernández, R. Hermoso, and S. Ossowski. 2017.A Distributed Architecture for Real-
Time Evacuation Guidance in Large Smart Buildings.Computer Science and Information Systems 14 (1): 257282.
doi:10.2298/CSIS161014002L.
Matveenko, V., A. Korolev, and M. Zhdanova. 2017.Game Equilibria and Unication Dynamics in Networks with
Heterogeneous Agents.International Journal of Engineering Business Management 9 (4): 117. doi:10.1177/
1847979017731670.
Mitrović,D.2015.Intelligent Multiagent Systems Based on Distributed Non-Axiomatic Reasoning.Ph.D. thesis,
University of Novi Sad.
Mitrović, D., M. Ivanović, M. Vidaković, D. Sredojević, and O. Dušan. 2014c. Integracija Agentskog Jezika ALAS U Java
Agentsko Okruženje XJAF. Paper presented at the XX naučna i biznis konferencija, Kopaonik, Srbija, 913. Mart.
Mitrović, D., M. Ivanović, M. Vidaković, and Z. Budimac. 2014b. Extensible Java EE-based Agent Framework in
Clustered Environments.Lecture Notes in Computer Science 8732: 202215. doi:10.1007/978-3-319-11584-9_14.
Mitrović, D., M. Ivanović, M. Vidaković, and Z. Budimac. 2016a.The Siebog Multiagent Middleware.Knowledge-Based
Systems 103: 5659. doi:10.1016/j.knosys.2016.03.017.
Mitrović, D., M. Ivanović, M. Vidaković, Z. Budimac, and V. Jovana. 2016b.Siebog: An Enterprise-Scale Multiagent
Middleware.INFORMATION TECHNOLOGY and CONTROL 45: 164174. doi:10.5755/j01.itc.45.2.12621.
1080 D. SREDOJEVIĆET AL.
Mitrović, D., M. Ivanović, and V. Milan. 2011. Introducing ALAS: A Novel Agent-Oriented Programming Language.
Paper presented at the Symposium on Computer Languages, Implementations, and Tools (SCLIT 2011), September
1925, Halkidiki, Greece.
Mitrović, D., M. Ivanović, Z. Budimac, and V. Milan. 2012.Supporting Heterogeneous Agent Mobility with ALAS.
Computer Science and Information Systems 9 (3): 12031229. doi:10.2298/CSIS120102025M.
Mitrović, D., M. Ivanović, Z. Budimac, and V. Milan. 2014a.Radigost: Interoperable Web-based Multi-agent Platform.
Journal of Systems and Software 90: 167178. doi:10.1016/j.jss.2013.12.029.
Mitrović, D., M. Ivanovic, Z. Budimac, and V. Milan. 2011. An Overview of Agent Mobility in Heterogeneous
Environments. Paper presented at the Proceedings of the workshop on applications of software agents.July 35
Novi Sad, Serbia, .
Müller, V. C. 2013.Philosophy and Theory of Articial Intelligence. Berlin, Heidelberg: Springer.
Okanović, D., M. Vidaković,Ž. Vuković, D. Mitrović, and I. Mirjana. 2014. Editor for Agent-Oriented Programming
Language ALAS. Paper presented at the International Conference on Information Society and Techology 2014,
March 9- 13, Kopaonik, Serbia.
Piao, C., X. Han, and W. Harris. 2010.Research on E-Commerce Transaction Networks Using Multi-Agent Modelling
and Open Application Programming Interface.Enterprise Information Systems 4 (3): 329353. doi:10.1080/
17517575.2010.502975.
Pokahr, A., L. Braubach, C. Haubeck, and J. Ladiges. 2014.Programming BDI Agents with Pure Java.In Proceedings of
the 12th German Conference on Multiagent System Technologies (MATES 2014), 216233. Stuttgart, Germany:
Springer-Verlag New York.
pyFlies. 2017.Accessed 20 July 2017. http://www.igordejanovic.net/pyFlies/.
Ranković,I.2017.Istorijski Razvoj Veštačke Inteligencije.Računarski fakultet - Beograd, Accessed 25 June 2017.
https://raf.edu.rs/citaliste/istorija/3706-istorijski-razvoj-vestacke-inteligencije.
Rao, A. S., and M. P. George.1998.Decision Procedures for BDI Logics.Journal of Logic and Computation 8 (3): 293
343. doi:10.1093/logcom/8.3.293.
Rao, A. S. 1996.AgentSpeak(L): BDI Agents Speak Out in a Logical Computable Language.In Agents Breaking Away
(MAAMAW 1996), edited by W. Van De Velde and J. W. Perram, 4255. Berlin, Heidelberg: Springer.
RDF. W3C, Accessed 15 August 2017.https://www.w3.org/RDF/.
Robinson, I., J. Webber, and E. Eifrem. 2013.Graph Databases. 2nd ed. Sebastopol, California: OReilly Media.
Rodriguez, S., N. Gaud, and S. Galland. 2014.SARL: A General-Purpose Agent-Oriented Programming Language.In
2014 IEEE/WIC/ACM International Joint Conferences on Web Intelligence (WI) and Intelligent Agent Technologies (IAT),
103110. Warsaw, Poland: IEEE Computer Society Press.
Sadalage, P. J., and M. Fowler. 2012.NoSQL Distilled: A Brief Guide to the Emerging World of Polyglot Persistence. Boston,
MA: Addison-Wesley Professional.
Schreiber, G., and Y. Raimond. RDF 1.1 Primer.W3C, Accessed 10 August 2017 . https://www.w3.org/TR/rdf11-primer/.
Serenko, A., and B. Detlor. 2004.Intelligent Agents as Innovations.AI & SOCIETY 18 (4): 364381. doi:10.1007/s00146-
004-0310-5.
Shoham, Y. 1990.Agent-Oriented Programming.In. (Technical Report STAN-CS-90-1335): Stanford University:
Computer Science Department.
Shoham, Y. 1993.Agent Oriented Programming.Journal of Articial Intelligence 60 (1): 5192. doi:10.1016/0004-3702
(93)90034-9.
Simić, M., Ž. Bal, R. Vaderna, and D. Igor. 2015.PyTabs: A DSL for Simplied Music Notation.In The 5th International
Conference on Information Society and Technology (ICIST 2015), edited by M. Zdravković, M. Trajanović, and Z.
Konjović, 439443. Belgrade, Serbia: Society for Information Systems and Computer Networks.
Smith, R. 2017.Aristotles Logic.Stanford Encyclopedia of Philosophy, Accessed 5 July. https://plato.stanford.edu/
entries/aristotle-logic/.
Sommers, F. T., and G. Englebretsen. 2000.An Invitation to Formal Reasoning: The Logic of Terms. Farnham,
England: Ashgate.
Sredojević, D., D. Okanović, M. Vidaković, D. Mitrović, and I. Mirjana. 2015.Domain Specic Agent-Oriented
Programming Language Based on the Xtext Framework.In: 5th International Conference on Information Society
and Technology (ICIST 2015), edited by M. Zdravković, M. Trajanović, and Z. Konjović, 495501. Belgrade, Serbia:
Society for Information Systems and Computer Networks.
Sredojević, D., M. Vidaković, D. Okanović, D. Mitrović, and I. Mirjana. 2016.Conversion of the Agent-Oriented Domain-
Specic Language ALAS into JavaScript. Paper presented at the 5th Symposium on Computer Languages,
Implementations and Tools, September 23- 29 Rhodes, Greece.
Sredojević, D., M. Vidaković, M. Ivanović, and M. Dejan. 2017. Extension of Agent-Oriented Domain-Specic Language
ALAS as a Support to Distributed Non-Axiomatic Reasoning. Paper presented at the International Conference on
Information Society and Techology (ICIST 2017), March 12- 15 Kopaonik, Serbia.
Sredojević, D., M. Vidaković, and O. Dušan. 2015. Integration of Agent Domain-Specic Language ALAS into Extensible
Java-Based Framework XJAF. Paper presented at the 34th International Conference on Organizational Science
Development internationalization and cooperation March, 2527, Portorož.
ENTERPRISE INFORMATION SYSTEMS 1081
Su, C., and S. C. Shih. 2011.Building Distributed E-Healthcare for Elderly Using RFID and Multi-Agent.International
Journal of Engineering Business Management 3 (1): 1626. doi:10.5772/45677.
Suna, A., and A. El Fallah-Seghrouchni. 2007.Programming Mobile Intelligent Agents: An Operational Semantics.
Web Intelligence and Agent Systems: an International Journal 5 (1): 4767.
Thomas, S. R. 1995.The PLACA Agent Programming Language.In Proceedings of the workshop on agent theories,
architectures, and languages on Intelligent agents, 355370. Amsterdam, The Netherlands: Springer-Verlag New York.
Titan. Distributed Graph Database.Accessed 20 July 2017. http://titan.thinkaurelius.com/.
Tiwari, S. 2011.Professional NoSQL. Indianapolis: John Wiley & Sons.
Tutorialspoint.Articial Intelligence Tutorial.Tutorialspoint, Accessed 20 June 2017. http://www.tutorialspoint.com/
articial_intelligence/.
Vaderna, R., Ž. Vuković, D. Okanović, and I. Dejanovic. 2015.A Domain-Specic Language for Service Level Agreement
Specication.In The 7th International Conference on Information Technology, 693697. Amman, Jordan.
Wang, P. 1993a.Non-Axiomatic Logic (Version 2.1).Technical Report 71, Center for Research on Concepts and
Cognition, Indiana University, Bloomington, Indiana.
Wang, P. 1993b.Non-Axiomatic Reasoning System (Version 2.2).Technical Report 75, Center for Research on
Concepts and Cognition, Indiana University, Bloomington, Indiana
Wang, P. 1996.Non-Axiomatic Reasoning System - Exploring the Essence of Intelligence.Ph.D. thesis, Indiana University.
Wang, P. 2006.Rigid Flexibility. The Logic of Intelligence. Vol. 34. Dordrecht, The Netherlands: Springer.
Wang, P. 2013.Non-Axiomatic Logic: A Model of Intelligent Reasoning. Singapore: World Scientic Publishing Co Pte.
Wang, P., and S. Awan. 2011.Reasoning in Non-Axiomatic Logic: A Case Study in Medical Diagnosis.In Proceedings of
the 4th international conference on Articial general intelligence, 297302. Mountain View, CA: Springer-Verlag.
Weiss, G. 2000.Multiagent Systems: A Modern Approach to Distributed Articial Intelligence. Cambridge: MIT Press.
Weiss, G. 2001.Agent Orientation in Software Engineering.Knowl Engineering Reviews 16 (4): 349373. doi:10.1017/
s026988890100025x.
Weiss, G. 2013.Multiagent Systems. 2nd ed. Cambridge: MIT Press.
Wiebe van der, H., and M. Wooldridge. 2013.Logics for Multiagent Systems.In: Multiagent Systems, edited by
Gerhard Weiss, 761811. Cambridge: MIT Press.
Wikipedia. Accessed 20 June 2017b . https://www.wikipedia.org/.
Wikipedia. 2017.Domain-SpecicLanguage.Wikipedia, Accessed 25 June 2017. https://en.wikipedia.org/wiki/
Domain-specic_language.
Wooldridge, M. 2009.An Introduction to MultiAgent Systems. 2nd ed. Chichester, United Kingdom: John Wiley & Sons.
Wooldridge, M., and N. Jennings. 1995.Intelligent Agents: Theory and Practice.Knowledge Engineering Review 10 (2):
115152. doi:10.1017/S0269888900008122.
Xtext. Language Engineering for Everyone!, Accessed 15 August 2017. https://eclipse.org/Xtext/.
Zhang, W., S. Zhang, M. Cai, and W. Jian. 2015.An Agent-Based Peer-To-Peer Architecture for Semantic Discovery of
Manufacturing Services across Virtual Enterprises.Enterprise Information Systems 9 (3): 233256. doi:10.1080/
17517575.2012.747002.
1082 D. SREDOJEVIĆET AL.
... To effectively implement MDE for MASs, a practical approach involves customizing Domain-Specific Modeling Languages (DSMLs) using integrated development environments (IDEs) that support modelling and code generation for the target system. Proposed MAS DSMLs (e.g., [22], [23], [24], [25], [26], [27]) are based on the aforementioned agent metamodels and offer various abstract syntaxes. These DSMLs facilitate modelling both static and dynamic aspects of agent software from different perspectives within the MAS domain, including internal agent behaviour, interactions with other agents, and environmental entities. ...
... Various domain-specific languages (DSLs) / domain-specific modeling languages (DSMLs) (e.g. Hahn, 2008;Kardas et al., 2010;Ciobanu and Juravle, 2012;Demirkol et al., 2012;Challenger et al., 2014;Goncalves et al., 2015;Bergenti et al., 2017;Kardas et al., 2018;Sredejovic et al., 2018;HoseinDoost et al., 2019) exist for the model-driven development (MDD) of multi-agent systems (MAS) (Alaca et al., 2021) by considering approaches or models such as BDI. However, they are mostly dependent on the desktop libraries hindering widespread accessibility and online development. ...
Conference Paper
Full-text available
With their autonomy capabilities, agent-based systems have gained prominence in various industrial domains. Belief-Desire-Intention (BDI) architecture, a cornerstone of Agent-Oriented Software Engineering (AOSE), is commonly used to create proactive agents that interact effectively with their environment. Various domain-specific modeling languages (DSMLs) exist for the model-driven development of multi-agent systems (MAS) with a BDI approach. However, they are mostly dependent on the desktop libraries hindering widespread accessibility and online development. In this paper, we introduce a modeling language, called SAML, which enables the creation of BDI agents online. Our goal is to eliminate certain dependencies to the local computing resources and paving the way for a development environment that offers the low-code platform support in conjunction with a Software as a Service (SAAS) infrastructure. Additionally, the platform of SAML, also created in this study, serves as a platform-independent online modeling and development environment. The main objective is to promote the model-driven development of BDI agents using the low-code development techniques, one of the current trends in the software engineering field. By eliminating local dependencies, SAML can become a widely adopted tool for BDI agent development, fostering innovation and agility across various MAS applications. The paper presents a structured approach to achieve these goals, including research on the foundations of SAML, development of user interfaces for upper-level modeling, model-to-model transformation with JSON, and code transformation using JASON standards.
... Another technical DSL is ALAS [58]. This language is designed to support the development of mobile intelligent agents which are deployed to Siebog multi-agent system [59]. ...
Article
Full-text available
The majority of studies in psychology are nowadays performed using computers. In the past, access to good quality software was limited, but in the last two decades things have changed and today we have an array of good and easily accessible open-source software to choose from. However, experiment builders are either GUI-centric or based on general-purpose programming languages which require programming skills. In this paper, we investigate an approach based on domain-specific languages which enables a text-based experiment development using domain-specific concepts, enabling practitioners with limited or no programming skills to develop psychology tests. To investigate our approach, we created PyFlies, a domain-specific language for designing experiments in psychology, which we present in this paper. The language is tailored for the domain of psychological studies. The aim is to capture the essence of the experiment design in a concise and highly readable textual form. The editor for the language is built as an extension for Visual Studio Code, one of the most popular programming editors today. From the experiment description, various targets can be automatically produced. In this version, we provide a code generator for the PsychoPy library while generators for other target platforms are planned. We discuss the language, its concepts, syntax, some current limitations, and development directions. We investigate the language using a case study of the implementation of the Eriksen flanker task.
Article
This paper considers Enterprise Information Systems functional architecture and carries out review of AI applications integrated in Customer Relationship Management, Supply Chain Management, Inventory and logistics, Production Planning and Scheduling, Finance and accounting, Product Lifecycle Management and Human Resources, with special attention to the manufacturing enterprises. Enhanced capabilities are identified and proposed as AI services. AI-enablement implements improved decision-making or automation by using Machine Learning models or logic-based systems. It is a process of the enterprise transformation leading to the convergence of the four major disruptive technologies, namely Industrial Internet of Things, Agent-based Distributed Systems, Cloud Computing and Artificial Intelligence.
Article
Full-text available
Artificial intelligence has been developed since the beginning of IT systems. Today there are many AI techniques that are successfully applied. Most of the AI field is, however, concerned with the so-called “narrow AI” demonstrating intelligence only in specialized areas. There is a need to work on general AI solutions that would constitute a framework enabling the integration of already developed narrow solutions and contribute to solving general problems. In this work, we present a new language that potentially can become a base for building intelligent systems of general purpose in the future. This language is called the General Environment Description Language (GEDL). We present the motivation for our research based on the other works in the field. Furthermore, there is an overall description of the idea and basic definitions of elements of the language. We also present an example of the GEDL language usage in the JSON notation. The example shows how to store the knowledge and define the problem to be solved, and the solution to the problem itself. In the end, we present potential fields of application and future work. This article is an introduction to new research in the field of Artificial General Intelligence.
Article
Software development required for constructing multi-agent systems (MAS) usually becomes challenging and time-consuming due to the properties of autonomy, distributedness, and openness of these systems in addition to the complicated nature of internal agent behaviors and agent interactions. To facilitate MAS development, the researchers propose various domain-specific modeling languages (DSMLs) by enriching MAS metamodels with a defined syntax and semantics. Although the descriptions of these languages are given in the related studies with the examples of their use, unfortunately, many are not evaluated in terms of either the usability (being hard to learn, understand and use) or the quality of the generated artifacts. Hence, in this paper, we introduce an evaluation framework, called AgentDSM-Eval, with its supporting tool which can be used to evaluate MAS DSMLs systematically according to various quantitative and qualitative aspects of agent software development. The empirical evaluation, presented by the AgentDSM-Eval framework, was successfully applied for one of the well-known MAS DSMLs. The assessment showed that both MAS domain coverage of DSMLs and the agent developers' adoption of modeling elements can be determined with this framework. Moreover, the tool's quantitative results can assess MAS DSML's performance on the development time and throughput. AgentDSM-Eval also enables the qualitative assessment of MAS DSML features according to novel quality characteristics and measures, which it defines specifically for the MAS domain.
Conference Paper
Full-text available
The agent technology represents one of the most consistent approaches to the development of distributed systems. Multiagent middleware XJAF, developed at the University of Novi Sad, presents a runtime environment that supports the execution of software agents. To solve the problem of interoperability, we propose a domain-specific agent language named ALAS, whose main purpose is to support the implementation and execution of agents on heterogenous platforms. To define the structure of the language, a metamodel and a grammar of the ALAS language has been created, in accordance with the requirements and needs of the agents. This paper describes the construction of the compiler and the generation of executable Java code that can be executed in XJAF.
Conference Paper
Full-text available
Development of Agent-based languages is the natural extension of the research in the area of Agent-based systems. This paper deals with adding the support for the Distributed Non-Axiomatic Reasoning into the ALAS agent-oriented language. This support has been added into the Siebog agent middleware. Siebog is a distributed multiagent system based on the modern web and enterprise standards. Siebog has built in support for reasoning based on the Distributed Non-Axiomatic Reasoning System (DNARS). DNARS is a reasoning system based on non-axiomatic logic (NAL) and general principles of development of non-axiomatic reasoning systems. So far, the DNARS-enabled agents could be written only in Java programming language. To solve the problem of interoperability within different Siebog platforms, an agent-oriented domain-specific language (AODSL) ALAS has been developed. The main purpose of the ALAS is to support agent mobility and implementation and execution of agents on heterogenous platforms. This paper describes the extended version of the ALAS language which supports DNARS. The conversion process of ALAS code to Java code is also described in this paper. The latest version of ALAS has been developed by using textX framework and Arpeggio parser. I. INTRODUCTION This paper deals with the improvement of the support for the Distributed Non-Axiomatic Reasoning System (DNARS [1]) by extending the ALAS language [2][3][4], to support the DNARS. The ALAS language is the agent-oriented language built for the Siebog agent middleware [5][6][7]. Siebog middleware is an agent middleware which supports both server-side [5][7], (application server-based) and client-side [8], (browser-based) agents. Distributed Non-Axiomatic Reasoning System (DNARS) is a novel architecture for reasoning which can be employed for the intelligent agent development. It extends the Non-Axiomatic Logic Reasoning [9][10][11], by introducing the capability for distributed processing which allows large amounts of data to be processed. The main advantage of DNARS, when compared to all other existing reasoning and cognitive architectures, is that it leverages state-of-the-art techniques for large-scale, distributed data management and processing. This approach allows DNARS to operate on top of very large knowledge bases, while serving large numbers of external clients with real-time responsiveness.
Article
Full-text available
We study game equilibria in a model of production and externalities in network with two types of agents who possess different productivities. Each agent may invest a part of her endowment (it may be, for instance, time or money) in the first of two time periods; consumption in the second period depends on her own investment and productivity as well as on the investments of her neighbors in the network. Three ways of agent’s behavior are possible: passive (no investment), active (a part of endowment is invested), and hyperactive (the whole endowment is invested). For star network with different productivities of agents in the center and in the periphery, we obtain conditions for existence of inner equilibrium (with all active agents) and study comparative statics. We introduce adjustment dynamics and study consequences of junction of two complete networks with different productivities of agents. In particular, we study how the behavior of nonadopters (passive agents) changes when they connect to adopters (active or hyperactive) agents.
Article
Full-text available
This paper proposes a first comparison of different agent-oriented programming languages, including the SARL agent-programming language. The study of those tools is based upon various criteria that are defining the essential aspects of multi-agent systems. For the sake of clarity, the comparative study is presented in a tabular form, including the languages and all the criteria. For each criterion, a definition is made to understand its meaning. At the end of the article, all the languages will be described in order to define their advantages and disadvantages.
Conference Paper
Full-text available
In this paper we present pyTabs – a DomainSpecific Language (DSL) for simplified music notation. In pyTabs it is possible to describe a composition that consists of multiple sequences which can be specified in the form of a tablature or chord notation. One notable feature of pyTabs is the capability to play a musical piece written in it. We describe some major issues in simplified music notations (tablatures and chords) and propose a solution implemented in pyTabs project as a way of standardizing them into a formal language. puTabs is a free and open source project implemented in python programming language. It is available at: https://github.com/E2Music/pyTabs
Article
BDI represents a well-known agent architecture that has been successfully adopted for expressing agent behavior in terms of beliefs, desires and intentions. A core advantage of the architecture consists in its underlying philosophical model that relies on intuitive folk-psychological notions to describe rational human behavior. A key challenge consists in making the ideas of the BDI model easily accessible for software engineers. For this purpose many different BDI programming languages have been devised that differ considerably in their interpretation of the attitudes and the used programming paradigm. In many cases, novel agent languages such as AgentSpeak(L) have been developed which expose a new syntax and semantics to the user. On the one hand this is positive because it allows for introducing a compact and concise notation, but on the other hand the language is very different from well-known and adopted mainstream languages. To remedy this problem it will be shown that the BDI model can also be realized in a completely object oriented programming language by exploiting its metadata capabilities. We will show how the BDI attitudes can be mapped to slightly enhanced object oriented counterparts and how common BDI use cases can be realized using the novel approach. A key advantage of the approach is that BDI programming more closely resembles object orientation and the learning effort is reduced, because existing concepts and tool chains can be further employed. The usefulness of the approach will be illustrated with an example application from the area of production automation.