Motivation for a new formal framework for agent-oriented software...

25
252 Int. J. Agent-Oriented Software Engineering, Vol. 3, Nos. 2/3, 2009 Copyright © 2009 Inderscience Enterprises Ltd. Motivation for a new formal framework for agent-oriented software engineering R. Ahmad* Department of Mathematics and Computer Science Manchester College, USA E-mail: [email protected] *Corresponding author S. Rahimi Department of Computer Science Southern Illinois University, USA E-mail: [email protected] Abstract: Agent-Oriented Software Engineering (AOSE) poses several challenges to the traditional theory and practice of software engineering with the emergence of a variety of theories and tools proposed to deal with this challenge. Agent frameworks with formal foundations have an important role to play in this scenario by allowing analysis based on a mathematical model. It is our contention that the available frameworks and languages do not fulfil all aspects of agent-based system analysis and development. We perform a survey of the available formal theories and tools for Multi-Agent Systems (MAS) and derive a strong motivation for a new formal framework to support AOSE. Several aspects of agent behaviour in this framework have been inspired by the popular Belief-Desire-Intention (BDI) model of cognitive agents. The new framework introduced concisely in the second half tackles the issues raised in the first half, including those regarding mobility, proactive behaviour, organisation and inter-agent communication. Keywords: intelligent agents; multi-agent systems; MAS; formal methods; agent-oriented software engineering; AOSE. Reference to this paper should be made as follows: Ahmad, R. and Rahimi, S. (2009) ‘Motivation for a new formal framework for agent-oriented software engineering’, Int. J. Agent-Oriented Software Engineering, Vol. 3, Nos. 2/3, pp.252–276. Biographical notes: Dr. Raheel Ahmad is an Assistant Professor of Mathematics and Computer Science at Manchester College, USA. He is currently performing active research in the fields of information visualisation, computer graphics, multi-agent systems and software engineering. His immediate research involves effective communication of information through the medium of graphics. Dr. Ahmad was awarded a graduate fellowship as an outstanding PhD candidate. His research interests have led to several publications in international proceedings and conferences, such as IEEE affiliated conferences, as well as journal articles. He was responsible for the installation and deployment of a high-performance computing cluster for the Computer Science Department at Southern Illinois University (SIU), USA. This is intended as a research tool for all the departments in the school that may benefit from the available computing power.

Transcript of Motivation for a new formal framework for agent-oriented software...

Page 1: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

252 Int. J. Agent-Oriented Software Engineering, Vol. 3, Nos. 2/3, 2009

Copyright © 2009 Inderscience Enterprises Ltd.

Motivation for a new formal framework for agent-oriented software engineering

R. Ahmad* Department of Mathematics and Computer Science Manchester College, USA E-mail: [email protected] *Corresponding author

S. Rahimi Department of Computer Science Southern Illinois University, USA E-mail: [email protected]

Abstract: Agent-Oriented Software Engineering (AOSE) poses several challenges to the traditional theory and practice of software engineering with the emergence of a variety of theories and tools proposed to deal with this challenge. Agent frameworks with formal foundations have an important role to play in this scenario by allowing analysis based on a mathematical model. It is our contention that the available frameworks and languages do not fulfil all aspects of agent-based system analysis and development. We perform a survey of the available formal theories and tools for Multi-Agent Systems (MAS) and derive a strong motivation for a new formal framework to support AOSE. Several aspects of agent behaviour in this framework have been inspired by the popular Belief-Desire-Intention (BDI) model of cognitive agents. The new framework introduced concisely in the second half tackles the issues raised in the first half, including those regarding mobility, proactive behaviour, organisation and inter-agent communication.

Keywords: intelligent agents; multi-agent systems; MAS; formal methods; agent-oriented software engineering; AOSE.

Reference to this paper should be made as follows: Ahmad, R. and Rahimi, S. (2009) ‘Motivation for a new formal framework for agent-oriented software engineering’, Int. J. Agent-Oriented Software Engineering, Vol. 3, Nos. 2/3, pp.252–276.

Biographical notes: Dr. Raheel Ahmad is an Assistant Professor of Mathematics and Computer Science at Manchester College, USA. He is currently performing active research in the fields of information visualisation, computer graphics, multi-agent systems and software engineering. His immediate research involves effective communication of information through the medium of graphics. Dr. Ahmad was awarded a graduate fellowship as an outstanding PhD candidate. His research interests have led to several publications in international proceedings and conferences, such as IEEE affiliated conferences, as well as journal articles. He was responsible for the installation and deployment of a high-performance computing cluster for the Computer Science Department at Southern Illinois University (SIU), USA. This is intended as a research tool for all the departments in the school that may benefit from the available computing power.

Page 2: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

Motivation for a new formal framework for AOSE 253

Dr. Shahram Rahimi is an Associate Professor of Computer Science at Southern Illinois University (SIU)-Carbondale, USA. Prior to jointing SIU, he was a Visiting Assistant Professor at the University of Southern Mississippi, where he was a Co-director of a NIMA-NURI (DoD) sponsored project involving intelligent database agents for geospatial knowledge integration and management for over three years. Dr. Rahimi has been recently awarded two grants in the area of geospatial data integration and intelligent agents. His main research interests are multi-agent systems, distributed and high-performance computing, and soft computing. Dr. Rahimi is the Editor-in-Chief of the International Journal of Computational Intelligence Theory and Practice. He is the Associate Editor of Informatica Journal, Editor of International Journal of Computer Science and Applications (IJCSA), a member of the editorial board of Scalable Computing Journal and an Editor for Engineering Letters Journal. He has been selected as a chairman and member of the organising committee for several international conferences.

1 Introduction

The emergence of Agent-Oriented Software Engineering (AOSE) has been claimed as the obvious evolution of current software theory and practice (Jennings, 1999). AOSE provides a new paradigm for developing robust, network aware, adaptive, sophisticated, and more efficient software solutions. This comes at an obvious price in increased complexity. For e.g., the notion that an agent is autonomous makes it complicated to analyse its behaviour. Aspects like mobility and communication pose challenges whose solutions often involve multiple disciplines of computing as well as ideas from philosophy, ethics, biology, etc. The research community has responded with a range of frameworks, architectures, languages, and tools to deal with the analysis and development of Multi-Agent Systems (MAS). These are often categorised by their level of abstraction, sophistication, and features. Our contention is that the available theories and tools, specifically those that have a formal foundation, are inadequate for several reasons including: inability to address all aspects of MAS in a single framework, a disconnect between theory and practice, ease of use, etc. Each aspect has several sub-issues, and there is a growing need for a critical analysis of this field that will help in developing more mature frameworks and tools. This paper is a step in this direction. We first discuss the ideal characteristics a formal framework should possess followed by a review of available frameworks and related architectures, languages and tools. The Belief-Desire-Intention (BDI) model of cognitive agents in particular, has been popular for both modelling and implementing agent behaviour and we discuss its core features. Based on the above we perform a critical analysis of the state of the art and derive elements of motivation for a new framework for MAS. The second half of the paper discusses the new framework in brief, addressing the issues raised in the critique.

2 Background

Some background issues related to agents and formal languages and frameworks are presented in this section which will be relevant to the review in the next section.

Page 3: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

254 R. Ahmad and S. Rahimi

2.1 Formal methods for AOSE

The use of formal methods in software engineering has often been claimed as an integral part of overall software development. Although not adopted widely besides where the demand is on mission-critical and significantly complex software, the need for bringing formal methods as a standard component of the software development workflow is obvious: every mature field of engineering relies heavily on its mathematical foundation (Bowen, 2006).

Formal frameworks provide a mathematical foundation over which robust software can be built that is guaranteed to work properly upon deployment. Although a lot depends on how precise and accurate the requirements are from which the formal specification is built, once such a specification is available it can be confidently used for analysing actual system behaviour. This analysis could either be somewhat informal – such as graphical simulation – or verification by theorem proving, including proof search and model checking techniques. If the designer has intimate knowledge of the system’s real-life environment, performance evaluation and other secondary analyses are possible with the right detail of specification.

