Download presentation
Presentation is loading. Please wait.
Published byAmya Hartfield Modified over 9 years ago
1
McGill University School of Computer Science Ph.D. Student in the Modelling, Simulation and Design Lab MSDL’08 Eugene Syriani
2
MSDL’08 REFERENCE GraBaTS 2008 Tool contest E. Syriani and H. Vangheluwe: Using MoTif for the AntWorld Simulation Tool Contest DEVS Book (2008) E. Syriani and H. Vangheluwe: DEVS: A Semantic Domain For Programmed Graph Transformation 2
3
MSDL’08 OVERVIEW Background In the context Case Study: The extended AntWorld Simulation The Modular Timed Graph Transformation language (MoTif) From DEVS to MoTif The MoTif solution for the AntWorld case-study Rules & Control Structure Real-Time Model Transformation & Deployment Conclusion and Future Work 3
4
MSDL’08 IN THE CONTEXT Model Transformation Graph Transformation Controlled Graph Rewriting (rewriting rules) Control Primitives : Sequencing, Branching, Looping, Parallelism, Hierarchy Time is inherent in our transformation models 4
5
MSDL’08 CASE STUDY: ANTWORLD SIMULATION [1] 5 [1] http://www.fots.ua.ac.be/events/grabats2008/ (2008/07/21) EXTENDED
6
MSDL’08 CASE STUDY: ANTWORLD SIMULATION Domain-specific modelling 6
7
MSDL’08 CASE STUDY: ANTWORLD SIMULATION Create grid nodes when ant reaches outmost circle Differentiate between nodes along main axis Ant movement in search mode Ant movement in carry mode Ant creation, once food is brought back to the hill Evaporation of pheromones Simulation Semantics 7
8
MSDL’08 CASE STUDY: ANTWORLD SIMULATION++ At any moment in time, a human steps on the map – Kills all ants on the five nodes – The nodes loose food and pheromones Extended Simulation Semantics 8
9
MSDL’08 FROM DEVS TO MOTIF 9
10
MSDL’08 DEVS The Discrete Event System Specification [2] (DEVS) formalism Highly compositional simulation framework DEVS: – Blocks – Ports – Events Semantics: Parallel composition of blocks/models 10 [2] Zeigler B.P., Multifacetted Modelling and Discrete Event Simulation/ Academic Press, London (1984)
11
MSDL’08 DEVS META-MODEL
12
MSDL’08 MoTiF [2] Blocks – Atomic: encapsulate a graph rewriting rule – Coupled: encapsulate a set of rules (graph grammar) Events – Inport: receive the host graph – Outport(s): send the transformed graph 12 [2] Syriani E. and Vangheluwe H.: Programmed Graph Rewriting with DEVS. AGTIVE 2007, LNCS (2008)
13
MSDL’08 MOTIF META-MODEL
14
MSDL’08 MOTIF AS A DEVS MODEL 14
15
MSDL’08 MOTIF AS A DEVS MODEL 15 At most one rule will execute
16
MSDL’08 MOTIF AS A DEVS MODEL Synchronize parallel threads Success if at least one thread succeeds 16
17
MSDL’08 MOTIF AS A DEVS MODEL 17 The select function: 1.If the Selector is in the imminent list, choose the Selector. 2.Among all the rules that still have a match, choose a corresponding ARule from the imminent list at random, no matter what depth it is at inside this CRule. 3.At this point no rule has any unprocessed match left, then choose any of the ARule in the imminent list. 4.Finally, the imminent list contains either custom atomic blocks or Synchronizers. 5.Proceed with a first-in-first-out selection.
18
MSDL’08 MoTiF MODELLING ENVIRONMENT IN AToM 3 [3] 18 [3] de Lara J., Vangheluwe H., AToM 3 : A tool for multi-formalism and meta-modelling. FASE, LNCS 2306 (2002), 174-188
19
MSDL’08 MoTiF EXECUTION COMPILE GENERATE IMPORT SIMULATE Class Grabfood : def match(): … def execute(): … Class Grabfood : def match(): … def execute(): … class Grabfood(ARule): def __init__(self): ARule.__init__(self, name=‘GF') self.state = ARuleState(Grabfood()) def weightFunction(self): return 1.0 class Grabfood(ARule): def __init__(self): ARule.__init__(self, name=‘GF') self.state = ARuleState(Grabfood()) def weightFunction(self): return 1.0 Class Grabfood : def match(): … def execute(): … Class Grabfood : def match(): … def execute(): … class Grabfood: def match(): … def execute(): … class Grabfood: def match(): … def execute(): … 19
20
MSDL’08 MOTIF SOLUTION 20
21
MSDL’08 ANTWORLD RULES 21
22
MSDL’08 SOME ANTWORLD RULES 22 dropFoodcheckAntOnOutCircleconnectNodesInSameCircle goToSameNodeInmoveTowardsHillgrabFood KillOnNodeKillOnNextCircleNodeInWeakenSameNodeOut
23
MSDL’08 MODELLING OF THE TRANSFORMATION: Round CRule 23
24
MSDL’08 MODELLING OF THE TRANSFORMATION: AntMovements CRule 24
25
MSDL’08 MODELLING OF THE TRANSFORMATION: GenerateCircle CRule 25
26
MSDL’08 MODELLING OF THE TRANSFORMATION: EndOfRound CRule 26
27
MSDL’08 MODELLING OF THE TRANSFORMATION: HumanStep CRule 27
28
MSDL’08 MODELLING OF TRANSFORMATION: SYSTEM 28 User – Controller – Autonomous loop Feed-back to User On User interrupt: User Controlled Feed-back to User
29
MSDL’08 SYNTHESIS OF APPLICATION [4] Synthesis of a reactive application Discard the UserBehavior block Runs on a web browser using AJAX and SVG Real-time model transformation (RT-DEVS) 29 [4] E. Syriani and H. Vangheluwe. Programmed Graph Rewriting with Time for Simulation-Based Design. ICMT 2008. LNCS, vol.5063, pp. 91-106 (2008)
30
MSDL’08 CONCLUSION Formalised MoTif in terms of DEVS Provided solution to the AntWorld case-study Extended solution with user interrupt Deployment of an application ?Pure parallel execution, possibly distributed ?Re-use and parametrisation of transformation models ?Allowing variable structure 30
31
MSDL’08 31 ?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.