• Ingen resultater fundet

Agent 0..*

0..*

<<subsystem>>

InformationAgent2

Fig.14.TheInformationAgent2

A modied versionof theInformationAgentsubsystem permitsthat alsothe resultsofagents

which ltersand pre-processes relevantdata may be used by other agents (see Figure 14). The

basicinformation sourcesuch as mail, news,and channels maybe still integratedin thesystem

usingthe beforehanddescribedagenttypes.Theycanbeusedaswrappersthat encapsulatethe

moretightcouplingcontractsofthemail,newsandchannelserverstorepresentthemviacontracts

ofamoreagent-likecooperatingfashion.

A correspondingrealization AgentImpl5fortheAgentcontractis shownin Figure15. Instead

of the global mail, news or channel service this time a set of Agent contracts and its update

informationisusedtoretrievenewrelevantinformation.Thus,therightupperpartcontainstwo

poolsrepresentingthedierentexternalstatesofthesubagentscontracts.Theyareobservedand

ifonecontractentersthe[updated]state,theinternaloperationgetUpdateisinitiated.Itistobe

notedthatthusthebeforehandrequiredbusywaitingtoretrieveinformationcanbecircumvented.

A layeredhierarchicalcompositionofInformationAgentandInformationAgent2subsystemscan

thenbeusedtoestablishthenecessaryinfrastructureforacompanywidedecisionsupportsystem

thateectivelysharescommoninterestsofseveralpeopleinformofsharedusedinformationagents

withinthelayeredstructure.Theoverallprocessingmightbeoptimisedbyfurther modifyingthe

structure,e.g.,increasingthehierarchyforverybusy agents.

Thelayeredstructuremaybefurtherconstructedexplicitlyorinanexibleanadaptive

man-ner.Whiletherstwayensuresthaterrornessstructuressuch ascyclicdependingagentscanbe

excludedbyconstruction,theresultingsystemhastobeadjustedtochangingdemandsmanually.

A far moresuitable approach is to let the agents itself manage theirsuitable cooperation.This

canbeachievedwheneach informationagentoersitsservicesinagivencontext.

+update():(set<Msg::Id>)

+addTask(TaskDesc):()

-processUpdate(set<Msg>):() +status(Msg::Id,Msg::Flag):()

+select(Msg::Id):(Msg)

AgentImpl5

<<implementation>>

-processTask():() -getUpdate():(set<Msg>)

Fig.15.TheAgentImpl5class

Mail

News

Channel

subagents 0..*

mailServer

news

channels 1

1

1 Agent

Agent

Agent 0..*

0..*

lookup 0..*

0..*

0..* 0..*

0..* 0..*

<<subsystem>>

<<subsystem>>

+getAgent(AgentDesc) : Agent -lookup[0..*] : Agent

<<subsystem>>

InformationAgent2 AgentRoom

InformationAgent

Fig.16.SubsystemsupportingdynamiccooperationofInformationAgents

In Figure 16 such a system is described using an AgentRoom subsystem which itself may

contain a numberof InformationAgent and InformationAgent2 subsystems. TheInformationAgent

subsystemssharethecommonmail,newsandchannelserver.Additionally,anumberof

Informa-tionAgent2subsystemsusingeachotheraswellastheInformationAgentsubsystemsaredescribed.

The contracts are associated via shared aggregation and therefore for the resulting structural

model cycles in theusage relation are excluded. The externallyoered Agent contractsmay be

provided either by an InformationAgent or InformationAgent2 subsystem. They can be obtained

fromtheAgentRoomsubsysteminterfaceitself.

3.5 Evaluation

Thepresentedalternativedesignsolutionsvaryw.r.t.theirensuredagentautonomyandabstract

performancepropertiesto a greatextend. Theidentied shortcomings ofeach designhavebeen

usedtochosesuitableimprovementstrategiestoovercomethedetectedproblems.

upcominghigh-levelPetristandardwhich ensuresthat designscanbeevaluated forgiven usage