With the advent of MAS, software engineering as a field has taken a leap forward. AOSE is considered the next step in the field’s evolution and has been adopted to great success in various commercial software solutions (Belecheanu et al., 2006; Jennings, 1999; Mascardi et al., 2005). The strengths of AOSE are also the source of its complexity: Agent autonomy, proactive behaviour, a dynamic environment and the irregular nature of system composition, all contribute to a nondeterministic behaviour that cannot be predicted in its entirety during development. This becomes harder when all we have at hand are ad hoc techniques. Due to the unavailability of a mature and usable formal framework, most development of agent-based systems has been the result of an ad hoc process: Usually there is no formal or mathematical foundation at work that can assure the developer or the user with a high degree of confidence that the system will indeed ‘behave how it is supposed to’. It has often been argued that a wide-scale adoption of AOSE can only come about with the availability of high-level and sophisticated but easy to use specification, analysis, and development tools (Zhu, 2003; Kinny, 2005). In summary, formal system specification and analysis are crucial for furthering the cause of adopting AOSE and developing robust agent-based systems.

2.2 Characteristics of an ideal formal framework for AOSE

Due to the high degree of complexity and sophistication inherent in MAS, any formal framework that is used with the motivation outlined in Section 2.1 must fulfill certain core criteria. What follows is a list of such criteria that we deem crucial. It is a tall order and in practice can often lead to problems of competing requirements; this will become more apparent in Section 4.1 when we look at how the current research in the field measures up to these criteria.

2.2.1 Constructs for MAS specification

The obvious and probably most important criterion is the ability to faithfully model the components of a practical MAS. MAS require advanced modelling tools with proper level of abstraction to natively model concepts such as agents, grouping, and mobility.

Page 4: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

Motivation for a new formal framework for AOSE 255

It is a common observation that with the emergence of a new paradigm, there is a strong effort towards adapting old techniques and tools to the new paradigm. However, the more complex and revolutionary the new paradigm is, the stronger the chances that such an adoption will fail. Older tools that are used for specifying much simpler software systems can no longer fully satisfy the needs for abstraction that AOSE demands. For example, although it is possible to specify any type of system in a low-level formalism such as π calculus (it is Turing-complete), such an attempt would invariably lead to an excessively complex model for MAS, too difficult to analyse with the absence of sufficient high-level abstractions.

2.2.2 Operational semantics

System specification is half the story: proper operational semantics are required that will evaluate the temporal progress of a specification, i.e., demonstrate how a specified system will behave over time. This allows the system designer to analyse the behaviour of the system. Of course, the level of detail at which this analysis is done depends upon the detail of the specification. Availability of a complete semantics of a formal language serves at least two purposes. Using a faithful specification, a virtual simulation of the progress and evolution of the system (textual or graphical) can be observed: this in itself can be of tremendous benefit for system analysis. Also, the semantics serve as the foundation for more well-grounded analysis including verification, discussed next. A surprising number of the available tools for MAS are developed without any formal semantics.

2.2.3 Verification

As the ultimate functionality of a formal framework, it should either directly support verification of the specified systems, or expose an interface for a supplementary verification techniques to be plugged in such as model checking. Even techniques that are less sophisticated such as equivalence checking (structural or behavioural) can prove to be of great benefit. In MAS, verification has usually been dealt with using model checking (Bordini et al., 2003; Benerecetti et al., 1998; Bordini et al., 2006b) due to the popularity of the logic-based languages for BDI, some process-calculaic and other approaches have been proposed as well (Kinny, 2005; Fallah-Seghrouchni and Suna, 2004a). Verification of MAS is in an early though active phase of research though it has been gaining momentum in the last decade.

2.2.4 Comprehensive modelling capability

A formal framework that can be used for reasoning about practical agent-based systems should ideally provide for the specification and analysis of all the relevant aspects of agent-based systems. These aspects include, the behaviour of an individual agent – its proactive and reactive nature, mobility, autonomy; and the behaviour of the overall agent system – inter-agent communication, organisation and reorganisation of agent composition, and security.

Page 5: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

256 R. Ahmad and S. Rahimi

Although it is a difficult task to provide for a faithful specification of all these aspects under a single framework – the complexity is tremendous and the combination often leads to competing goals – it is necessary that if a formal framework aims to be used as a foundation for practical implementation, the specification itself should be complete. However, the nature of research in this complex field makes this necessity a rarity. Section 4.1 covers the incomplete nature of available frameworks in some detail.

2.2.5 Feasibility of translating theory to practice

Although there is a place for formal tools that are used solely to analyse properties of MAS and to reason about their behaviour, in the domain that we are concerned with, there should be a direct link from theory to implementable systems. For example, the concepts and abstractions employed in theory should have a equivalent mapping to tangible objects in practice. Also, the semantics of a formal language should be computationally tractable so that it can possibly be implemented as an interpreter or compiler. Ideally the semantics should have a direct correspondence to a high level language which can alleviate the complexity of composing a system specification in the more mathematical syntax of the formalism. Availability of a visual development environment based on the language would greatly enhance the chances of adoption by the industry.

2.3 The belief-desire-intention model

The BDI behavioural model of cognitive agents has been popular both among researchers and the industry in the MAS field. It has been inspired by the work of the philosopher Bratman et al. (1991) in the field of reasoning theory and later developed by Rao and Georgeff (1995) who gave a set of logics describing the BDI framework for agents. Part of its success is the simplicity with which it models agent behaviour. An agent is seen as having ‘mental attributes’ and ‘mental states’ which map directly to human reasoning and behaviour and therefore aids the designer or developer in specifying agent behaviour. Another advantage of taking a BDI approach is that agents are reactive in real-time and therefore better suited in developing mission critical agent-based systems (Busetta et al., 2003).

The beliefs of an agent represent its knowledge about itself and its environment. Desires (usually undistinguished from goals) constitute the agent’s motivations and guide its proactive behaviour. The set of desires state what an agent is attempting to achieve and is a symbol of its autonomy. Plans are a collection of procedural actions or steps that if successfully concluded will lead to the fulfillment of particular goals. Intentions are those plans that are currently active, in pursuit of some goals.

Besides the logics introduced by Rao and Georgeff and later developed by other researchers that primarily explore the theoretical aspects of BDI agents, several languages and frameworks have been introduced for building practical BDI-based agent systems. They often do not share the terminology and features of the initial logic-based theory and some of them may provide semantics, if any, in a different system such as Z.

More details about BDI will be explored in the later sections.

Page 6: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

Motivation for a new formal framework for AOSE 257

3 Survey of formal frameworks for MAS

Given the importance of formal methods for MAS, the research community has taken up the initiative on several fronts and adopted different approaches while doing so. In broad terms, these can be divided into two somewhat mutually-exclusive categories covered in this section. We will not deal with frameworks and languages without a real formal foundation; for more details on these tools refer to Bordini et al. (2006a) and Mascardi et al. (2005).

3.1 Formalisms for organisational specification

MAS tend to have a complex structure and composition: The number of agents, their dynamic creation and destruction, the evolving nature of inter-agent communication structure, possible mobility, and issues of coordination and cooperation between agents, all contribute to this complexity. Most of these issues cannot be resolved or predicted at design-time since the agents are blessed with autonomy, and emergence comes into picture. Traditionally, dynamic system structure has been studied best using formalisms that support concurrent computation such as Petri-Nets, Actor model, and process calculi. Process calculi that extend pi-calculus, with a well-grounded foundation based on communication, have been particularly popular for describing systems such as MAS with concurrent computing elements. Some efforts include: Ambient calculus, CLAIM, API-calculus, Seal calculus, and Nepi (Cardelli and Gordon, 1998; Fallah-Seghrouchni and Suna, 2004a; Rahimi et al., 2002; Castagna and Nardelli, 2002). Ambient calculus concentrates on representing the hierarchical organisation and mobility of agents in milieus and has been successful in attracting research to extend the basic calculus with security, communication, and typing. CLAIM is one of the more recent efforts: inspired by ambient calculus it provides support for modelling the behavioural aspects of agents as well (we will discuss CLAIM further in 4.1). API-calculus extends π calculus with notions of grouping, mobility, and a basic reasoning model. Seal calculus is a family of sophisticated calculi based on π calculus with the primary goal of specifying agent mobility in all its details (Castagna and Nardelli, 2002; Castagna et al., 2005). Nepi is a low-level programming language that extends π-calculus with some basic constructs, such as data types and more sophisticated communication abilities.

Although formalisms in this class are suitable in modelling organisation, composition, and communication aspects of MAS, for the most part they do not deal with reasoning, behaviour, and planning. Specifying the behaviour of the autonomous agents requires a framework for intelligence or behavioural representation such as the BDI model. The formalisms of the present class usually lack high-level constructs and semantics required for this purpose.

3.2 Formalisms for behavioural specification

