130 likes | 297 Views
MoTif for the AntWorld Simulation Tool Contest. Eugene Syriani Hans Vangheluwe. Overview. Highlights of MoTif Domain-Specific modelling with AToM 3 MoTif Solution for the AntWorld case-study Outlook. HighLights. Expressiveness vs Performance. Structure: Modular, Compositional
E N D
MoTiffor the AntWorld Simulation Tool Contest Eugene Syriani Hans Vangheluwe
Overview • Highlights of MoTif • Domain-Specific modelling with AToM3 • MoTif Solution for the AntWorld case-study • Outlook
HighLights Expressiveness vs Performance • Structure: • Modular, Compositional • Control Flow: Sequencing, Branching, Looping, Parallelism, Hierarchy • Time • Rules: • Subtype matching • Pivot passing/binding • NAC • Attribute constraints • Regex-like patterns • Efficient Matching • Inter-rule optimization: • Performance • Incremental changes
Domain-Specific modelling with AToM3 [1] [1] de Lara J., Vangheluwe H., AToM3: A tool for multi-formalism and meta-modelling. FASE, LNCS 2306 (2002), 174-188
Motif [2] • AtomicRule (ARule): transformation rule application • ForAllRule (FRule): apply on all matches (parallel independent) • TransactionalRule (XRule): control backtracking enabled • Selector: At most 1 rule is applied • Synchronizer: synchronize (merge) “threads” of rule applications • CoupledRule (CRule): parallel composition of inner models [2] Syriani E. and Vangheluwe H.: Programmed Graph Rewriting with DEVS. AGTIVE 2007, LNCS (2008)
Motif Execution Class Grabfood : def match(): … def execute(): … Class Grabfood : def match(): … def execute(): … class Grabfood: def match(): … def execute(): … COMPILE IMPORT class Grabfood(ARule): def __init__(self): ARule.__init__(self, name=‘GF') self.state = ARuleState(Grabfood()) def weightFunction(self): return 1.0 GENERATE SIMULATE
Some AntWorld Rules dropFood connectNodesInSameCircle checkAntOnOutCircle goToSameNodeIn moveTowardsHill grabFood
Outlook • Extension with human stepping on ants • Model the user behaviour: event-driven model transformation • Synthesis of a reactive web application with AJAX/SVG • Real-time model transformation • Continuum: Modelling → Simulation → Synthesis [3] E. Syriani and H. Vangheluwe. DEVS: A Semantic Domain For Programmed Graph Transformation. In Discrete Event System Specification, Taylor & Francis (2008) [3] Syriani E. and Vangheluwe H.: Programmed Graph Rewriting with Time for Simulation-based Design. ICMT 2007, LNCS 5063, pp. 91-106 (2008)