Multi-agent Systems Product Lines Camila Nunes, Elder Cirilo, Ingrid Nunes {cnunes,ecirilo,ioliveira}@inf.puc-rio.br Outline • Introduction • Background • Related Work • Case Studies – ExpertCommittee – OLIS • GenArch • Current Work Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Introduction • Agent-oriented Software Engineering (AOSE) – New software engineering paradigm – Development of distributed complex applications • Software Reuse – Benefits • Lower costs • Reduced time-to-market • Quality improvement – AOSE methodologies • Failed to adequately capture the reuse potential since many of the developed methodologies center on the development of specific software applications Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Introduction • Software product lines (MAS) – New trend of software reuse – Build family of applications in a systematic method • Only recent research has explored the integration between SPL and Multi-agent Systems (MAS) – Multi-agent Systems Product Lines (MAS-PL) – SPL + MAS benefits – Help on the industrial exploitation of agent technology Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Background Reuse: From Ad-Hoc to Systematic Focus was small-grained and opportunistic. Results always fell short of expectations. Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Background A software product line is a set of software-intensive systems sharing a common, managed set of features that satisfy the specific need of a particular market segment or mission and that are developed from a common set of core assets in a prescribed way. Software product line engineering is a paradigm to develop software applications (software-intensive systems and software products) using platforms and mass customisation. A software platform is a set of software subsystems and interfaces that form a common structure from which a set of derivative products can be efficiently developed and produced. Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Background pertain to Market Strategy / Application Domain is satisfied by share an Architecture Products used to structure are built from Components Product Lines: Take economic advantage of commonality Bound variability Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio SPL Development Approaches • Proactive – Development of product lines considering all the products in the foreseeable horizon – A complete set of artifacts to address the product line is developed from scratch • Extractive – SPL is developed starting from existing software systems – Common and variable features are extracted from these systems to derive an initial version of the SPL • Reactive – Incremental development of SPLs – SPL artifacts address only a few products. When there is a demand to incorporate new requirements or products, the common and variable artifacts are incrementally extended in reaction to them Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio SPL Development Approaches Domain Analysis Product 1 Architecture Product 2 Project SPL Proactive Approach Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Product 3 SPL Development Approaches Product 1 Product 1 Product 2 Product 2 Product 3 SPL Extractive Approach Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Product 3 SPL Development Approaches Product 1 Product 1 React Product 2 SPL Iterate Product 2 Product 3 Product 3 + SPL Requirements for a new product instance, Product 4 Product 4 Reactive Approach Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Background Methodology Domain Analysis Domain Design FORM Feature diagram with composition rules Subsystem, Process Model and Module Models [Pohl 2005] Framework Reusable, textual and model-based requirements, variability model Reference architecture, refined variability model, mapping from design artifacts to requirements artifacts PLUS Requirements model consisting of a use case model and feature model Static and dynamic models, feature/class dependencies, design of component-based software architecture MacMAS Extension Feature Model (features are goals) Acquaintance Organization, Traceability and Role Models [Dehlinger 2007] Role Schema, Role Variation Point - For the complete study, refers to http://www.inf.puc-rio.br/~ioliveira/maspl/ Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Background • Variability Types – What can vary in a MAS-PL • Besides the common variabilities of SPLs – Alternative / Optional Agents • Alternative / Optional Roles • Alternative / Optional Capabilities Believes Goals Plans Agent also accomplish their goals by communicating with other agents; thus, it is common that inserting new capabilities affects other agents Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Related Work • Josh Dehlinger and Robyn R. Lutz – A Product-Line Requirements Approach to Safe Reuse in MultiAgent Systems • Extensible agent-oriented requirements specification template for distributed systems that supports safe reuse – Software Product Line Approach – Dynamically changing configurations of agents can be captured and reused for future similar systems • Consistency with the Gaia methodology • Requirements area documented in two phases – Role Schema – Role Variation Point Schema Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Related Work • Joaquin Pena et al – Designing and managing evolving systems using a MAS product line approach • Evolving system: multiple versions of the same system – Extension of MaCMAS Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Case Studies Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio ExpertCommittee (EC) • Conference Management System • Typical web-based application • Functionalities to support the complete process of the management of conferences and workshops – Paper submission – Reviewing processes • Examples – EasyChair (http://www.easychair.org/) – JEMS (https://submissoes.sbc.org.br/) Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio EC Versions Version Version 1 Description Typical web-based application (MAS-PL core) Mandatory features that support the conference management process Version 2 Release 1: Addition of the Reviewer role and the functionalities related to it: accept/reject review and review paper. Release 2: Addition of automatic suggestion of conferences to the authors. Release 3: Addition of message notifications to the system users through email or SMS (alternative feature). Release 4: Addition of deadline monitoring, to trigger specific actions when they expire. Release 5: Addition of automatic assignment of papers to committee members review them. Release 6: Addition of task management. Version 3 Refactoring of Version 2 Improvement of the modularization of some agency features Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio EC Feature Model Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio EC Architecture Chair Role BaseAction Author Role Coordinator Role Chair Actions Author Actions Reviewer Actions TaskAction Observer Reviewer Role Committee Member Role GUI Layer Observable Observable Service Chair ServiceImpl Author ServiceImpl Reviewer ServiceImpl Environment Agent User Data Agent <<creates>> Task ServiceImp l User Agents Business Layer Data Layer ConferenceDAO Hibernate PaperDAO Hibernate … TaskDAO Hibernate Task Agent Notifier Agent Deadline Agent Database MAIL Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio SMS EC Configuration File Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio OLIS • OLIS (OnLine Intelligent Services) – Software product line of web-based systems – Services (mandatory or optional) • User Management • Calendar • Events Announcement • Weather – Handles different event types • Generic • Academic • Travel – Addition of Autonomous behavior to • Provide Intelligent Services Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio OLIS Feature Model Feature Dependencies Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio OLIS Architecture Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio OLIS Configuration struts.xml applicationContext.xml Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio GenArch • Model-driven product derivation tool • Centered on the definition of three models – Feature model – Implementation model – Configuration model • The Approach Motivates – Generation of initial versions of these models based on a set of code annotations – Refinement and adaptation of these initial versions to enable the automatic product derivation Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio GenArch • Purpose of each model – Feature Model • Represents variabilities from the SPL architecture – Architecture Implementation Model • Offers a visual representation of code artifacts from the SPL architecture – Configuration Model • Defines the mapping between features and code artifacts • Represents the configuration knowledge from a generative approach Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio GenArch Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Current Work (Ingrid) • Method definition – SPL Methodologies extensions • Agent variability documentation and tracing – Set of guidelines for including software agents into an existing web system • Web-MAS Architectural Pattern SPL Methodologies MAS Techniques Documentation of Agency Features Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Current Work (Elder) Multi-level Customization in SPL Derivation Feature Model Spring Model Classes, Aspectos ... JADEX Model XML Produtos Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio «IMPORT br::pucrio::inf::les::genarch::models::instance» «EXTENSION br::pucrio::inf::les::genarch::models::Model» «DEFINE Main FOR Instance» «FILE "User.agent.xml"-» (...) <capabilities> «LET domainModelElement(“mas",“user",domainModels) AS u» «FOREACH u.capabilities AS c» «c.fragment.content» «FOREACH» «ENDLET» </capabilities> (...) «ENDFILE» «ENDDEFINE» Current Work (Camila) • Evolving MAS-PL: An Empirical Study – Motivation • Increase several approaches of SPL – MAS growing in size and complexity • Evolution Scenarios of MAS • Combining OO and OA – Problem Definition • MAS concerns may not no very well separated by existing OO abstractions • Evolution requirements of product line • Construction of reusable and maintainable large MAS – Proposal • Implement and to compare quantitatively and qualitatively (using metrics) MAS-PL implementations using OO and OA • Analyze the impact of OO and OA in MAS-PL maintenance scenarios Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio References • CIRILO, E.; KULESZA, U.; LUCENA, C. Genarch: A Model-Based Product Derivation Tool. In Proceedings of Brazilian Symposium on Software Components, Architectures and Reuse (SBCARS Tools 2007), Campinas – Brazil, 2007. • CIRILO, E.; KULESZA, U.; COELHO, R.; LUCENA, C.; STAA, A. Integrating Component and Product Lines Technologies. In Proceedings of 10th International Conference on Software Reuse (ICSR 2008), Beijing – China, 2008. • CIRILO, E.; KULESZA, U.; LUCENA, C. A Product Derivation Tool Base on Model-Driven Techniques and Annotations. Journal of Universal Computer Science, Graz – 2008. Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio References • NUNES, I. O. ; NUNES, C. ; KULESZA, U. ; LUCENA, C. Developing and Evolving a Multi-Agent System Product Line: An Exploratory Study. In: 9th International Workshop on Agent-Oriented Software Engineering, 2008, Estoril. 9th International Workshop on AgentOriented Software Engineering, 2008. p. 177-188. • NUNES, I. O. ; KULESZA, U. ; NUNES, C. ; LUCENA, C. . Documenting and Modeling Multi-agent Systems Product Lines. In: International Conference on Software Engineering and Knowledge Engineering, 2008, San Francisco. Proceedings of Twentieth International Conference on Software Engineering and Knowledge Engineering, 2008. • NUNES,C.; KULESZA, U..; SANT'ANNA, C.; NUNES, I..; LUCENA, C. On the Modularity Assessment of Aspect-Oriented Multi-Agent Systems Product Lines: a Quantitative Study. In Simpósio Brasileiro de Componentes, Arquiteturas e Reutilização de Software, 2008. Camila Nunes, Elder Cirilo e Ingrid Nunes © LES/PUC-Rio Questions? Camila Nunes [email protected] Elder Cirilo [email protected] Ingrid Nunes [email protected]