Blessing software agents with autonomy gives them the ability to reason and exhibit independent behaviour. This translates into some level of intelligence in an agent’s behaviour. Modelling this intelligent behaviour has been the goal of this class of formal methods. Those that have gained prominence in this area have their foundation in logic, specifically multi-modal logic such as temporal and epistemic. The usual approach is to model agent behaviour through a set of its cognitive skills. This includes the seminal

Page 7: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

258 R. Ahmad and S. Rahimi

work done by Rao and Georgoff (1995) and Georgeff et al. (1999) on modal logics for the BDI model, which has been extended in several directions (Novák and Dix, 2006; Moreira and Bordini, 2002; Busetta et al., 2003; Busetta and Ramamohanarao, 1998b; Padgham and de Silva, 2004; De Silva, 2005; Ancona and Mascardi, 2004; Dignum et al., 2001; Guerra-Hernandez et al., 2004) and has also been used for practical agent frameworks with remarkable success (Morreale et al., 2005; Zhang and Huang, 2006; Dastani and Meyer, 2007; Busetta and Ramamohanarao, 1998b). Other notable efforts in behavioural specification using logic include Wooldrige’s (2000) and Fagin et al.’s (1984) individual work on modal logic for reasoning. Besides BDI-based research, there are some other formalisms that deal with agent behaviour. Vip, based on υ/ calculus (Kinny, 2002; 2005), provides a process calculus-based semantics of plan execution systems, with a finer detail than the regular BDI model. CAN, part of the Prometheus methodology, provides a comprehensive model for behaviour clearly inspired by BDI (Winikoff et al., 2002). The SLABS framework is worth mentioning also (Zhu, 2003). CLAIM (mentioned in the last sub-section) also provides basic behavioural modelling based on an event-model (Fallah-Seghrouchni and Suna, 2003; 2004a–b; Suna and Seghrouchni, 2005). Other examples can be referred to in Omicini et al. (2004) and Ferber and Gutknecht (1999), although none of them have gained prominence as a definitive model.

3.3 Other formalisms

There are few other formal methods for MAS that are not easily classified under any of the above classes. This includes the use of older software engineering specification languages such as ETL (Conrad et al., 1997) and Z (Luck and d’Inverno, 2006) for MAS specification. Certain practical agent architectures provide some level of formal specification, such as INGENIAS (Pavón and Gómez-Sanz, 2003) and PASSI (Cossentino and Potts, 2002). Also, there are several efforts for verification of agent communication (Eijk et al., 2003; Pitt, 2002) that form an important subset considering the complexity of communication in MAS.

4 Critique

4.1 Issues with current formalisms

Although we briefly touched on where the available formalisms fall short of the ideal requirements in the previous section, in the following this topic is explored in more detail. We also discuss some possible reasons as to why there is a dearth of an ideal formalism and mention some efforts towards this in current research.

4.1.1 Incomplete specification capability

The major issue with the available frameworks is that the majority focus on modelling certain specific aspects of MAS: reasoning and behaviour, mobility, computation, communication, or organisation and composition. The formalisms listed in Section 3 are individually capable of modelling certain specific aspects, but they either do not consider other aspects or they allow only a high-level, abstract view of them. For example, in

Page 8: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

Motivation for a new formal framework for AOSE 259

the traditional BDI model, there are several aspects of agency and MAS that are not comprehensively dealt with but were addressed in individual efforts later. As Ancona and Mascardi (2004) state: “Most related works for extending BDI are for logical formalization of the theory behind the extended BDI model rather than for complete specification of an implementable system.” The original BDI model was mainly concerned with reasoning about the behaviour of an individual agent and did not explicitly deal with the situatedness of an agent in a multiple-agent environment (later theoretical efforts such as Morley (1996) provide some useful extensions). Similarly, learning, an important topic in agent research, does not find any mention in the traditional BDI model (see Guerra-Hernandez et al., 2004 for an extension). Also, as addressed in Kinny (2005), the popular logic-based BDI formalisms do not allow detailed specification of agent computations such as plan execution, which are eventually left for the implementation stage – aspects which in fact can be very important when analysing agent behaviour.

In a broad sense, most formal frameworks either deal with the behaviour of the system (usually of an individual agent), or its dynamic organisation and composition. However, when dealing with the formal analysis of actual systems, a more comprehensive outlook is needed.

4.1.2 Disconnect between theory and practice

The major motivation behind developing a new formal framework is the unavailability of a framework that will lead system designers from formal specification and analysis to system implementation and deployment. There is a definite lack of capable frameworks satisfying this requirement. As Luck observes in this older but surprisingly relevant survey of the field (Luck, 1999), “. . . much work has tended to focus on either the development of practical applications of agent systems on the one hand, or the development of sophisticated logics for reasoning about agent systems on the other.” Specifically in the field of BDI research, the development of theory does not have a one-to-one correspondence with practical BDI frameworks: it is usually just the higher-level, abstract concepts that are in common. Most efforts at building a bridge deal with providing semantics of existing practical frameworks in formalisms such as Z. These include the work on providing semantics for AgentS-peak(L) (Rao, 1996; d’Inverno and Luck, 1998; Moreira and Bordini, 2002; Bordini et al., 2003), dMARS (d’Inverno et al., 1997), and 3APL (d’Inverno et al., 2000). Such sporadic efforts appear more as an afterthought and do not result in a final, seamless and comprehensive framework. CLAIM, although not in the BDI domain, attempts to fill in this gap and give a comprehensive modelling framework (Fallah-Seghrouchni and Suna, 2003). It provides a high-level language used for system specification that can be translated to a lower-level language – with formal semantics – and can also be interpreted for generating Java-based skeletal implementations. However, the actual strategy for translation to the lower-level language is not explained beyond stating that the two syntax have one-to-one correspondence. Also, the behavioural model is very basic and lacks features present in BDI-based frameworks. Another effort is SPARK (Morley and Myers, 2004) which provides a framework to develop real-world agent-based systems and provides a formal semantics for its specification language. However, the environment of an agent is not explored beyond representation as the ‘outside world’.

Page 9: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

260 R. Ahmad and S. Rahimi

A formal specification system for MAS satisfies this property if it has a system of formal semantics that can be easily interpreted and implemented (see Section 2.2). Pure syntactical efforts that only allow specification, although useful in their own way, have different motivations. In the words of Morley and Myers (2004), “an ideal agent system should combine the sophisticated representations and control of the more practical systems with principled semantics that enable reasoning about system behavior”.

4.1.3 Complex semantics

Related to the previous issue, complexity of semantics is a major deterrent for associating formal frameworks to a practical development workflow. This complexity of formal methods can be mitigated by providing practical high-level tools that are based on the theory but allow system designers to ignore the theoretical details. Indeed, one of the signs of maturity and adoption of any new technology is the gradual increase in the number of high-level tools that allow non-experts to use the technology without extensive knowledge of the underlying dynamics.

Most theoretical BDI frameworks have been proposed using multi-modal logic which although well suited for specifying the cognitive properties of agents, usually tend to be very complicated. They also assume that agents have near-infinite computational power, which is hardly the reality for most efficient agent systems. This has resulted in very few efforts at providing its semantics, and even fewer for building a robust verification theory (see Bordini et al., 2006b).

4.2 Issues specific to BDI related formalisms

Besides the general issues covered above, some issues specific to BDI-based formal frameworks are covered below.

4.2.1 System organisation and composition

As mentioned earlier, the motivation behind the BDI model is to be able to specify agent behaviour and not the composition of a whole agent system. Therefore ideas such as grouping, hierarchy, and mobility are not dealt with in the traditional model. The only work that we are aware of in this regard is the extension done for the TOMAS architecture (Busetta and Ramamohanarao, 1998a) which is built over the Java-based BDIM toolkit (Busetta and Ramamohanarao, 1998b), although it lacks any formal foundation.

4.2.2 Multiple agents support

In traditional BDI theory, the stress is on developing a behavioural theory for a single agent. Issues related to the agent’s ‘situatedness’ in a neighbourhood that includes other agents is not addressed explicitly. For example, the dynamics of communication between agents are not dealt with in any detail beyond the general idea of the occurrence of ‘events’. More importantly – from the point of view of behaviour modelling – awareness of other capable agents allows an agent to search for external capabilities in situations where it cannot satisfy a goal by itself. Indeed, it is this cooperation that alleviates the excesses of autonomy and therefore needs to be expressed expertly

Page 10: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

Motivation for a new formal framework for AOSE 261

in a behavioural theory like BDI. Coo-BDI gives a well-detailed extension to traditional BDI for cooperation (Ancona and Mascardi, 2004) but it does not provide any formal specification.

