Juan 2002 Roadmap
Juan 2002 Roadmap
Juan 2002 Roadmap
Leon Sterling
tlj@cs.mu.oz.au ABSTRACT
pearce@cs.mu.oz.au
leon@cs.mu.oz.au
This paper is concerned with improving the software engineering of agent-based open systems. It critiques the existing Gaia methodology in the light of a motivating example of intelligent home networks. It describes the ROADMAP1 methodology, which extends Gaia with four improvements - formal models of knowledge and the environment, role hierarchies, explicit representation of social structures and relationships, and incorporation of dynamic changes.
modeling and designing open systems. The high level and knowledge oriented view of agents makes them a natural abstraction to allow modularization of knowledge in the system. Methodologies for Agent Oriented Software Engineering are beginning to emerge. [5,15] survey current methodologies and approaches. On the whole, agent-oriented methodologies are immature. They lack some important capabilities to facilitate the development of complex open systems. They remain to be tested to see if they scale for large systems. One important missing capability is run-time reflection, which enables the dynamic change of system behavior. Perhaps the most developed agent-oriented software engineering methodology is Gaia [17]. We extend the methodology to allow better engineering of open systems. We discuss the improvements needed in the light of a motivating example, an intelligent networked home. Section 2 introduces the home network system. Section 3 reviews existing methodologies, concentrating on Gaia. Section 4 describes ROADMAP, and its extensions to Gaia. Section 5 focuses on the models and procedures of the specification and analysis phase. Section 6 discusses the models and procedures for the design phase. Section 7 provides example artifacts of the extended models based on the motivating example. Section 8 discusses related work and Section 9 concludes.
General Terms
Design, theory.
Keywords
Agent oriented software engineering, methodology, multi-agent system, agent organization, open system, knowledge model.
1. INTRODUCTION
Software has been usually developed under the assumptions that all system requirements must be determined and frozen during the analysis stage, and any factors to be accounted for at run-time must be anticipated and designed for during the design stage. These assumptions are problematic from two perspectives. Firstly they unnecessarily constrain complex open systems [8,12]. Secondly, they are difficult to enforce during all stages of development. There is an increasing demand for open systems in the industry [1,9,13,18]. A methodology that provides appropriate support for engineering large-scale open systems is significant and useful. Multi-Agent Systems (MAS) [10,14,16] are intended to adapt to unexpected situations. They are an appropriate abstraction for __________________
1
ROADMAP is an acronym for Role Oriented Analysis and Design for Multi-Agent Programming.
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. AAMAS 02, July 15-19, 2002, Bologna, Italy. Copyright 2002 ACM 1-58113-480-0/02/0007$5.00.
with an agent maintaining the family profile will point out that the stranger is neither a family member nor a friend. Other agents will cooperate to deduce that the current visit is not scheduled, and the strangers behavior is a security concern. The system will attempt to query any device the stranger is carrying to determine identity. The owner of the house will be notified through the most appropriate channel, for example, the mobile phone or a PC at work, with the video feed. Family members and scheduled visitors might receive warning to stay away temporarily. Meanwhile the agents will protect the house, temporarily deadlock the windows, the doors, the car and the safe. Confidential files on the local PCs are encrypted or removed; outbound access to the Internet is disabled. Local software agents will cooperate with software agents of the police to report the incident, and provide images so the suspect can be identified. A police officer may talk directly to the suspect over the Internet, with microphones and speakers installed in the room. If an arrest is required, the system will provide the floor plan and details of the house to the police agent planning the arrest. The system will also provide the exact location of the suspect as he moves and the video feed to the PDAs carried by the arresting officers. Obviously issues such as user privacy have to be carefully considered. There are interesting and implicit social relationships in the scenario, that determine which agent receives which piece of information. There are scalability concerns, as a potentially large number of events might need to be handled. In general, issues arising from such systems are outside the traditional domain of Agent Oriented Software Engineering.
do not address the characteristics of architectural independence, robustness and scalability adequately. In particular, there has been insufficient coverage on facilitating the specification of dynamic social interactions.
Figure 1. The Gaia Models In the analysis phase, the role model and the interaction model are constructed. The two models depict the system as interacting abstract roles. These two models are then used as input to the design stage. The agent model, the services model and the acquaintance model are constructed during initial stages of design. These three models are then taken into the detailed design stage. Gaia does not cover detailed design and relies on conventional methodologies for that purpose.
The safety properties are properties that the agent acting on the role must always preserve. Safety properties are expressed as predicates over the variables in the permissions of the role, specifying the legal values these variables can take. The role model is simply a collection of role schema, detailing the attributes for each role in the system. An interaction model is developed based on the initial role model. It contains a protocol definition for each protocol of each role in the system. The protocol definition describes the high level purpose of the protocol, ignoring implementation details such as the sequence of messages exchanged. The protocol definition outlines the initiating role, the responding role, the input and output information, as well as a brief description of the processing the initiator carries out during the execution of this protocol. Table 1. Partial Syntax of Liveness Properties Operator x.y x|y xw x || y Interpretation x followed by y x or y occurs x occurs infinitely often x and y interleaved
3.5 Weaknesses
Gaia was designed to handle small-scale, closed systems. It has weaknesses that render it inappropriate for engineering complex open systems. We have identified the following weaknesses through our work on the motivating example, in order of encounter: 1. Gaia assumes complete specification of requirements and does not address the requirement-gathering phase. It does not guide developers to take advantage of richer requirements enabled by agent technologies. The methodology does not facilitate regular changes of requirements typical to open systems. 2. Environmental information is implicitly encoded in the permissions and protocols of individual roles. Gaia does not present a holistic model of the execution environment to the developers. This omission renders Gaia inappropriate for engineering applications with dynamic and heterogeneous environments. 3. Domain knowledge in the system is implicitly encoded in the attributes of the individual roles. Gaia does not present a holistic model of the structure of the domain knowledge and the interaction and dependencies of knowledge components in the system. This omission prohibits knowledge in the system to be shared, re-used, extended and maintained in a modular fashion. 4. Roles are not hierarchical in Gaia. The role model provides strictly one level of abstraction for the developers to conceptualize the system. The methodology does not facilitate iterative refinement of the system through different levels of abstraction. As a result, Gaia does not scale to handle complex systems. 5. Gaia cannot explicitly model and represent important social aspects of a multi-agent system. Gaia cannot explicitly model the organization structure of the agents in the system, or alternatively, the architecture of the system. It also lacks the ability to explicitly model the social goals, social tasks or social laws within an organization of agents. 6. Gaia offers no mechanisms to model the dynamic reasoning, extension and modification of the above social aspects at runtime. 7. The roles, representing responsibilities and capabilities of agents, are not realized in design or at runtime. The lack of such information at runtime makes peer verification of agent behaviors difficult.
Analysis within Gaia involves refining the role model and the interaction model iteratively. They serve as the initial input to the design stage.
Figure 2. A sample Agent Model In Gaia, a service is simply a coherent block of functionality neutral to implementation details. The service model lists services that agent types provide. They are derived from the activities and protocols of the roles. For each service, four attributes must be specified, namely the inputs, outputs, pre-conditions and post-
8. At an individual agent level, Gaia offers no mechanisms to model the dynamic reasoning, extension and modification of responsibilities and capabilities of agents at runtime. Complex open systems, such as the one outlined in the motivating example, cannot be effectively engineered with Gaia, due to its weaknesses listed above. To extend Gaia for open systems, we expect the following features to be included: 1. Support for requirements gathering.
pattern of the role. Liveness properties are represented by a wregular expression over the sets of activities and protocols the role processes. The syntax of liveness properties used in this paper is shown in Table 1.
conditions. They are easily derived from attributes such as protocol input, from the role model and the interaction model. The acquaintance model is a directed graph between agent types. An arc A allowing A to send messages to B. The purpose is to allow the designer to visualize the degree of coupling between agents. In this light, further details such as message types are ignored.
2. Explicit models to describe the domain knowledge and the execution environment. 3. Levels of abstraction during the analysis phase, to allow iterative decomposition of the system. 4. Explicit models and representations of social aspects and individual agent characteristics, from the analysis phase to the final implementation. 5. Runtime reflection, modeling mechanisms to reason and change the social aspects and individual agent characteristics at runtime.
Similar to roles in Gaia, ROADMAP roles have permissions to access or modify information resources (objects in the environment). To model runtime reflection, we extend the original framework and allow a role to have permissions to access or modify the definition of other roles. Given that roles in ROADMAP have runtime realization, this mechanism allows runtime reasoning, extension and modification of social aspects such as social structure, social laws, and individual agent characteristics and capabilities. In summary, the system is defined as a computational organization of interacting roles at the analysis stage. The organization is then optimized for quality goals, and populated with agents at the design stage.
set of zone schema to describe each zone in the hierarchy. In the scenario from Section 2, three primary zones are identified. They are the Internet, local PC, and the physical environment of the house. Sub-zones are then identified by partitioning the Internet to yield the police website and web services, home owners communication web services at work and commercial web services such as the face recognition service. The physical environment of the house includes sub-zones such as rooms in the house and the garden. A zone schema includes a text description of the zone, and the following attributes: static objects, objects, constraints, sources of uncertainty and assumptions made about the zone. Static objects are entities in the environment whose existences are known to the agents, with which the agents do not interact explicitly. Objects are similar entities with which agents interact. Sources of uncertainty in the environment are identified and analyzed. The zone hierarchy uses OO-like inheritance and aggregation to relate zones and various objects inside zones. The zone schema is not an exhaustive listing of zone properties. It only contains related information from the use-cases. The developer will go through the scenarios in the use-case model, and for each scenario, identify new zones and update new information into the existing zones. This process builds up a description of the environment iteratively and can be re-used when building future applications in similar environments.
Figure 4. A sample Role Hierarchy All the other roles are composite roles. As shown in the example, they are A, B and C. They are defined in terms of other roles, whether atomic or composite. The mechanism we use is aggregation. The root of the tree, A, is a special composite role; it represents the entire system.
interaction of sub-role protocols and activities. Its liveness responsibilities, still defined as w-regular expressions over the sets of activities and protocols the role processes, represent local social goals that the sub-role responsibilities interact to achieve. Its safety responsibilities, still defined as predicates, represent local social laws emergent from sub-role safety responsibilities, hence respected by sub-roles.
attribute a permission to modify all protocols belonging to another role B. There are three logical levels of reflection, on the entire role, on an attribute, such as protocols, or on a particular member in an attribute, such as the Auction protocol. A star notation signals recursive permission on all sub-roles, direct or indirect. For example, B.protocols* represents reflection on protocols of B and all its sub-roles down the hierarchy.
6. DESIGN MODELS
All analysis models are carried into the design phase. During design they are updated to reflect the design decisions. Three design models: the agent model, the service model and the acquaintance model are created from the updated analysis models. These models are refined iteratively until sufficient design information is captured.
implementing service. This allows the correct service to be invoked at runtime. Such dependency is intrinsic to the system. By providing formal descriptions of the dependency, applying future changes to the system will require less effort.
Safety:
Protocols:
7. EXAMPLE
In this section we show a partial role hierarchy (Figure 5), a role schema, and an agent class definition derived from the Section 2 scenario.
Activities:
(Work | Wait) w QueryConfig* || SetConfig* || QueryProfile* || UpdateProfile* || QueryPayment* || MakePayment* involves sysConfig, deviceMgt, profiles, install and payment Consistent (software and hardware settings) Consistent (user profile) Consistent (payment info) QueryConfig involves SysConfig.QueryConfig & DevMgt.QueryConfig SetConfig involves SysConfig.SetConfig & DevMgt.SetConfig QueryProfile involves Profiles.QueryProfile UpdateProfile involves Profiles.UpdateProfile QueryPayment involves SysConfig.QueryConfig & Payment.Query MakePayment involves Payment.Pay Wait
The AdminAgent class (shown below) takes the Admin role, and implements the protocols and activities of the role. Agent Class: Role Assigned: Description: Services: AdminAgent Admin Taking the role of Admin and provide services for protocols and activities of Admin. QueryConfigSvc implements Admin.QueryConfig SetConfigSvc implements Admin.SetConfig QueryProfileSvc implements Admin.QueryProfile UpdateProfileSvc implements Admin.UpdateProfile QueryPaymentSvc implements Admin.QueryPayment MakePaymentSvc implements Admin.MakePayment WaitSvc implements Admin.Wait
Figure 5. A Partial Role Hierarchy The roles Reliability and Performance are non-functional roles as they specify how the rest of the system functionalities should be delivered. These roles illustrate the use of roles to model and optimize quality goals at the knowledge level. The Admin role below is composite. Its sub-role list is non-empty and sub-role involvements are shown. It also has permission to reflect on all parts of the system. Role Name: Description: Sub-roles: Knowledge: Admin General administration of the system SysConfig, DevMgt, Profiles, Install and Payment Software and hardware types, versions and settings. User profile, and service payment terms Changes all software / hardware settings Changes all user profiles Changes all payment info Changes System* // reflection
8. RELATED WORK
Other attempts to extend Gaia for complex open systems include [19, 20]. So far they do not cover all the issues we addressed in this paper and offer less complete support for open systems. [19] proposes an additional coordination model to the original Gaia models in the analysis stage (please refer to Figure 1). The coordination model captures the nature of the coordination medium. It also allows definition of social laws to govern all communication through the medium modeled. There are a few drawbacks to this approach: 1. The rest of the environment, besides the coordination medium, is not modeled. 2. Unlike ROADMAP, only one level of social law is allowed. Hence changing the existing social law affects all agents using the medium.
Permission:
Responsibilities:
3. Social laws are embedded into the communication medium. This monolithic approach does not facilitate frequent changes and complicates the communication medium unnecessarily. In addition, this approach lacks essential features to support open systems such as a role hierarchy, and representation of other social aspects. See section 3.5 for the list of features. An organization-oriented methodology is sketched in [20]. To avoid early commitment to any organization structure, only general organization rules are outlined in the analysis stage. The organizational structure is designed in the design phase. This approach suffers from the fact that general organization rules are inadequate in conceptualizing complex systems. The potential scope of the development is restricted unnecessarily.
[7] Kiczales, G., des Rivieres, J., and Bobrow, D. The Art of the
Metaobject Protocol. The MIT Press, 1991.
[9] Minar, N., Gray, M., Roup, O., Krikorian, R., Maes, P.,
Hive: Distributed Agents for Networking Things, Proceedings of. ASA/MA `99. 1999
[11] Odell, J., Parunak, H. and Bauer, B., Extending UML for
agents. In the Proceedings of the Agent-Oriented Information System Workshop at the 17th National Conference on Artificial Intelligence, 2000.
10. ACKNOWLEDGMENTS
We would like to acknowledge our colleagues at the Intelligent Agent Lab, the University of Melbourne.
11. REFERENCES
[1] Blair, G., Coulson, G., Robin, P. and Papathomas, M. An
Architecture for Next Generation Middleware, Proc. Middleware '98, The Lake District, England, 1998
nd
[5] Iglesias, C., Garijo, M., and Gonzalez, J. A Survey of AgentOriented Methodologies. In Intelligent Agents V Proceedings of the Fifth International Workshop on Agent Theories, Architectures, and Languages (ATAL-98), Lecture Notes in Artificial Intelligence. Springer-Verlag, Heidelberg. 1999