scenarios [13]. Such a simulation may simply make the resulting synchronisation and possible

eects moreobviousormightresultin detectingdesignfaults. Thecontractprotocolspermitto

modularisesuchsimulationsforstrict hierarchicalsystems.Foramoredetailed discussion ofthe

earlyevaluationofdesignalternativeswiththeOCoNapproachbasedonUMLscenariosidentied

duringsystemanalysissee[16].

4 Related Work

InthecontextoftheUMLthereareattemptstoemploythepureUMLforagent-orientedmodelling.

Sequence and collaboration diagrams are proposed in this Agent UML dialect [28,4] to model

the overall agentinteraction protocols. Theimportance of executable specications has also be

identiedbytheUMLcommunityandanapproachtostandardiseanannotationlanguageaswell

asanexecutablemodel[1]arecurrentlydeveloped.Describingthecoordinationofobject-oriented

and agent-orientedsystems with object-orientedPetri netspermit however to overcomeseveral

limitationsandproblemsrelatedtobehaviourmodellingwiththepureUML(cf.[14]).

Modularityisarathergeneralrequirementwhichengineered softwaresystemsshould fullin

ordertosupporttheirfurtherevolutionandchange.Asuitabledesignlanguagerequirestherefore

that dierent entities are separatedby a contractnotion. The pure syntactical interface notion

supported bymostmiddleware approachesis notsuÆcientat thesemanticslevel.Thenotionof

designbycontract[22]hasbeenproposedwhiletheprovidedsemanticalaspectsarepre-and

post-conditionswhichfailtoprovidethenecessarysynchronisationinformationessentialfordistributed

systems.Nonuniformserviceavailabilityhasbeenidentiedbyseveralresearchersasanessential

extensionoftypesystemw.r.t.concurrencyanddistributedsystems(cf.[25]).Especiallyw.r.t.the

coarsegrain structure andtheoverallsoftwarearchitecture[33],higherlevelbehaviouralmodels

and theconsiderationof connectorsand relatedprotocols[3]havebeenproposed.Incontrastto

theoriginalcontractnotionof[22],agentcontractsrequireahigherdegreeofautonomybetween

thecontractpartnersandassumeanagreement-orientedstyle,whilstprogramminglanguage

con-tractstend todescribeaform ofdelegationin whichtheservingsideisstrictlycontrolledbythe

clientside.Indistributedsystemdesign,encapsulationmustbeguaranteed.Thus,nontype-secure

approaches arenot appropriate. TheOCoNapproach integratesan externalbehavioural

speci-cation.Theusedprotocolnetprovidesacontractualnotionwithbehaviouralsubtypingandthus

bettersupportencapsulationbypermittingbehaviouralabstraction.

AgentsareapromisingapproachforthedesignofdistributedsystemsandPetrinetshavethe

abilitytomodelconcurrencyandsynchronisation.Thereforetheircombinationhasgreatpotential

to describedynamic and exible distributed software systems(cf. [19]). One obvious advantage

is, that the analysis of system aspects become feasible [5,30] and therefore the evaluation of

the agent-based system is supported. A number of approaches for modelling of agent-oriented

systemswith highlevelPetrinetsexist [23,24,10,11].Theyexploit the operationalcharacterof

high-level Petri nets models. However, non of them providesthe smoothintegration with UML

andasuitablebehaviouralcontractnotionthatensurescorrectinteractionandsupportsdynamic

contractmatching.

5 Conclusion and Future Work

Forthedesignofdistributedsystemsapproachessuchasdistributedobjects[9]andagent-oriented

softwareengineering[8]arecurrenttrendsthat willbeunited in thefuture.Therefore,thestrict

separationofbothapproacheswilldisappearandagent-orienteddevelopmentmethodssuchas[39]

willbeemployedatacoarsegraindesignlevelwhileotherpartsandthedesignoflowergranularity

maybedone withthe object-oriented approach. Therefore, modelling techniques which support

bothviews arerequired.