4.2.3 Learning

The concept of learning is given major significance in traditional AI. However, the BDI model by itself does not provide a structured mechanism for agents to have learning capabilities. Guerra-Hernandez et al. (2004) addresses this issue of learning in a MAS by extending BDI, although it is done using the practical framework of dMARS (d’Inverno et al., 1997), and does not refer to any formalisation of the concept.

4.2.4 Runtime plan construction and other plan execution details

Most formal and practical BDI-based systems simply drop active goals if they cannot be accomplished by using the available plans. This is partly due to the fact that goals are not represented explicitly in such systems and are instead implicit in the occurrence of events; if an event cannot be responded to with an available event handler (a plan), it is instantly dropped. Such an ephemeral event does not represent the original concept of a persistent goal. One aspect of expressing a persistent goal is to allow agents the flexibility to construct a plan at runtime when the available plan library is not useful. This obviously enhances the intelligence and autonomy of the agent. An agent may also choose to construct or modify plans using the capabilities of other agents as discussed earlier. Planning is a complex topic – specially for autonomous agents. Refer to Meneguzzi et al. (2007; 2004) and Móra et al. (2000) for some efforts towards combining the mature planning techniques with the BDI model.

4.3 Motivation for a new formal methods

The above review and critique has motivated our research in building a new formal framework for MAS that specifically addresses these issues. The rest of the paper gives a brief introduction to the new formalism. Although motivated and inspired by the frameworks mentioned above, the new language has been developed independent of any existing formalism for foundation.

5 A new formal framework for multi-agent systems

In the following we briefly present the new framework, named MAML (for Multi Agent Modeling Language), specially in contrast with the issues discussed in the last section. MAML is both an agent framework based on an extension of core BDI concepts, and a formal language for expressing agent systems based on the framework. The framework extends BDI to address issues raised in last section while the language provides high-level constructs for MAS specification and process-calculus based semantics. The theme of this presentation is to give a feature-based overview of the framework and language in order to justify the motivation behind MAML’s development. A more comprehensive discussion of the syntax and the semantics will be covered in an upcoming publication.

Page 11: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

262 R. Ahmad and S. Rahimi

5.1 Constructs of the MAS framework

The elements used for agent definition in MAML can be presented at two different, though related, levels: how these elements are viewed conceptually in the framework, and how these elements are constructed syntactically in the language.

Conceptually, the elements that constitute an agent in MAML can be broadly classified as one of the following two types:

1 Cognitive elements: They capture an agent’s proactive and reactive behaviour and define its motivation, reasoning, and executive capabilities. These include goals, plans, intentions, and capabilities. Every agent in MAML must include a set of these cognitive elements so that it can exhibit proper behaviour.

2 Informational elements: They represent the information an agent has about itself and its environment and therefore differ from agent to agent. For example, a seller agent will include elements such as an inventory list, a list of buyer agents, an account balance, etc.

Syntactically, both above types of element are extensions of the same basic language construct, belief. Therefore, in MAML an agent’s behavioural and informational elements have identical syntactic properties. For example, the same action that is used to add a new goal for the seller agent can also be used to add information about a new buyer to the buyer list. Furthermore for an agent, the collection of cognitive and informational belief elements completely defines the agent. This notion of belief is somewhat different from the traditional view in BDI formalisms – inspired by the philosophical notion of knowledge – where an agent’s behavioural elements are syntactically and conceptually different from its knowledge (the collection of all beliefs). The idea of a singular view of agent composition in MAML has several benefits and is explored in detail in Section 5.2.2.

Agents themselves are composed in hierarchical groups called clusters which are the building blocks of MAS organisation.

Before presenting some key aspects of MAML, we discuss the compositional details of MAML below.

5.1.1 Beliefs

Beliefs are at the core of the framework. The basic belief structure provides the foundation for representing an agent’s information about the world, as well as for its behavioural elements.

A belief can be either non-decomposable (an atom) or compound (a variable). The collection of all beliefs for an agent is referred to as its knowledge. Variables are composed of items which can be either beliefs or actions (actions themselves are not represented independently in knowledge). A belief can be associated with meta-data using types, which are themselves atomic beliefs. Types do not add expressiveness to the language by themselves, but do so in conjunction with the language semantics. Functionally, this meta-data is used for supporting several aspects of the framework: identifying belief owner in a multi-agent environment (i.e., if a belief does not belong to the local agent), asserting privacy control over individual beliefs, identifying state

Page 12: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

Motivation for a new formal framework for AOSE 263

changes in beliefs such as goals and plans, and in general for working with categorised beliefs. Also, a set of reserved types is used to construct extended beliefs that constitute the agent’s cognitive elements: its goals, etc.

5.1.2 Actions

Actions are the basic executive components of the language. The basic actions are related to either belief manipulation or agent mobility; compound actions based on these are used to express the executional details of plans, intentions, and capabilities. The basic actions are assert a belief, remove a belief, query for a belief, conditional, looping, and movement to a specific cluster. The add action also has a multi-agent version with the qualification that a belief asserted to a remote agent will be syntactically identified with the asserting agent. Besides passing information, the remote add action is used to trigger events in other agents. This event triggering is the basis of communication and reactive agent behaviour and is explored in detail later in the section. Actions can be composed sequentially or concurrently and can occur as elements of a variable (such as plans, capabilities, and intentions).

5.1.3 Goal

Goals specify the proactive behaviour of agents at the highest level. Syntactically, goal is a derived belief, i.e., it is a variable associated with a specific type, ‘γ’, which identifies it as a goal construct. Goals in MAML include both the declarative and the procedural aspects: the declarative aspect is a set of beliefs, called achieve belief, that must be part of the knowledge if the goal is to be achieved; and the goal plan represents the procedural aspect which defines the strategy to be used for goal achievement.1 Including the declarative aspect in the goal specification allows for reasoning about agent behaviour in detail while the procedural aspect makes the steps for goal achievement explicit (the relevance of including both these aspects is also discussed in Winikoff et al. (2002)). Other items that constitute a goal in MAML are: an abort condition, and a failure plan to be invoked in case of goal abortion.

5.1.4 Plan

A plan defines a strategy to achieve a goal. The executive item of a plan is its intention, which is variable whose elements are a set of actions. Besides the plan intention, the specification includes context beliefs which provide the condition without which the plan will not be initiated, achieve beliefs which advertise to plan-less goals what the plan can achieve, abort beliefs that state under what condition the plan will be aborted, and failure intention which is a set of actions to be executed when the plan fails for any reason.

5.1.5 Capability

A capability is a composition of actions and can be related to a function or subroutine in traditional programming. One of the main motivations for having a capability construct along with plans is that capability is the only high-level construct that can be shared between agents. Also, capability has a notion of being triggered, i.e., the event when its actions start executing. The elements of a capability are: conditions, a set of beliefs

Page 13: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

264 R. Ahmad and S. Rahimi

that provide the context, parameter, or trigger for the capability; effects, which specify the beliefs that the successful execution of the intention will bring about; and actions which is a composition of actions that are executed in order when the capability is triggered.

5.1.6 Cluster

A cluster is a group of agents that can be viewed as a collection based on some shared criteria, either physical or functional. For example, in a distributed system, each machine can be seen as a single cluster and clusters in a single network can be seen as another cluster. Similarly, agents can be combined based on their common functionality; agents sharing similar set of beliefs, or similar goals can belong to a common cluster. An agent can give other agents in its own cluster special preference regarding belief sharing, specially capabilities. Gaining access to these preferences is the primary motivation for agent mobility across clusters. Also, an agent can send broadcast messages to other agents in a cluster which simplifies communication amongst homogeneous agents.

5.2 Key aspects of the framework

In this section we cover some of the key features of the MAML framework. These features reflect the motivation behind its development and also the areas where it may offer benefits over other approaches. This section also serves to present how MAML’s language and framework measure up to the critique of formal MAS frameworks in Section 4.

5.2.1 BDI orientation

BDI has emerged as a popular and well-developed theoretical foundation for reasoning about agent behaviour. Although it does have certain shortcomings, specially when considering non-behavioural aspects of agents, it is a mature theory for representing proactive behaviour. The core concept of BDI – representing agent behaviour with cognitive constructs – is used in MAML. Agents are seen as primarily proactive: they have goals that they pursue, plans that are used for goal achievement, and intentions that represent the current activity that the agent is committed to act upon.

