top level and infrastructure components maurelio & doleron
Post on 15-Jan-2016
221 views
TRANSCRIPT
![Page 1: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/1.jpg)
Top Level and Infrastructure Components
maurelio & doleron
![Page 2: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/2.jpg)
Rollerslam 2.0 x 1.0
• Pros– Efficiency in communication– 100% Prolog/FLUX Player Specification– Communicative Actions– PIM-Code Compatibility
• Cons– No distribution
![Page 3: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/3.jpg)
Top Level
Display
GamePhysics
Player
SimulationInfrastructure
FluxCommunicativeAgent
Overview
![Page 4: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/4.jpg)
Ideal PSM components dependecy
![Page 5: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/5.jpg)
Top Level
Display
GamePhysics
Player
SimulationInfrastructure
CommunicativeAgent
FluxCommunicativeAgent
FluxInferenceEngineEclipsePrologJava Bridge
API
![Page 6: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/6.jpg)
Real PSM components dependecy
![Page 7: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/7.jpg)
Top Level
Display
GamePhysics
Player
SimulationInfrastructure
CommunicativeAgent
FluxCommunicativeAgent
FluxInferenceEngineEclipsePrologJava Bridge
API
![Page 8: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/8.jpg)
Top LevelPIM
![Page 9: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/9.jpg)
Specification
![Page 10: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/10.jpg)
Specification Service View
<<K2SubjCompoClassSSV>>Rollerslam
<<K2Realiz>>
<<K2ISSV>>SimulationAdmin
---------------------------------------
+ setState(s:SimulationState)+ getState() : SimulationState
simAdmin
![Page 11: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/11.jpg)
Specification Type View
<<K2Enum>>SimulationState
-----------------------INITIALIZEDPAUSEDRUNNING
![Page 12: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/12.jpg)
Specification Operation View
context Rollerslam::setState(s:SimulationState) post: getState() = s
![Page 13: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/13.jpg)
Realization
![Page 14: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/14.jpg)
<<K2SubjCompoClassRSV>>Rollerslam
-----------------------------------------------------------------------------------------------------------------------------
Realization Service View
<<K2CompoClassRSV>>
SimulationInfrastructure
<<K2IRSV>>SimulationAdmin
<<K2Realiz>>
<<K2IRSV>>Agent
*
<<K2CompoClassRSV>>Player
<<K2CompoClassRSV>>Referee
<<K2CompoClassRSV>>GamePhysics
<<K2Realiz>>
<<K2Use>>
agents
<< K2CompoClassRSV >>Display
![Page 15: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/15.jpg)
<<K2SubjCompObjRIV>>: Rollerslam
-----------------------------------------------------------------------------------------------------------------------------
Realization Instance View
infra: SimulationInfrastructure
: Display
: SimulationAdmin
<<K2RealizeLink>>
<<K2UseLink>>
: GamePhysics : Referee : Player : Player...
gfa : Agent r : Agent p1 : Agent p40 : Agent
<<K2RealizeLink>>
<<K2UseLink>>
<<K2UseLink>> <<K2UseLink>> <<K2UseLink>> <<K2UseLink>>
<<K2RealizeLink>>
<<K2RealizeLink>>
![Page 16: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/16.jpg)
Realization Operation View
context Rollerslam::setState(s:SimulationState) post: infra.setState(s)
context SimulationIntrastructure::getState() : SimulationState body: infra.getState()
![Page 17: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/17.jpg)
SimulationInfrastructure
PIM
![Page 18: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/18.jpg)
Specification
![Page 19: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/19.jpg)
Specification Service View
<<K2SubjCompoClassSSV>>Simulation
Infrastructure
<<K2Realize>>
*<<K2Realize>> agent
<<K2ISSV>> Agent--------------------------------------------------------+ getAgentID() : AgentID+ sendActions(actions:Message[*])+ getPerceptions() : Message[*]+ getSimulationState() : SimulationState
<<K2ISSV>>SimulationAdmin
---------------------------------------+ setState(s:SimulationState)+ getState() : SimulationState
simAdmin
simulation
![Page 20: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/20.jpg)
Specification Service ViewInvariants
context Agent inv:getSimulationState() = simulation.simAdmin.getState()
context SimulationInfrastructure inv:agents.getAgentID()->forAll( id | agents->select(getAgentID() = id)->size() = 1)
![Page 21: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/21.jpg)
Specification Type View
<<K2Enum>>SimulationState
-----------------------INITIALIZEDPAUSEDRUNNING
<<K2Class>>Message
-----------------------+ sender: AgentID+ receiver: AgentID[*]
<<K2Class>>AgentID
![Page 22: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/22.jpg)
Specification Life Cycle View
RUNNING PAUSED
setSimulationState(PAUSED)
setSimulationState(RUNNING)
INITIALIZED
setSimulationState(INITIALIZED)
setSimulationState(RUNNING)
setSimulationState(RUNNING)
![Page 23: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/23.jpg)
Specification Operation View
context SimulationAdmin::setState(s:SimulationState) post: getState() = s
![Page 24: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/24.jpg)
Realization
![Page 25: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/25.jpg)
Realization Service View
<<K2Component>> Simulation Infrastructure---------------------------------- state : SimulationState---------------------------------+ setState(s:SimulationState)+ getState() : SimulationState
<<interface>>
SimulationAdmin
Messagemsgs
*
![Page 26: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/26.jpg)
Realization Operation View
context SimulationInfrastructure::setState(s:SimulationState) post: state = s
context SimulationIntrastructure::getState() : SimulationState body: state
context Agent::sendActions(actions : Message[*])post: simulation.msgs = simulation.msgs->including(actions)
context Agent::receivePercepts() : Message[*]body: result = simulation.msgs-> select(x|x.receiver->includes(self.getAgentID())
![Page 27: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/27.jpg)
Communicative Agent
PIM
![Page 28: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/28.jpg)
Specification
![Page 29: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/29.jpg)
Specification Service View
<<K2SubjCompoClassSSV>>Communicative
Agent
<<K2Use>>
<<K2ISSV>>Agent
<<K2Class>>OOState
<<K2Class>>OOState
AgentID
agentKB
kb
![Page 30: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/30.jpg)
Specification Type View
<<K2Class>>OOState
<<K2Class>>WorldObject
*
<<K2Class>>OID
<<K2Class>>StringOID
----------------------------+ oid : String
<<K2Class>>ObjectState
<<K2Class>>AgentID
(from Infra)
<<K2Class>>Communicative
AgentID------------------+ myID : String
![Page 31: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/31.jpg)
Specification Type View
<<K2Class>>Message
(from Infra)
<<K2Class>>AskAction
------------------+ oids : OID[*]
<<K2Class>>TellAction
------------------+ objects :
WorldObject[*]
<<K2Class>>AskAllAction
![Page 33: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/33.jpg)
Realization Service View
<<K2SubjCompoClassRSV>>Communicative
Agent---------------------------------------------------------------# processCycle(messages : Message[*]) : Message
<<K2Class>>Message
actions
*
![Page 34: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/34.jpg)
Realization Algorithmic View
actions = processCycle(agent.getPerceptions())
agent.sendActions(actions)
[not actions.isEmpty()]
![Page 35: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/35.jpg)
processCycle(messages : Message[*]) : Message
agentKB(sender).worldObject->includes(m.objects)
foreach message m in messages
[m.oclIsKindOf(TellAction)]
ret.oclIsKindOf(AskAction) andret.objects = kb.objects->
select(x |m.objects->includes(x.oid))
ret.oclIsKindOf(AskAction) andret.objects = kb.objects
[m.oclIsKindOf(AskAction)]
[m.oclIsKindOf(AskAllAction)]
![Page 36: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/36.jpg)
Discussion
• Negative aspects– Zero test scenarios– incomplete non-functional analisys (stress &
code-compliance)– Late project integration (Flux comunicative
approach)– No object-funcional abstract layer mapping
![Page 37: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/37.jpg)
Discussion
• Positive aspects– Peformance improvement sense– Code improvements with refactorings– Team knowledge improvement – Flux player implementation– Improvements render strategy to 2D&1/2
renderization
![Page 38: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/38.jpg)
Test Scenarios
![Page 39: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/39.jpg)
Test Scenarios
What the player behavior in this case?
![Page 40: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/40.jpg)
Test Scenarios
And now?
![Page 41: Top Level and Infrastructure Components maurelio & doleron](https://reader036.vdocuments.site/reader036/viewer/2022062314/56649d6c5503460f94a4b334/html5/thumbnails/41.jpg)
Future Work
• Object-Funcional framework
• Quantitative metrics to decision support
• Scenarios automatic testing
• Continuous integration
• Artfacts automatic synchronization with tool support