180 likes | 268 Views
Rollerslam PIM 2.0.3. Top Level. <<interface>> SimulationAdmin ---------------------------------------. + setState(s:SimulationState) + getState() : SimulationState. Specification Service View. <<K2Realize>>. simAdmin. <<subject>> Rollerslam. <<interface>> SimulationState
E N D
<<interface>> SimulationAdmin --------------------------------------- + setState(s:SimulationState) + getState() : SimulationState ... Specification Service View <<K2Realize>> simAdmin <<subject>> Rollerslam
<<interface>> SimulationState ----------------------- INITIALIZED PAUSED RUNNING Specification Type View
Specification Life Cycle View setSimulationState(PAUSED) setSimulationState(RUNNING) INITIALIZED PAUSED RUNNING setSimulationState(RUNNING) setSimulationState(RUNNING) setSimulationState(INITIALIZED)
<<K2Component >> Rollerslam ----------------------------------------------------------------------------------------------------------------------------- Realization Service View <<interface>> SimulationAdmin <<K2GUIComponent>> ControlPanel <<K2Realize>> <<K2Component>> Simulation Infrastructure <<K2Use>> <<interface>> Display <<K2GUIComponent>> GameDisplay * <<K2Realize>> <<K2Realize>> agents <<K2Realize>> <<interface>> Agent <<K2Use>> <<K2Component>> GamePhysics <<K2Component>> Referee <<K2Component>> Player
: Rollerslam ----------------------------------------------------------------------------------------------------------------------------- Realization Instance View <<K2RealizeLink>> <<K2UseLink>> <<K2RealizeLink>> : Control Panel : SimulationAdmin <<K2RealizeLink>> : Simulation Infrastructure <<K2UseLink>> disp1 : RollerslamDisplay : Display <<K2RealizeLink>> <<K2UseLink>> gfa : Agent r : Agent p1 : Agent p40 : Agent <<K2UseLink>> <<K2UseLink>> <<K2UseLink>> <<K2UseLink>> ... : GamePhysics : Referee : Player : Player
<<interface>> SimulationAdmin --------------------------------------- + setState(s:SimulationState) + getState() : SimulationState Specification Service View <<K2Realize>> simAdmin <<subject>> Simulation Infrastructure simulation <<interface>> Display ------------------------------------------ + getCurrentState(): Message[*] simulation <<K2Realize>> agent <<K2Realize>> * <<interface>> Agent -------------------------------------------------------- + getAgentID() : Integer + sendActions(p:Message[0..*]) + receivePercepts() : Message[0..*] + getSimulationState() : SimulationState
Specification Service ViewInvariants context Agent inv: getSimulationState() = simulation.simAdmin.getState() context SimulationInfrastructure inv: agents.getAgentID()-> forAll( id | agents->select(getAgentID() = id)->size() = 1)
<<interface>> SimulationState ----------------------- Message ---------------------------- INITIALIZED PAUSED RUNNING + senderID : Integer Specification Type View
Specification Life Cycle View setSimulationState(PAUSED) setSimulationState(RUNNING) INITIALIZED PAUSED RUNNING setSimulationState(RUNNING) setSimulationState(RUNNING) setSimulationState(INITIALIZED)
Specification Operation View context SimulationAdmin::setState(s:SimulationState) post: getState() = s
<<K2Component>> Simulation Infrastructure --------------------------------- - state : SimulationState --------------------------------- + setState(s:SimulationState) + getState() : SimulationState <<interface>> Simulation Admin Realization Service View msgs Message *
Realization Operation View context SimulationInfrastructure::setState(s:SimulationState) post:state = s context SimulationIntrastructure::getState() : SimulationStatebody:state context Agent::sendActions(actions : Message[*]) post: simulation.msgs = simulation.msgs->including(actions) context Agent::receivePercepts() : Message[*] body: result = simulation.msgs context Display::getCurrentState() : Message[*] body: result = simulation.msgs
Realization Algorithmic View [simulationStateProvider.getState() == RUNNING] simulation .msgs->isEmpty()
Future Work • Top level component should include one operation in some realized interface for each GUI use case • Update stereotypes to lastest version of KobrA-2 • Include “Perception Filtering” mechanism • Include GUI for deployment management after definition of KobrA-2 “Deployment Diagrams”