Most of the issues mentioned earlier regarding the BDI-related formalisms have been addressed in MAML. In many ways MAML adopts the philosophy of BDI and gains from the experience of previous efforts in the field. Most significantly, agent proactivity and reactivity is considered explicitly in context of a multiple agent system. One issue that MAML does not deal with currently is a direct representation of agent learning. However, with the extensible nature of the belief construct and the availability of belief manipulation actions, agent learning can be incorporated into the framework by extending the core language.

A major reason for developing MAML from the ground up, rather than as an extension of traditional BDI, is that although BDI serves a major purpose in MAML, it is not intended to be the core concept. Rather the BDI extension is a component of the underlying agent theory, along with the organisational and compositional aspects.

Page 14: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

Motivation for a new formal framework for AOSE 265

5.2.2 Belief programming

A key idea in MAML is the explicit and detailed representation of beliefs. The set of agent beliefs holds all information that an agent ‘knows’ about. All information is represented as beliefs and is referred together as the agent’s knowledge. Even executing actions do not store any information ‘inline’ – for example, any new variable an action may set up is entered as a belief into the agent’s knowledge. Incoming information from remote agents is asserted as beliefs in the knowledge as well.

The notion of belief and knowledge in MAML is somewhat different from that of epistemic logic – often used in logic-based BDI systems – where belief is more formally connected to its philosophical connotations. The use of beliefs in MAML is less restrictive; beliefs are representative of every aspect of an agent including its knowledge. Therefore, an agent’s goals, plans and capabilities are viewed as forms of beliefs (i.e., the agent must know what its goals, plans, and capabilities are) and are therefore derived syntactically from the basic form of belief. As mentioned earlier, this has the advantage that an agent can add, remove, and modify its goals, plans, etc., with the same basic actions that it uses for manipulating its regular information. This simplified view is at the core of MAML’s philosophy and drives almost every aspect of the semantics.

An important aspect of beliefs is their use as implicit events. Unlike most traditional BDI frameworks where events are explicitly represented as such, in MAML raising an event for an agent is simply the assertion or removal of beliefs. It is the occurrence of these implicit events that controls an agent’s reactive and proactive behaviour. Therefore, beliefs serve as the foundation for representing the agent behaviour.

MAML deals with beliefs for most purposes as a hierarchical collection of elements not very unlike XML documents. Besides the use of conditions in conditional actions, there is no other use of logic in MAML’s belief representation. The logic-based view, as used in some other formalism, allows for much more extensive reasoning of knowledge, though at the cost of complexity and often unrealistic execution semantics as discussed earlier. On the other hand, MAML allows for a more detailed view of beliefs – at least syntactically – which can be used for sophisticated reasoning with use of the belief manipulation actions.

Individual and compound beliefs in MAML can be ‘typed’ with metadata. As mentioned earlier, typing is the foundation of several other features of the language. For example, a type can be used for the purpose of classification of beliefs. It is this classification that allows the extension of basic beliefs. This classification is also used by an agent to exert access control over the beliefs in its knowledge: they can be made accessible to just the agent itself (local access), or to a group of agents.

5.2.3 Comprehensive modelling of MAS

The central premise in MAML is to present a single formal framework for modelling every relevant aspect of MAS is the most significant motivation behind its development. Below we discuss in brief how MAML addresses the different aspects of MAS.

Organisation

Agents in MAML are organised in groups called clusters, which themselves can be hierarchically composed within each other. Cluster provide the following functions:

Page 15: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

266 R. Ahmad and S. Rahimi

• Functional and logical grouping: Quite often, a collection of agents is seen as a collection exhibiting some functional or conceptual commonality. In MAML, these agents may be identified as a cluster which makes identification, communication, cooperation, and other aspects easier to model at the group level. Also, hierarchical grouping can provide a more sophisticated grouping opportunity for system designers than a flat, set-based grouping.

• Access control: In support of grouping, an agent can limit access to some of its beliefs to just those agents present in its parent cluster, or a collection of clusters.

• Mobility: An agent can migrate from its current cluster to any other. Proactively, the motivation for mobility may come from the access control that agents impose on their beliefs. For example, consider two agents A and B which operate in different clusters. If A wishes to use agent B’s capability bQ, which can only be accessed by agents in the same cluster as B, then A would need to migrate to B’s parent cluster to gain access to aQ.

Communication

Remote belief manipulation provides a simple means for communication between agents. Communication in MAML has the following different aspects:

• Relaying information: Asserting a new belief in another agent’s knowledge may be done solely for the sake of passing information. A belief asserted in such a manner will automatically be typed with the asserting agent’s name for identification and security purposes.

• Events: As mentioned earlier, communication between agents may lead to implicit events in the recipient agent: asserting a belief in an agent’s knowledge can trigger one of the receiving agent’s capability that would act as an event handler.

Agent behaviour

Agent behaviour in MAML is inspired by the basic BDI model of agent cognition.

• Proactive behaviour: The goals of an agent provide the motivation for proactive behaviour. Goals specify what an agent wishes to achieve and can optionally include an assigned plan which is committed towards that achievement. The agent’s ‘wish’ defines the declarative part, while the plan defines the operative part of goal statement. Having both aspects allows a richer goal definition leading to a distinct separation between goal and plan progress and better goal reasoning. Plans define the path to achieving a goal by using capabilities and sub-goals. Of course there may be several plans that may possibly achieve a goal, and it is the choice of the designer at designtime or the runtime plan construction procedure at runtime, to assign a particular plan to a goal. A capability includes a sequential or parallel set of actions and an action is the most basic executive component of agent behaviour.

• Reactive behaviour: An agent behaves reactively by processing events: a belief assertion (executed locally or by another agent) can trigger a capability which acts as the event handler.

Page 16: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

Motivation for a new formal framework for AOSE 267

• Runtime plan construction: A plan may be missing from the goal if it was not assigned one during the initial agent specification, or if the assigned plan fails during execution. The first step in case of a missing plan is to match what the goal’s desired state with what an available plan can achieve; if a matching plan is found then it is assigned to the goal. Otherwise the runtime construction procedure is initiated. The procedure is somewhat involved and is attempted as the last step in achieving a goal. It involves a two step process: first, the available capabilities are evaluated as to whether they can play a role in goal achievement at any stage, starting from the final stage that the goal wishes to achieve to the current state of the system. The capabilities evaluated may include those belonging to remote agents. Second, the relevant capabilities are composed together in a sequential or parallel fashion to produce a plan. In case there are stages in the goal achievement for which there are no available capabilities, they are delegated as sub-goals with the intention that plans or capabilities for achieving them may be available in future states of the agent. Of course the plan constructed in this manner may be more prone to failure and the procedure itself may be inefficient, but it is presented as a last resort towards goal achievement.

5.2.4 Theory and practice

The formal MAML specification of a system can be easily translated to a functionally analogous version implemented in a high-level language. Towards this end the development of MAML is geared towards making the language accessible for practical purposes besides formal analysis. Actions in MAML, specially those related to belief programming, can be seen as simple methods of a high-level language, while a group of simple methods can be seen as a capability. All belief constructs can have a parallel implementation in an object-oriented language. As the first step towards developing a practical model for MAML, we are currently working on an interpreter of the semantics that would translate the formal specification into an XML-based description. Eventually, this would then be used to drive a UML-based tool to generate a skeletal system in an object-oriented language like Java.

Our goal is towards a platform for developing MAS based on the formal MAML specification but with the assistance of graphical tools for composition and observation of system progress.

5.3 Informal semantics

Although a detailed operational semantics of the language is not possible in the length of the current paper, the following gives an overview of the semantics with the help of an example. The intention behind this section is to provide an overview of the language and how it can be used to model a simple system. Majority of the syntax used in this section mirrors the original athough simplification is made wherever necessary.

5.3.1 An illustrative multi-agent system

A multi-agent system representing a simple market spread over two cities is used as the example. The market consists of two kinds of agent: CustomerAgent and SellerAgent. There are two cities in the system modelled as clusters CityA and CityB. Each city has a

Page 17: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

268 R. Ahmad and S. Rahimi

single seller agent, SA and SB respectively. There are multiple customer agents in each city: CA1, CA2, CA3 in CityA, and CB1, CB2, and CB3 in CityB. The CustomerAgents share a similar basic composition, which can be written in its skeletal form as:

CA, B1,2,3

:: Goals :: finishShopping[] : γ, status

Plans :: shopLocal[] : π, status;

shopRemote[] : π, status

Capabilities :: pay[] : φ

BB :: balanceAmount[], shoppingList[]