orientedand object-orienteddesign.Contractsranging from anexplicitdelegationstyletowards

loosely coupled cooperation can be used. However, still a well dened separation between the

contractparticipantsisensured.

The current support for simulation of OCoN nets is not satisfactory. Further improvements

w.r.t. thetoolsupport is thereforerequired. As extensions foragent-orientedmodelling support

foragentmobilityareplannedin furtherreleasesoftheOCoNlanguage.Alsothealreadyexisting

integrationwiththecomponent-baseddesignideasof[12],which havebeennotaddressedinthis

paper,should befurthertightenedtoachieveanintegrationofallthreeparadigms.

Acknowledgement

My colleague Ulrich Nickel contributed to this work with fruitful discussions and careful proof

reading.

References

1. ActionSemanticsConsortium. ResponsetoOMGRFPad/98-11-01 ActionSemanticsfortheUML,

February2001. Version19a.

2. G. A. Agha. ACTORS: A Model of Concurrent Computation in Distributed Systems. MIT Press,

1986.

3. R. Allen and D. Garlan. A Formal Basis for Architectural Connections. ACM Transactions on

SoftwareEngineering andMethodology,6(3):213{249,July1997.

4. BernhardBauer,JorgP.Muller,andJamesOdell.AgentUMl:AFormalismforSpecifyingMultiagent

Interaction. InPaoloCiancariniandMichaelWooldridge,editors,WorkshoponAgent-Oriented

Soft-ware Engineering(Heldatthe22ndInternationalConference onSoftware Engineering(ISCE2000)),

pages91{103.SpringerVerlag,2001.

5. J.Billington,B.B.Du,andM. Farrington. ModellingandAnalysisofMulti-AgentCommunication

ProtocolsusingCP-nets.InProc.3rdBiennialEngineeringMathematicsandApplicationsConference

(EMAC'98),Adelaide,Australia,13-16 July1998,pages119{122,July1998.

6. W.Brauer, W.Reisig,and G.Rozenberg, editors. Petri Nets:CentralModels(part I)/Applications

(part II),volume254/255ofLecture NotesinComputerScience. SpringerVerlag,Berlin,1987.

7. N.CarrieroandD.Gelernter.HowtowriteparallelPrograms,AFirstCourse.MITPress,Cambridge,

MA,April1990.

8. P.CiancariniandM.Wooldridge,editors. Agent-OrientedSoftwareEngineering First International

Workshop, AOSE 2000 Limerick, Ireland, June 10, 2000 Revised Papers, volume 1957 of Lecture

NotesinComputerScience.SpringerVerlag,2001.

9. WolfgangEmmerich. EngineeringDistributedObjects. JohnWiley&Sons,Inc.,March2000.

10. J.M.FernandesandO.Belo. Modeling multi-agentsystemactivitiesthroughcoloredPetrinets:an

industrialproduction systemcase study. InProc.16th IASTEDInt. Conf.onApplied Informatics,

23-25February 1998,Anaheim,CA,pages17{20,1998.

11. H.FiorinoandC.Tessier. Agentcooperation:aPetrinetbasedmodel. InProc.3-rdInt.Conference

onMulti-Agent Systems(ICMAS'98),3-7July1998,Paris,France,pages425{426,1998.

12. Holger Giese. Contract-basedComponent SystemDesign. InJr. Ralph H.Sprague, editor,

Thirty-ThirdAnnualHawaiiInternationalConferenceonSystemSciences(HICSS-33),Maui,Hawaii,USA.

IEEEPress,January2000.

13. Holger Giese. Object-Oriented Design and Architecture of Distributed Systems. Berichte aus der

Informatik.ShakerVerlag,March2001.

14. Holger Giese, JorgGraf, and GuidoWirtz. Closing the GapBetweenObject-Oriented Modelingof

Structure and Behavior. In Robert France and Bernhard Rumpe, editors, UML'99 - The Second

International Conference on The Unied Modeling Language Fort Collins,Colorado, USA,volume

1723ofLecture NotesinComputer Science,pages534{549.SpringerVerlag,October1999.

15. Holger Giese,JorgGraf, andGuidoWirtz. SeamlessVisualObject-OrientedBehavior Modelingfor

DistributedSoftwareSystems.InIEEESymposiumOnVisualLanguages,Tokyo,Japan.IEEEPress,

September1999.

16. HolgerGiese andGuidoWirtz. EarlyEvaluationofDesignOptionsforDistributedSystems. InInt.

Symposium on Software Engineering for Parallel and Distributed Systems (PDSE'2000), Limerick,

Ireland.IEEEPress,June2000.

VisualLanguagesandComputing,12(2):183{202,April2001.

18. T.HolvoetandT.Kielmann. Behaviorspecicationofactiveobjectsinopengenerative

communica-tionenvironment. InProc.30thAnnual HawaiiInt.Conf.onSystemSciences;:Software Technology

andArchitecture,7-10January1997,Wailea,HI,volume1,pages349{358,January1997.

19. TomHolvoet. AgentsandPetriNets. PetriNetNewsletter, (49):3{8,October1995.

20. K.Jensen.ColouredPetriNetsBasicConceptsAnalysisMethodsandPracticalUseVolume1.EATCS

MonographsonTheoreticalComputerScience.SpringerVerlag,1992.

21. PekkaKahkipuro. UMLBasedPerformance ModelingFrameworksfor Object-OrientedDistributed

Systems. InRobertFranceandBernhardRumpe,editors,UML'99-TheSecondInternational

Con-ferenceonTheUniedModelingLanguageFortCollins,Colorado,USA,volume1723ofLectureNotes

inComputerScience,pages356{371,October1999.

22. BertrandMeyer. Object-OrientedSoftwareConstruction. PrenticeHall,1997. 2ndedition.

23. T.MiyamotoandS.Kumagai. A MultiAgent NetModelofAutonomousDistributed Systems. In

Proc.of Computational Engineering inSystems Applications'96(CESE'96) SymposiumonDiscrete

EventsandManufacturingSystems, 9-12July1996, Lille,France,pages619{623,July1996.

24. DanielMoldtand Frank Wienberg. Multi-Agent-SystemsBasedonColoured PetriNets. InAzema,

P. and Balbo, G., editors, Lecture Notes in Computer Science: 18th International Conference on

Application and Theory of Petri Nets, Toulouse, France, June 1997, volume 1248, pages 82{101,

Berlin,Germany,June1997.SpringerVerlag.

25. OscarNierstrasz. RegularTypesforactiveObjects. InProceedings OOPSLA'93,volume28ofACM

SIGPLANNotices,pages1{15,October1993.

26. ObjectManagementGroup. OMGUniedModelingLanguageSpecication,Version1.3,June1999.

OMGdocumentad/99-06-08.

27. JamesOdell.ObjectsandAgents:IsThereRoomforBoth? DistributedComputing,November1999.

(www.DistributedComputing.com).

28. James Odell, H. Van Dyke Parunak, and Bernhard Bauer. Extending UML for Agents. InGerd

Wagner, Yves Lesperance, and EricYu,editors, Agent-Oriented Information Systems Workshop at

the 17th National conference on ArticialIntelligence (AAAI2000), Austin, TX, USA,pages 3{17,

2000.

29. TrygveReenskaug, PerWold, and OddArild Lehene. Working with Objects: The OOram Software

Engineering Method. Addison-Wesley/Manning,1996.

30. P.RongierandA.Liegeois. Analysisandpredictionofthebehaviorofoneclassofmultipleforaging

robots with the help of stochastic Petri nets. In Proc. IEEE Int. Conf. on Systems, Man, and

Cybernetics(SMC'99),12-15October 1999,Tokyo,Japan,volume5,pages143{148,1999.

31. J.Rumbaugh,M.Blaha,W.Premerlani, F.Eddy,andW.Lorensen. Object-OrientedModeling and

Design. PrenticeHall,1991.

32. Rovert. C. Sharble and Samuel S. Cohen. The Object-Oriented Brewery: A Comparison of Two

Object-Oriented DevelopmentMethods. ACM SIGSOFT Software Engineering Notes, 18(2):60{73,

1993.

33. MaryShawandDavisGarlan.SoftwareArchitecture:PerspectivesonanemergingDiscipline.Prentice

Hall,1996.

34. Y.Shoham. Agent-orientedprogramming. ArticalIntelligence,60:51{92, 1992.

35. JimWaldo,GeoWyant,AnnWollrath,andSamKendal.ANoteonDistributedComputing.

Techre-port,SunMicrosystemsLaboratories,November1994. TR-94-29.

36. R. Wirfs-Brock, B. Wilkerson, and L. Wiener. Designing Object-Oriented Software. Prentice Hall,

1990.

37. GuidoWirtz,JorgGraf,andHolgerGiese.RulingtheBehaviorofDistributedSoftwareComponents.

In H. R. Arabnia, editor, Proc. Int. Conf. on Parallel and Distributed Processing Techniques and

Applications(PDPTA'97),LasVegas,Nevada,July1997.

38. Michael Wooldridge and Nicholas R. Jennings. Agent Theories, Architectures, and Languages: a

Survey. In Michael Wooldridge and Nicholas R. Jennings, editors, Intelligent Agents, pages 1{22.

SpringerVerlag,1995.

39. Michael Wooldridge, Nicholas R. Jennings, and David Kinny. A methodology for agent-oriented

analysisanddesign. InProceedingsofthethirdannualconferenceonAutonomousAgents May1-5,

1999,Seattle,WAUSA,pages69{76,1999.

1. Introduction

Distributed applications designed following classical technologies, like remote method calls, have benefited from many years of research in formal methods. On the other hand, systems incorporating mobile agents exhibit new characteristics which cannot thoroughly be expressed and studied with previously developed formalisms. The difficulties stem either directly from the very concept of mobile agent (process mobility, new communication patterns, dynamic discovery of services), or indirectly from pre-existing problems which have become unavoidable with the mobile agent paradigm (security, resource management, loose cou-pling of software components).

This paper describes an approach relying on CO-OPN/2 (Concurrent Object-Oriented Petri Nets) [3][5], a formal component-oriented modeling language based on algebraic Petri nets. It has an associated coordination formalism COIL [6] as well as its comprehensive tool-set, for the formal development of distributed applications, including, but not restricted to mobile agent technology. The originality of our contribution is two-fold. First, it lies in the use of a Petri nets extension for the formal de-scription of a form of object mobility which is very close to the real world, by opposition to a simulated mobility obtained by updating communication links. Second, we support different degrees of abstraction in the modeling of mobile agent applica-tions, ranging from simple sketches to concrete, implementation-ready specifications designed with all habitual structuring prin-ciples. The benefits a software engineer can obtain from our approach are: the safety of a modeling language with well-defined semantics, a strong integration in the development process, as well as a resulting specification with a clear graphical presenta-tion and a structure and semantics close to current implementapresenta-tion paradigms.

This paper is structured as follows. Section 2 introduces our formalism, and Section 3 demonstrates its usage in the case of Mil-ner’s mobile telephone example. Section 4 discusses our requirements for a mobile agent modelling language. Section 5 shows a small mobile agent example in CO-OPN/2. Section 6 presents current and future activities in this framework, and Section 7 concludes the paper.

2. CO-OPN/2 and COIL

CO-OPN/2 [3] is a specification language which permits an abstract description of concurrent operations and data structures of computer programs. CO-OPN/2 models can be developed in a dedicated environment described in [8]. This approach, as illus-trated in Figure 1, proposes a formal and incremental development method which covers:

• Modeling by the means of a concurrent object-oriented specification language supporting refinement, analysis and simula-tion within an inference-based environment.

An Experiment with Coordinated Algebraic Petri Nets