Top Level and Infrastructure Components maurelio & doleron
Rollerslam 2.0 x 1.0 Pros –Efficiency in communication –100% Prolog/FLUX Player Specification –Communicative Actions –PIM-Code Compatibility Cons –No distribution
Top Level Display GamePhysics Player SimulationInfrastructure FluxCommunicativeAgent Overview
Ideal PSM components dependecy
Top Level Display GamePhysics Player SimulationInfrastructure CommunicativeAgent FluxCommunicativeAgent FluxInferenceEngine EclipseProlog Java Bridge API
Real PSM components dependecy
Top Level Display GamePhysics Player SimulationInfrastructure CommunicativeAgent FluxCommunicativeAgent FluxInferenceEngine EclipseProlog Java Bridge API
Top Level PIM
Specification
Specification Service View > Rollerslam > SimulationAdmin setState(s:SimulationState) + getState() : SimulationState simAdmin
Specification Type View > SimulationState INITIALIZED PAUSED RUNNING
Specification Operation View context Rollerslam::setState(s:SimulationState) post: getState() = s
Realization
> Rollerslam Realization Service View > Simulation Infrastructure > SimulationAdmin > Agent * > Player > Referee > GamePhysics > agents > Display
> : Rollerslam Realization Instance View infra: Simulation Infrastructure : Display : SimulationAdmin > : GamePhysics: Referee: Player... gfa : Agentr : Agentp1 : Agentp40 : Agent >
Realization Operation View context Rollerslam::setState(s:SimulationState) post: infra.setState(s) context SimulationIntrastructure::getState() : SimulationState body: infra.getState()
Simulation Infrastructure PIM
Specification
Specification Service View > Simulation Infrastructure > * agent > Agent getAgentID() : AgentID + sendActions(actions:Message[*]) + getPerceptions() : Message[*] + getSimulationState() : SimulationState > SimulationAdmin setState(s:SimulationState) + getState() : SimulationState simAdmin simulation
Specification Service View Invariants context Agent inv: getSimulationState() = simulation.simAdmin.getState() context SimulationInfrastructure inv: agents.getAgentID()-> forAll( id | agents->select(getAgentID() = id)->size() = 1)
Specification Type View > SimulationState INITIALIZED PAUSED RUNNING > Message sender: AgentID + receiver: AgentID[*] > AgentID
Specification Life Cycle View RUNNING PAUSED setSimulationState(PAUSED) setSimulationState(RUNNING) INITIALIZED setSimulationState(INITIALIZED) setSimulationState(RUNNING)
Specification Operation View context SimulationAdmin::setState(s:SimulationState) post: getState() = s
Realization
Realization Service View > Simulation Infrastructure state : SimulationState setState(s:SimulationState) + getState() : SimulationState > Simulation Admin Message msgs *
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())
Communicative Agent PIM
Specification
Specification Service View > Communicative Agent > Agent > OOState > OOState AgentID agentKB kb
Specification Type View > OOState > WorldObject * > OID > StringOID oid : String > ObjectState > AgentID (from Infra) > Communicative AgentID myID : String
Specification Type View > Message (from Infra) > AskAction oids : OID[*] > TellAction objects : WorldObject[*] > AskAllAction
Realization
Realization Service View > Communicative Agent # processCycle(messages : Message[*]) : Message > Message actions *
Realization Algorithmic View actions = processCycle( agent.getPerceptions()) agent.sendActions(actions) [not actions.isEmpty()]
processCycle(messages : Message[*]) : Message agentKB(sender).worldObject ->includes(m.objects) foreach message m in messages [m.oclIsKindOf(TellAction)] ret.oclIsKindOf(AskAction) and ret.objects = kb.objects-> select(x |m.objects->includes(x.oid)) ret.oclIsKindOf(AskAction) and ret.objects = kb.objects [m.oclIsKindOf(AskAction)] [m.oclIsKindOf(AskAllAction)]
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
Discussion Positive aspects –Peformance improvement sense –Code improvements with refactorings –Team knowledge improvement –Flux player implementation –Improvements render strategy to 2D&1/2 renderization
Test Scenarios
What the player behavior in this case?
Test Scenarios And now?
Future Work Object-Funcional framework Quantitative metrics to decision support Scenarios automatic testing Continuous integration Artfacts automatic synchronization with tool support