A customer has a single goal, typed γ that directs its proactive behaviour to accomplish its shopping; two plans, typed π that will attempt to buy the next item on the shopping list either locally and in another city respectively; and a capability, typed φ that can be used to pay for an item. Both goals and plans have a type status, which indicates its current state. The above are part of the agent’s knowledge along with at least two other belief variables: one that stores the balance left to shop with and the other a list of items to shop for.

Similarly, SellerAgents share the composition:

SA, SB :: Goals :: keepInventoryStocked[] : γ, status

Plans :: inventoryUpdate[] : π, status

Capabilities :: handleRequests[] : φ,

sellItem[] : φ, cluster

BB :: itemsSelling[], balanceAmount[], . . .

A seller has a single goal for keeping its inventory stocked (therefore it differs from the finishShopping goal in that it is geared towards maintenance rather than achievement); a single plan that is employed by this goal; two capabilities to handle queries for whether an item is available for sale and to sell an item; and at least two other beliefs: a list of items available for sale, and the balance amount. The type cluster associated with handleRequests[] restricts triggering of this capability by only the agents in the same cluster as the seller agent. Therefore, only customers in the same city as the seller can handle sale requests.

We now consider some aspects of MAML that can be illustrated by the above system’s progress. This is not intended to be comprehensive but rather it is provided in order to give the idea behind the framework’s philosophy.

Initiation of proactive behaviour

Consider the customer agent CA1 in cluster A. Like other customer agents, it has the finishShopping goal which drives its proactive behaviour. Its core structure is:

Page 18: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

Motivation for a new formal framework for AOSE 269

finishShopping :: [ [0]]AB shoppingList /

AbB[cancelShopping]

Pg [shopLocal[]]

Pf [0]/

: γ

Therefore the goal will be considered achieved when the shoppingList variable does not have any elements, i.e., the shopping is complete. Initially this variable has the structure:

shoppingList[milk[2], eggs[12], bread[1]]

with each element of the variable being an item on the list, and each element has a numeric atom that holds the quantity desired. The goal will abort on the condition that a belief, cancelShopping, is asserted in the knowledge. However, the goal does not have a failure plan that may be activated in case of an abortion. It has an assigned plan shopLocal (which has its own abort condition) that will attempt to achieve this goal. The lifecycle of a goal is identified by the status type. For example, initially the goal is inactive, and will appear in the knowledge as finishShopping[] : γ, inactv. Since the abort conditions do not hold, its Pg is initiated, and both the plan and the goal become active.

Multiple plans are expected to be available for a goal to choose from. A plan may be assigned to a goal at design time if there is enough information available. If a goal does not have an assigned plan at execution stage, a plan is searched for – plans are matched to a goal based on whether their achieve beliefs are in concordance.

The plan shopLocal has the following composition:

shopLocal :: [ [0]]AB shoppingList /

CB[shoppingList[]]

AbB[noLocalSeller]

I[shopLocalI[]]

If [+(shopRemoteOnly)]

: φ

The achieve belief (AB) is the same as the parent goal – for a plan to be accepted by a

goal it is necessary that AB(Goal) ⊂ AB(Plan). The context belief (CB) requires a belief

variable shoppingList to be available before the plan becomes active. The plan aborts (AbB) in case there is no local seller available. After activation, the plan starts executing actions listed in the intention shopLocalI and if the plan aborts it will assert a belief shopRemoteOnly that will qualify future shopping attempts.

5.3.2 Remote communication and events

The first action of intention shopLocalI is +(lookingFor[shoppingList[1]]; SA) which asserts the first item in shopping list to the seller agent SA’s knowledge as an element of a new variable lookingFor. The asserted belief includes the asserting agent’s name as a special type, for e.g., lookingFor[milk, 2]; CA1, that will be required for identification

Page 19: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

270 R. Ahmad and S. Rahimi

later. In case CA1 could not identify the seller agent by name, it could do a broadcast to all agents in the cluster with the action +(lookingFor[shoppingList[1]]; thisCluster) which will assert the belief to all agents in the current cluster; if there were multiple seller agents they could be intimated by the +(lookingFor[shoppingList[1]]; SA1, SA2,…) action.

Assertion of a belief in a local or remote knowledge is equivalent to raising a possible event if there is a capability that will be asserted by the belief assertion. The handleRequests capability in Sa has the composition:

handleRequests :: C[lookingFor[]]

E[itemsSelling[]]

Acts[. . .]

and since the only condition (C) is the presence of a belief lookingFor, the capability is triggered at this time. This implies the execution of the sequence of actions in the capability’s Acts which is given in a simple form as:

Acts ::if(?(lookingFor[1] ∈ itemsSelling[]

AND lookingFor[2] ≤ itemsSelling[lookingFor[2]])

then +(itemAvailable[lookingFor[1]];

?agent(lookingFor[]))

else ( [0];itemAvailable / ?agent(lookingFor[])))

The above sequence will check whether the item queried for is available and if the quantity is adequate; if so an itemAvailable variable is asserted with the item’s name in agent CA1’s knowledge, otherwise an empty variable is asserted (?agent queries for the asserting agent’s name).

Assuming that SA responds with a non-empty itemAvailable assertion, CA1 will continue its shopping procedure from SA. The intention shopLocalI’s next set of actions will check the itemAvailable variable for a positive response from the seller agent. If so it will trigger the agent’s own pay[] capability to complete the transaction. After successful purchase of the first item, the plan will iterate through the rest of the elements in the shoppingList variable. If shopLocalI exhausts its actions, then the plan would attain the ‘achieved’ state and thus finish successfully. At this point ideally the goal will also transition into the ‘achieved’ state, but this transition is not automatic after plan achievement: in fact the goal will be ‘achieved’ if and only if its AB holds true. Therefore after plan exhaustion, there is a final check made to ensure that the goal’s condition hold true by itself.

5.3.3 Plan and goal failure

If CA1 receives an empty itemAvailable variable from SA, shopLocalI recognises the failure of the current plan and performs the action +(noLocalSeller) which results in the abortion2

of the current plan since its abort belief holds true now; the plan state changes to ‘abort’. With the abortion the failure intention, If asserts +(shopRemoteOnly) which will aid the adoption of the secondary plan. Due to the separate definition and existence

Page 20: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

Motivation for a new formal framework for AOSE 271

of plans and goals, the failure of a plan does not automatically lead to the corresponding goal’s failure. The finishShopping goal has the opportunity to search for an alternate matching plan. The second plan shopRemote has the structure:

shopRemote :: [ [0]]AB shoppingList /

CB[shoppingList[], shopRemoteOnly]

AbB[noRemoteSeller]

I[shopRemoteI[]]

If [0]/

: φ

Since its achieve belief matches that of the goal, and its context beliefs hold true it is adopted by the goal as its Pg. The working of the new plan will be covered later, but a few points regarding goal failure are relevant here: in case the shopRemote failure was not available, the goal would have aborted. Goal abortion changes the goal state to ‘abort’; in this state the failure plan Pf, if any, is adopted to perform any necessary clean-up. After completion of Pf, unlike plans which end their execution at this point, goal returns to its ‘inactive’ state until it can find another plan to adopt. Of course, besides abortion due to non-availability of a plan, the goal can also abort if its abort belief hold true at any point. The same holds true regarding its transition to the ‘achieved’ state: it can do so at any point in the progress of the system if its achieve beliefs hold true. Which bring us to an important property of goal in this framework: goal achievement may or may not be a result of its Pg entering the ‘achieved’ state and goal failure may not be an (indirect) result of its Pg failure.

5.3.4 Inter-cluster interaction and mobility

Continuing from the last section, if the shopRemote plan is adopted, its shopRemoteI intention starts execution. We will consider the actions concisely: in order to query remote agents, the first action needs to assert the lookingFor belief in remote clusters. There are three cluster-realted assertion actions: +(b; thisCluster), which asserts to all agents in the current cluster to which the agent belongs; +(b; upClusters{}), which recursively asserts to agents in clusters that are organisationally superior to the current cluster; and +(b; downClusters{}), which recursively asserts to agents in clusters inferior to the current cluster. Since the only remote cluster that can be queried is a sibling to the current one, +(lookingfor[shoppingList[1]]; upClusters{}) is used. This asserts the variable to agents in CityB including SB. Since agent SB has a similar structure to SA, its handleRequests capability will be triggered by this event and will respond in a similar manner. If it has the requested item it will assert a positive response which will appear in CA1 as itemAvailable[someItem]; up[CityB{SB}]; the belief is appended by a type that identifies agent SB’s position relative to CA1’s.

