lecture v agent-oriented software engineeringin1020/docs/aulas/... · software engineering...
TRANSCRIPT
UFPE’19 -- 1
LectureVAgent-OrientedSoftwareEngineeringJohnMylopoulosUniversityofOttawaFederalUniversityofPernambuco(UFPE),Recife,November20,2019
UFPE’19 -- 2
…AnIdea... SoftwareEngineeringmethodologieshavetraditionallycomeabout in a “late-to-early” phase (or, “downstream-to-upstream”)fashion.
In particular, Structured Programming preceded (andinfluenced!) Structured Analysis and Design; likewise,Object-Oriented Programming preceded Object-OrientedDesignandAnalysis.
In both cases, programming concepts were projectedupstreamtodictatehowdesignsandrequirementsaretobeconceived.Whatwouldhappenifweprojectedrequirementsconcepts
downstreamtodefinesoftwaredesignsandevenimplementations?
UFPE’19 -- 3
Whatissoftware?An engineering artifact, designed, tested and deployedusing engineeringmethods; rely heavily on testing andinspectionforvalidation(Engineeringperspective)A mathematical abstraction, a theory, which can beanalyzedforconsistencyandcanberefinedintoamorespecializedtheory(Mathematicalperspective)A non-human agent, with its own personality andbehavior, defined by its past history and structuralmakeup(CogSciperspective)Asocialstructureofsoftwareagents,whocommunicate,negotiate,collaborateandcooperatetofulfiltheirgoals(Socialperspective)
UFPE’19 -- 4
Whyagent-orientedsoftware? Next generation software engineering will have to supportopen, dynamic architectures where components canaccomplishtasksinavarietyofoperatingenvironments.
Consider application areas such as eBusiness,web services,pervasiveand/orP2Pcomputing.
These all call for software components that find andcompose services dynamically, establish/drop partnershipswithothercomponentsandoperateunderabroadrangeofconditions.
Learning, planning, communication, negotiation, andexception handling become essential features for suchsoftwarecomponents.
☛ ... agents!
UFPE’19 -- 5
Agent-orientedsoftwareengineering Manyresearchershavebeenworkingonitfor~20years. Researchonthetopic:
Extend UML to support agent communication,negotiationetc.(e.g.,[Bauer99,Odell00]); Extend current agent programming platforms (e.g.,JACK) to support not just programmingbut alsodesignactivities[Jennings00].
Weproposed the Troposmethodology for building agent-orientedsoftware;themethodologysupportsrequirementsanalysis,aswellasdesign.
UFPE’19 -- 6
Whatisanagent?
Aperson,anorganization,certainkindsofsoftware. A software agent has beliefs, goals (desires), intentions,hencetheyhaveaBDIarchitecture.
Agentsaresituated,autonomous,flexible,andsocial. Butnote:human/organizationalagentscan’tbeprescribed,theycanonlybepartiallydescribed.
Softwareagents,on theotherhand,have tobecompletelyprescribedduringimplementation.
Beliefs correspond to (object) state, intentions constitute arun-time concept (an agent’s agenda). For design-time, theinterestingnewconceptagentshavethatobjectsdon’thaveisthatof‘goal’.
UFPE’19 -- 7
TheTroposMethodology We propose a set of primitive concepts, as in i*, and amethodologyforagent-orientedrequirementsanalysisanddesign.
Wewanttocoverfourphasesofsoftwaredevelopment:ü Early requirements -- identifies stakeholders and theirgoals;
ü Laterequirements--introducesystemasanotheractorwhichcanaccommodatesomeofthesegoals;
ü Architectural design -- more system actors are addedandareassignedresponsibilities;
ü Detaileddesign--completesthespecificationofsystemactors.
UFPE’19 -- 8
Earlyreq’nts:Stakeholderandtheirgoals
Asocialsettingconsistsofactors,eachhavinggoals(and/orsoftgoals)tobefulfilled.
Participant Manager
Schedulemeeting
Productivemeetings
Schedulemeeting
Low costscheduling
Good meeting
UFPE’19 -- 9
LateRequirementswithi*
AttendMtg
UsefulMtg
CalendarInfo
SuitableTime
SchedulerParticipant
ScheduleMtgSystem
Timetablemanager
Reporter
ManageCalendarInfo
MtgInfo
ContributeToMtg Initiator
UFPE’19 -- 10
Softwarearchitectureswithi*
CalendarInfo
Timetablemanager
Reporter
CollectCalendarInfo
RetrieveMtgInfo
UpdateMtgInfo
Processquery
Updater
Retriever
InfoGatherer
System
Participant
UFPE’19 -- 11
TheTroposdevelopmentprocess Initialization: Identify stakeholder actors and their goals,placetheminSandGrespectively;
Step:ForeachgoalginGwantedbyainS:ü Actoraadoptsg;ü ActoradelegatesgtoanexistingactorinS;ü Actoradelegatesittoanewactora’;a’isaddedtoS;ü Refinegintonewsubgoalsg1,…,gn;addthesetoG;ü Declaregoalg“denied”.
Terminationcondition:Allinitialgoalshavebeenfulfilled,assumingallactorsdeliverontheircommitments.
UFPE’19 -- 12
TroposcomparedtoOOtechniques Goal refinement extends functional decompositiontechniques,inthesensethatitexploresalternatives.
Actor dependency graphs extend object interactiondiagrams inthatadependency is intentional,needstobemonitored, may be discarded, and can be established atdesign-orrun-time.
In general, an actor architecture is open and dynamic;evolvesthroughnegotiation,matchmakingandlike-mindedmechanisms.
Thedistinctionbetweendesignandrun-timeisblurred. Soistheboundarybetweenasystemanditsenvironment(softwareorotherwise.)
UFPE’19 -- 13
Whyisthisbetter(…sometimes…) Traditionally, goals (and softgoals) are operationalizedand/ormetricizedbeforelaterequirements.
This means that a solution to a goal is frozen into asoftware design early on and the designer has to workwithintheconfinesofthatsolution.
This won’t do in situations where the operationalenvironmentofasystem,includingitsstakeholders,keepschanging.
This won’t do either for software that needs toaccommodate a broad range of users, with differentcultural, educational and linguistic backgrounds, or userswithspecialneedsleadingtoever-changingrequirements.
UFPE’19 -- 14
Thetaleoftwodesigns
Controller
Interface
Display(“Please see Smith tomorrow morning at 9am”)
Communicate(mtg062)
Interface
Controller
UFPE’19 -- 15
FormalTropos
EachconceptinaTroposdiagramcanbedefinedformally,intermsofatemporallogicinspiredbyKAOS.
Actors, goals, actions, entities, relationships aredescribedstaticallyanddynamically.
Customer
InsuranceCompanyPremium
payment
Repairscovered
Claimspayout
UFPE’19 -- 16
AFormalTroposexample
EntityClaimHasclaimId:Number,insP:InsPolicy,claimDate,date:Date,details:Text
NecessarydatebeforeinsP.expDateNecessary(∀x)(Claim(x)∧●¬Claim(x)⟹¬RunsOK(x.insP.car))endClaim
ActionMakeRepairPerformedbyBodyShopRefinesRepairCarInputcl:ClaimPre¬RunsOK(cl.insP.car)PostRunsOK(cl.insP.car)...
UFPE’19 -- 17
Agoaldependencyexample
GoalDependencyCoverRepairsModeFulfillDependerCustomerDependeeInsuranceCoHascl:ClaimDefined/*theamountpaidoutbytheinsurancecompany
coversrepaircosts*/endCoverRepairs
UFPE’19 -- 18
AnalysingTroposmodels ModelsinSEareusedforanalysishumancommunication; But, this is not enough! Large models can be hard tounderstand,ortakeseriously!
We need analysis techniqueswhich offer evidence that amodelmakessense:ü Simulation through model checking, to explore thepropertiesofgoals,entities,etc.overtheirlifetime;
ü Goalanalysiswhichdeterminethefulfillmentofagoal,giveninformationaboutrelatedgoals;
ü Socialanalysiswhichlooksatviability,workability,…foraconfigurationofsocialdependencies.
UFPE’19 -- 19
ModelcheckingforTropos Define an automatic translation from Formal Troposspecificationstothe input languageofthenuSMVmodelchecker[Cimatti99].
Veri f icat ion of temporal propert ies of staterepresentationsoffiniteTroposmodels.
Discovery of interesting scenarios that representcounterexamples to properties not satisfied by thespecifications.
Modelsimulation.
UFPE’19 -- 20
MappingTropostonuSMV The language supported by a model checker includesvariables that can takeoneof a finitenumberof values.Also, constraints on the allowable transitions from onevaluetoanother.
HowdowemapFormalTropostonuSMV?ü Eachgoalinstanceisrepresentedbyavariablethatcantake values “no”, “created”, “fulfilled”; theserepresentthepossiblestatesofagoalinstance.
ü EachactionisrepresentedbyaBooleanvariablethatistrueonlyatthetimeinstancewhentheactionoccurs.
UFPE’19 -- 21
TranslationforCoverRepairsVARCoverRepairs:{no,created,fulfilled}INITCoverRepairs=noTRANSCoverRepairs=no->(next(CoverRepairs)=no|
next(CoverRepairs)=created)TRANSCoverRepairs=created->(next(CoverRepairs)=
created|next(CoverRepairs)=fulfilled)TRANSCoverRepairs=fulfilled->next(CoverRepairs)=fulfilledTRANSCoverRepairs=no->next(CoverRepairs=created->!RunOK)
TRANSCoverRepairs=created->next(CoverRepairs=fulfilled->DamageCosts=fulfilled)
TRANSCoverRepairs=created->next(CoverRepairs=fulfilled<->RunsOK)
UFPE’19 -- 22
FromnuSMVspecstoFSMs FiniteStateMachineforCoverRepairs(cl)
no created fulfilled
!RunsOK(cl.insP.car)DamageCosts(cl)=fulfilled
RunsOK(cl.insP.car)Necessaryconditionfortransition Necessaryand
sufficientconditionfortransition
UFPE’19 -- 23
Modelchecking AmodelconsistsofafinitesetofFSMs,eachrepresentingan instance of a class in the Tropos model (goal,dependency, entity, …), or a propositional variable (e.g.,RunsOK(cl.insP.car)).
A simulation considers all possible simulations of theseFSMs,takingintoaccountinter-FSMconstraints.
Even though the space of possible simulations is infinite,onlyafinite(butusuallylarge!)numberofthesematters.
UFPE’19 -- 24
AnInterestingpropertyLTLSPECF[CoverRepairs(cl)=fulfilled->MakeRepair(cl.insP.car)]“If/whensometimeinthefutureCoverRepairs(cl)isfulfilled,
then(atthattime)MakeRepairs(cl.insP.car)istrue”Thispropertydoesnotholdforthemodel.Acounterexampleis:
Variable t1 t2 t3 t4RunsO K false false tr ue tr ue
DamageCosts no no created fulf i l led
Cover Repair s no cr eated created fulf i l led
M akeRepair false false false false
UFPE’19 -- 25
AfixAddtothedefinitionoftheentityclassCar…Necessary¬RunsOK(self)∧¬MakeRepair(self)⇒❍¬RunsOK(self)...
UFPE’19 -- 26
ExperimentswiththeT-ToolTropos models can have an unbounded number ofinstances; to make model checking work, we pickincreasinglylargermodels(e.g.,1,2,...instancesperclass)andcheckwhetherapropertywewanttoproveleadstocounter-examples.
Howdowepickmodels?Howdoweknowwhentostop? Experiments to demonstrate the scalability of theapproach.
UFPE’19 -- 27
Otherthreadsofresearch [Security] Extend Tropos to support ‘ownership’,‘permission’ and ‘trust’; this leads tomodels where youcancheckthateveryactorhasthepermissionssheneedstocarryoutherobligations[Zannone05]èPhDthesisbyNicolaZannone(Trento,2007).
[Risk Management] Extend the risk managementframework [Feather05] to allow goal-based risk analysisèPhDthesisbyYudisAsnar(Trento,2009).
UFPE’19 -- 28
UML,Catalysis&Co.
Relatedwork
KAOSZ
AUML
TROPOSGAIA
!!TheGAP!!
i* JACK
UFPE’19 -- 29
Conclusions We have proposed a set of concepts and sketched amethodology that together support Agent-OrientedSoftwareDevelopment.
Agent-Oriented Software Development has been an up-and-coming paradigm for more than 20 years, thanks totheriseandever-growingdemandforsocialsoftware.
Thisisalong-termproject,andmuchremainstobedone.
UFPE’19 -- 30
UFPE’19 -- 31
References [Bauer99]Bauer,B.,ExtendingUMLfortheSpecificationofAgentInteractionProtocols.OMGdocumentad/99-12-03.
[Castro02]Castro,J.,Kolp,M.,Mylopoulos,J.,“TowardsRequirements-DrivenSoftwareDevelopmentMethodology:TheTroposProject,” InformationSystems27(2),PergamonPress,June2002,365-389.
[Chung00]Chung, L.,Nixon,B.,Yu,E.,Mylopoulos, J.,Non-FunctionalRequirements inSoftwareEngineering,KluwerPublishing,2000.
[Dardenne93] Dardenne, A., van Lamsweerde, A. and Fickas, S., “Goal–directedRequirementsAcquisition”,ScienceofComputerProgramming,20,1993.
[Fuxman01a]Fuxman,A.,Pistore,M.,Mylopoulos,J.andTraverso,P.,“ModelCheckingEarly Requirements Specifications in Tropos”, Proceedings Fifth International IEEESymposiumonRequirementsEngineering,Toronto,August2001.
[Fuxman01b]Fuxman,A.,Giorgini,P.,Kolp,M.,Mylopoulos,J.,“InformationSystemsasSocialOrganizations”, Proceedings International Conference on FormalOntologies forInformationSystems,OgunquitMaine,October2001.
[Iglesias98] Iglesias, C., Garrijo, M. and Gonzalez, J., “A Survey of Agent-OrientedMethodologies”,Proceedingsof the5th InternationalWorkshopon IntelligentAgents:AgentTheories,Architectures,andLanguages(ATAL-98),Paris,France,July1998.
UFPE’19 -- 32
References(cont’d) [Jennings00]Jennings,N.“OnAgent-BasedSoftwareEngineering”,Artificiallntelligence117,2000.
[Mylopoulos92]Mylopoulos,J.,Chung,L.andNixon,B.,"RepresentingandUsingNon-Functional Requirements: A Process-Oriented Approach," IEEE Transactions onSoftwareEngineering18(6),June1992,483-497.
[Odell00] Odell, J., Van Dyke Parunak, H. and Bernhard, B., “Representing AgentInteraction Protocols in UML”, Proceedings 1st International Workshop on Agent-OrientedSoftwareEngineering(AOSE00),Limerick,June2000.
[Wooldridge00]Wooldridge, M., Jennings,N., andKinny,D.,“TheGaiaMethodologyfor Agent-Oriented Analysis and Design,” Journal of Autonomous Agents and Multi-AgentSystems,3(3),2000,285–312.
[Yu95]Yu,E.,ModellingStrategicRelationshipsforProcessReengineering,Ph.D.thesis,DepartmentofComputerScience,UniversityofToronto,1995.
[Zambonelli00] Zambonelli, F., Jennings, N., Omicini, A., andWooldridge,M.,“Agent-OrientedSoftwareEngineeringforInternetApplications,”inOmicini,A.,Zambonelli,F.,Klusch, M., and Tolks-Dorf R., (editors), Coordination of Internet Agents: Models,Technologies,andApplications,Springer-VerlagLNCS,2000,326–346.