After receiveing a positive response, agent CA1 will now send the request as earlier for sale by triggering SB’s sellItem capability. However, since this sellItem is accessible only to agents in CityB (it is typed as cluster in the definition), CA1 will receive a negative response to signify this. At this stage, CA1 will move from its current location to CityB by the action move(SB), i.e., move to the same cluster as SB which is equivalent to

Page 21: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

272 R. Ahmad and S. Rahimi

specifying the cluster name: move(up{CityB}). Doing this will allow CA1 to buy the item from the remote seller (the situation becomes obviously more complex if there are other goals and intentions that are active and have allegiance to the current cluster).

5.3.5 Other aspects

There are several other aspects that have been omitted in the above discussion. These include: typing of agents to provide finer-grained organisation than the cluster level; issues of concurrency of goals, intentions, and capabilities; runtime plan construction for goals; details regarding the ‘formal’ aspect of the language: detailed semantics, congruence (structural and behavioural), behaviour of maintenance goals.

6 Conclusions and future work

Our current work is the first step towards developing a framework and language for the faithful representation and analysis of MAS. The framework has several benefits over other formal frameworks for MAS, and addresses the core issues with them as detailed in Section 5.2. This paper is intended mainly as a justification for developing this framework, specially because there is not a dearth of frameworks and languages for MAS. We believe that not our work will not only fill a void in the available technologies related to developing MAS, but will also aid in exploring aspects of MAS concepts that would not have been possible earlier.

6.1 Future work

In continuation of the work presented in this paper, we are working on a mature platform based on the MAML framework for MAS development and analysis. The core of this platform will be a high-level declarative language (HMAML) for MAS specification that can be compiled to the low-level MAML syntax and also be interpreted to a high-level object-oriented language. The components of the proposed platform includes:

1 a graphical MAS specification engine that will allow a high-level and efficient approach to MAS design. The MAML syntax is well suited for system specification, but using it for specifying the composition and behaviour of large MAS will be a time consuming process. The specification engine will allow systems described in HMAML by compiling it to MAML. HMAML will include high-level constructs that will abstract details of the MAML syntax. Also, a graphical interface built over HMAML will allow an even more abstract view. The graphical interface will be specially useful for analysing the system composition and communication structure at an initial stage of development. It will also give a useful overview of the system at a glance – something that is hard to accomplish with a textual description.

2 an analysis engine that can be used to evaluate a system description passed on by the specification engine. The operational semantics of MAML can be employed for analysis using two complimentary processes:

Page 22: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

Motivation for a new formal framework for AOSE 273

• graphical analysis: by using the graphical representation a temporal view of system behaviour can be presented in an animated fashion. Such a dynamic and high-level, though informal, view of system progress can be invaluable in gaining insight about system characteristics.

• formal analysis: more formal verification techniques such as structural/behavioural congruence, and model-checking can be built over the MAML syntax (currently, we have an automated mechanism for structural congruence checking only).

3 a MAS implementation and deployment environment where the formal system specification is automatically translated to a skeletal definition in an object-oriented language such as Java. This definition can then be implemented in detail manually to produce a deployable agent-based system. We are working on a translation scheme to map agents and agent-based systems from MAML to the Java-based JADE platform for deployment.

References

Ancona, D. and Mascardi, V. (2004) ‘Coo-bdi: extending the bdi model with cooperativity’, Declarative Agent Languages and Technologies, pp.109–134.

Belecheanu, R.A., Munroe, S., Luck, M., Payne, T., Miller, T., McBurney, P. and Pchou, M. (2006) ‘Commercial applications of agents: lessons, experiences and challenges’, AAMAS ’06: Proceedings of the Fifth International Joint Conference on Autonomous Agents and Multiagent Systems, New York, NY: ACM Press, pp.1549–1555.

Benerecetti, M., Giunchiglia, F. and Serafini, L. (1998) ‘Model checking multiagent systems’, Journal of Logic and Computation, Vol. 8, No. 3, pp.401–423.

Bordini, R., Fisher, M., Pardavila, C. and Wooldridge, M. (2003) ‘Model checking agentspeak’, Proc. 2nd Int. Joint Conf. on Autonomous Agents and Multi-Agent Systems, pp.409–416.

Bordini, R.H., Braubach, L., Dastani, M., Seghrouchni, A.E.F., Sanz, J.J.G., Leite, J., O’Hare, G., Pokahr, A. and Ricci, A. (2006a) ‘A survey of programming languages and platforms for multiagent systems’, Informatica, Vol. 30, pp.33–44.

Bordini, R.H., Fisher, M., Visser, W. and Wooldridge, M. (2006b) Verifying Multi-agent Programs by Model Checking, Kluwer Academic Publishers, Vol. 12.

Bowen, J.P. (2006) ‘Ten commandments of formal methods ...ten years later’, Computer, Vol. 28, No. 4, pp.56–63.

Bratman, M.E., Israel, D. and Pollack, M. (1991) ‘Plans and resource-bounded practical reasoning’, in R. Cummins and J.L. Pollock (Eds.) Philosophy and AI: Essays at the Interface, Cambridge, MA: The MIT Press, pp.1–22.

Busetta, P., Bailey, J. and Kotagiri, R. (2003) ‘A reliable computational model for bdi agents’, 1st International Workshop on Safe Agents, ACM Press.

Busetta, P. and Ramamohanarao, K. (1998a) ‘An architecture for mobile BDI agents’, Selected Areas in Cryptography, pp.445–452.

Busetta, P. and Ramamohanarao, K. (1998b) ‘The BDIM agent toolkit design’, Technical Report 97/15.

Cardelli, L. and Gordon, A. (1998) ‘Mobile ambients’, in M. Nivat (Ed.) Proceedings of the First International Conference on Foundations of Software Science and Computation Structure, Lecture Notes In Computer Science, Vol. 1378, pp.140–155.

Page 23: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

274 R. Ahmad and S. Rahimi

Castagna, G. and Nardelli, F. (2002) ‘The seal calculus revisited: contextual equivalence and bisimilarity’, FST TCS ’02: Proceedings of the 22nd Conference Kanpur on Foundations of Software Technology and Theoretical Computer Science, Springer-Verlag, pp.85–96.

Castagna, G., Vitek, J. and Nardelli, F.Z. (2005) The Seal Calculus, Academic Press, Inc., Vol. 201.

Conrad, S., Saake, G. and Türker, C. (1997) ‘Towards an agent-oriented framework for specification of information systems’, in A. Cesta and P-Y. Schobbens (Eds.) ModelAge 97, Proceedings of the 4th ModelAge Workshop on Formal Models of Agents, Certosa di Pontignano, Italy, 15–17 January 1997, National Research Council of Italy, Institute of Psychology, pp.269–282.

Cossentino, M. and Potts, C. (2002) ‘A case tool supported methodology for the design of multi-agent systems’, The 2002 International Conference on Software Engineering Research and Practice SERP’02, Las Vegas, Nevada, USA.

Dastani, M. and Meyer, J-J. (2007) ‘A practical agent programming language’, 5th International Workshop, ProMAS 2007, Honolulu, Revised and invited papers, Vol. 4908 of Lecture Notes in Computer Science, Springer.

De Silva, L.P. and Padgham, L. (2005) ‘Planning on demand in BDI systems’, Proceedings of ICAPS-05, Poster.

Dignum, F., Kinny, D. and Sonenberg, L. (2001) ‘Formalizing motivational attitudes of agents: on desires, obligations and norms’, in B. Dunin-Keplicz and E. Nawarecki (Eds.) Second International Worskhop of Eastern Europe on Multi-Agent Systems, pp.61–70.

D’Inverno, M., Hindriks, K.V. and Luck, M. (2000) ‘A formal architecture for the 3apl agent programming language’, ZB 2000: Formal Specification and Development in Z and B: First International Conference of B and Z Users, pp.168–187.

D’Inverno, M., Kinny, D., Luck, M. and Wooldridge, M. (1997) ‘A formal specification of dMARS’, Agent Theories, Architectures, and Languages, pp.155–176.

D’Inverno, M. and Luck, M. (1998) ‘Engineering agentspeak(l): a formal computational model’, Journal of Logic and Computation, Vol. 8, No. 3, pp.233–260.

Eijk, R.M.V., Boer, F.S.D., Hoek, W.V.D. and Meyer, J-J.C. (2003) ‘A verification framework for agent communication’, Autonomous Agents and Multi-Agent Systems, Vol. 6, No. 2, pp.185–219.

Fagin, R., Halpern, J.Y. and Vardi, M.Y. (1984) ‘A model theoretic analysis of knowledge’, Proceedings of the Twenty-Fifth Annual Symposium on the Foundations of Computer Science, pp.268–278.

Fallah-Seghrouchni, A.E. and Suna, A. (2003) ‘An unified framework for programming autonomous, intelligent and mobile agents’, Multi-Agent Systems and Applications III: 3rd International Central and Eastern European Conference on Multi-Agent Systems, CEEMAS 2003, Prague, Czech Republic, 16–18 June, Proceedings, p.353.

Fallah-Seghrouchni, A.E. and Suna, A. (2004a) ‘Claim: a computational language for autonomous, intelligent and mobile agents’, Programming Multi-Agent Systems, pp.90–110.

Fallah-Seghrouchni, A.E. and Suna, A. (2004b) ‘Programming mobile intelligent agents: an operational semantics’, IAT ’04: Proceedings of the Intelligent Agent Technology, IEEE/WIC/ACM International Conference on (IAT’04), Washington, DC: IEEE Computer Society, pp.65–71.

Ferber, J. and Gutknecht, O. (1999) ‘Operational semantics of multi-agent organizations’, Agent Theories, Architectures, and Languages, pp.205–217.

Georgeff, M., Pell, B., Pollack, M., Tambe, M. and Wooldridge, M. (1999) ‘The belief-desire-intention model of agency’, in J. Müller, M.P. Singh and A.S. Rao (Eds.) Proceedings of the 5th International Workshop on Intelligent Agents V: Agent Theories, Architectures, and Languages (ATAL-98), Heidelberg, Germany: Springer-Verlag, Vol. 1555, pp.1–10.

Page 24: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

Motivation for a new formal framework for AOSE 275

Guerra-Hernandez, A., Fallah-Seghrouchni, A.E. and Soldano, H. (2004) ‘Learning in bdi multi-agent systems’, Computational Logic in Multi-Agent Systems, pp.218–233.

Jennings, N.R. (1999) ‘Agent-oriented software engineering’, in F.J. Garijo and M. Boman (Eds.) Proceedings of the 9th European Workshop on Modelling Autonomous Agents in a Multi-Agent World : Multi-Agent System Engineering (MAAMAW-99), Heidelberg, Germany: Springer-Verlag, Vol. 1647, pp.1–7.

Kinny, D. (2002) ‘Vip: a visual programming language for plan execution systems’, AAMAS ’02: Proceedings of the First International Joint Conference on Autonomous Agents and Multiagent Systems, Bologna, Italy: ACM Press, pp.721–728.

Kinny, D. (2005) ‘Algebraic specification of agent computation’, Applicable Algebra in Engineering, Communication and Computing, Vol. 16, No. 2, pp.77–111.

Luck, M. (1999) ‘From definition to deployment: what next for agent-based systems?’, Knowledge Engineering Review, Vol. 14, No. 2, pp.119–124.

Luck, M. and d’Inverno, M. (2006) Formal Methods and Agent-based Systems, NASA Monographs in Systems and Software Engineering, Springer.

Mascardi, V., Demergasso, D. and Ancona, D. (2005) ‘Languages for programming BDI-style agents: an overview’, in F. Corradini, F.D. Paoli, E. Merelli and A. Omicini (Eds.) Proceedings of WOA 2005: Dagli Oggetti agli Agenti. 6th AI*IA/TABOO Joint Workshop ‘From Objects to Agents’, Bologna: Pitagora Editrice, pp.9–15.

Meneguzzi, F.R., Zorzo, A.F. and da Costa Móra, M. (2004) ‘Mapping mental states into propositional planning’, Proceedings of the 3rd International Joint Conference on Autonomous Agents and Multiagent Systems, ACM Press.

Meneguzzi, F.R., Zorzo, A.F., Mora, M.D.C. and Luck, M. (2007) ‘Incorporating planning into bdi systems’, Scalable Computing: Practice and Experience, pp.15–28.

Móra, M.C., Lopes, J.G., Viccari, R.M. and Coelho, H. (2000) ‘Bdi models and systems: reducing the gap’, Intelligent Agents V. Agent Theories, Architectures, and Languages: 5th International Workshop, ATAL’98, Paris, France, July 1998, Proceedings, pp.11–27.

Moreira, A. and Bordini, R. (2002) ‘An operational semantics for a bdi agent-oriented programming language’, Proc. Workshop on Logics for Agent-Based Systems (LABS-02), Held in Conjunction with the Eighth International Conf. on Principles of Knowledge Representation and Reasoning, Toulouse, France, 22–25 April, pp.45–59.

Morley, D. (1996) ‘Semantics of BDI agents and their environment’, PRICAI Workshop on Intelligent Agent Systems, pp.119–134.

Morley, D. and Myers, K. (2004) ‘The spark agent framework’, Proc. of AAMAS’04, pp.714–721.

Morreale, V., Bonura, S., Francaviglia, G., Puccio, M., Centineo, F., Cammarata, G., Cossentino, M. and Gaglio, S. (2005) ‘Practitionist: a framework for developing bdi agent systems’, Proceedings of the Third European Workshop on Multi-Agent Systems (EUMAS’05), pp.236–242.

Novák, P. and Dix, J. (2006) ‘Modular bdi architecture’, AAMAS ’06: Proceedings of the Fifth International Joint Conference on Autonomous Agents and Multiagent Systems, New York, NY: ACM Press, pp.1009–1015.

Omicini, A., Ricci, A., Viroli, M., Castelfranchi, C. and Tummolini, L. (2004) ‘Coordination artifacts: environment-based coordination for intelligent agents’, in N. Jennings and M. Tambe (Eds.) AAMAS ’04: Proceedings of the Third International Joint Conference on Autonomous Agents and Multiagent Systems, Washington, DC: IEEE Computer Society.

Padgham, L. and de Silva, L. (2004) ‘A comparison of bdi based real-time reasoning and htn based planning’, AI 2004: Advances in Artificial Intelligence, pp.1167–1173.

Pavón, J. and Gómez-Sanz, J. (2003) ‘Agent oriented software engineering with ingenias’, Multi-Agent Systems and Applications III: 3rd International Central and Eastern European Conference on Multi-Agent Systems, CEEMAS 2003, Prague, Czech Republic, 16–18 June, Proceedings, pp.1069–1078.

Page 25: Motivation for a new formal framework for agent-oriented software engineeringrahimi/papers/12.pdf · 2.1 Formal methods for AOSE The use of formal methods in software engineering

276 R. Ahmad and S. Rahimi

Pitt, J. (2002) ‘An operational semantics for intentional specifications of agent behaviour in communication protocols’, Technical Report, Intelligent and Interactive Systems, Department of Electrical and Electronic Enginering Imperial College of Science, Technology and Medicine.

Rahimi, S., Cobb, M., Ali, D. and Petry, F. (2002) ‘A modeling tool for intelligent-agent based systems: Apicalculus’, Soft Computing Agents: A New Perspective for Dynamic Systems, the International Series, IOS Press, pp.165–186.

Rao, A.S. (1996) ‘AgentSpeak(L): BDI agents speak out in a logical computable language’, in R. van Hoe (Ed.) Seventh European Workshop on Modelling Autonomous Agents in a Multi-Agent World, Eindhoven, The Netherlands.

Rao, A.S. and Georgeff, M.P. (1995) ‘BDI-agents: from theory to practice’, Proceedings of the First Intl. Conference on Multiagent Systems, San Francisco.

Suna, A. and Seghrouchni, A.F. (2005) ‘Claim and Sympa: a programming environment for intelligent and mobile agents’, Multi-Agent Programming, pp.95–122.

Winikoff, M., Padgham, L., Harland, J. and Thangarajah, J. (2002) ‘Declarative and procedural goals in intelligent agent systems’, Proceedings of the Eighth International Conference on Principles of Knowledge Representation and Reasoning (KR2002), pp.470–481.

Wooldridge, M. (2000) Reasoning About Rational Agents, Cambridge, MA: The M.I.T. Press.

Zhang, H. and Huang, S.Y. (2006) ‘A general framework for parallel bdi agents’, Intelligent Agent Technology, IAT ’06. IEEE/WIC/ACM International Conference, pp.103–112.

Zhu, H. (2003) A Formal Specification Language for Agent-Oriented Software Engineering, Melbourne, Australia: ACM Press.

Notes

1 This is another difference between MAML and other BDI-based frameworks: rather than goals being implicit in the occurrence of events, they are explicitly represented in MAML.

2 Abort and failure are equivalent terms in the framework.