Download presentation

Presentation is loading. Please wait.

Published byJamir Napper Modified over 2 years ago

1
McGill University School of Computer Science ‘07 Eugene Syriani and Hans Vangheluwe McGill University School of Computer Science 1

2
‘07 OVERVIEW In the context Overview of the Discrete EVent system Specification (DEVS) formalism Building example with AToM 3 Graph Rewriting Control Flow (GRCF): Mimic AToM 3 and beyond Summary 2

3
‘07 IN THE CONTEXT Model transformation: Programmed Graph Rewriting At least as expressive as: GreAT, VMTS, Fujaba, ProGreS, MOFLON Sequencing, Branching, Looping, Hierarchy, Parallelism Cleanly tear apart – Transformation entities – Control flow, structure, hierarchy DEVS gives us time and modularity too 3

4
‘07 OVERVIEW In the context Overview of the Discrete EVent system Specification (DEVS) formalism Building example with AToM 3 Graph Rewriting Control Flow (GRCF): Mimic AToM 3 and beyond Summary 4

5
‘07 OVERVIEW OF THE DEVS FORMALISM Bernard Zeigler, late ‘70s Basis for compositional modelling and simulation of discrete event systems Design, performance analysis and implementation 5

6
‘07 OVERVIEW OF THE DEVS FORMALISM Block: Atomic / Coupled Port: Inport / Outport Event Global time 6

7
‘07 OVERVIEW OF THE DEVS FORMALISM Atomic DEVS: – Time Advance – Output Function – Internal Transition –External Transition ATOMIC 7

8
‘07 OVERVIEW OF THE DEVS FORMALISM Coupled DEVS C A1 A2 A3 8

9
‘07 C OVERVIEW OF THE DEVS FORMALISM Coupled DEVS: – Select Function A1 A2 9

10
‘07 OVERVIEW OF THE DEVS FORMALISM class AExample(AtomicDEVS): def __init__(self): self.state = ExampleState() self.in = self.addInPort() self.out = self.addOutPort() def extTransition(self): X = self.peak(self.in)... return self.state def intTransition(self):... return self.state def outputFnc(self):... self.poke(self.out, Y) def timeAdvance(self): return 1 Our implementation: pythonDEVS class CExample(CoupledDEVS): def __init__(self): self.M1 = self.addSubModel(Example()) self.M2 = self.addSubModel(Example()) self.connectPorts(self.M1.out, self.M2.in) def select(self, immList): return immList[0] 10

11
‘07 OVERVIEW In the context Overview of the Discrete EVent system Specification (DEVS) formalism Building example with AToM 3 Graph Rewriting Control Flow (GRCF): Mimic AToM 3 and beyond Summary 11

12
‘07 BUILDING EXAMPLE WITH ATOM 3 [1] Simplified PacMan formalism [2] [1] de Lara J., Vangheluwe H., AToM 3 : A tool for multi-formalism and meta-modelling, LNCS (2002), 174-188 [ 2] Heckel R., Graph Transformation in a nutshell, ENTCS (2006), 187-198 12

13
‘07 BUILDING EXAMPLE WITH ATOM 3 Build the Meta-Model of the PacMan formalism 13

14
‘07 BUILDING EXAMPLE WITH ATOM 3 Build the Graph Grammar 14

15
‘07 BUILDING EXAMPLE WITH ATOM 3 Build the Graph Grammar 1 4 2 1 2 5 pacLink 3 ghostLink 3 1: return self.LHS.nodeWithLabel(1).score + 1 1 2 3 1 2 3 5 4 pacLink foodLink 6 4 pacLink P 1 P 2 15

16
‘07 BUILDING EXAMPLE WITH ATOM 3 Build the Graph Grammar 4 12 3 6 gridLeft ghostLink 12 3 4 7 gridLeft ghostLink 4 12 5 gridRight pacLink 12 4 6 gridRight pacLink 3 3 P 3 16

17
‘07 BUILDING EXAMPLE WITH ATOM 3 17

18
‘07 BUILDING EXAMPLE WITH ATOM 3 Capture a trace of execution – Keep log of used rules 18

19
‘07 OVERVIEW In the context Overview of the Discrete EVent system Specification (DEVS) formalism Building example with AToM 3 Graph Rewriting Control Flow (GRCF): Mimic AToM 3 and beyond Summary 19

20
‘07 GRAPH REWRITING CONTROL FLOW DEVS blocks – Atomic block: encapsulate the graph rewriting rule – Coupled block: encapsulate the graph grammar Events – Inport: recieve the host graph – Outport(s): send the transformed graph 20

21
‘07 GRAPH REWRITING CONTROL FLOW 21

22
‘07 GRAPH REWRITING CONTROL FLOW Model AToM 3 ’s graph transformation engine Input graph Step Send graph to transform Transformed graph Rules used 22

23
‘07 GRAPH REWRITING CONTROL FLOW Graph transformation engine g_out out_step done_rcv g_initdone_sendin_stepg_out g_modified g_unmodified g_in g_succeed match_fail match_succeed g_in match_fail trace trace g_in g_fail trace match_succeed 23

24
‘07 GRAPH REWRITING CONTROL FLOW Managing priorities g_in match_fail g_in g_in abort match_succeed Priority n g_in abort abort out_fail match_fail match_succeed in_successin_fail out_success g_succeed g_fail Priority n+1 Non-determinism: Randomize select function 24

25
‘07 GRAPH REWRITING CONTROL FLOW Use compiled version of AToM 3 ’s rule class pacDie:... 25

26
‘07 import compiled rules… GRAPH REWRITING CONTROL FLOW class AExample(AtomicDEVS): def __init__(self): self.state = ExampleState() self.in = self.addInPort() self.out = self.addOutPort() def extTransition(self): X = self.peak(self.in)... return self.state def intTransition(self):... return self.state def outputFnc(self):... self.poke(self.out, Y) def timeAdvance(self): return 1 26

27
‘07 GRAPH REWRITING CONTROL FLOW Extension of AToM 3 ’s graph transformation engine g_outout_step g_init done_send in_step done_rcv g_out g_succeed g_failg_ing_fail g_modifiedg_unmodified g_in out_control control_out control_in in_control 27

28
‘07 GRAPH REWRITING CONTROL FLOW Extension of AToM 3 ’s graph transformation engine g_incontrol_in keyg_in g_up g_down g_in match_succeedmatch_fail g_in match_succeedmatch_fail g_in match_succeedmatch_fail g_in match_fail g_left out_fail in_successin_fail out_success g_succeedg_fail match_succeed g_right 28

29
‘07 match_fail g_in match_fail g_in GRAPH REWRITING CONTROL FLOW Extension of AToM 3 ’s graph transformation engine g_ing_succeed match_succeed g_in g_fail match_succeed match_fail match_succeed 29

30
‘07 OVERVIEW In the context Overview of the Discrete EVent system Specification (DEVS) formalism Building example with AToM 3 Graph Rewriting Control Flow (GRCF): Mimic AToM 3 and beyond Summary 30

31
‘07 SUMMARY Sequence Branching Looping Hierarchy + Modularity Parallelism Control flow structure properties satisfied 31

32
‘07 Are we at the right level of abstraction? Is it the way industry should go in model transformation? 32

33
‘07 DEVS DEVS “[...] the rule execution semantics is similar to the execution semantics of asynchronous dataflow graphs and DEVS, but with a difference in the hierarchical rule execution. [...] the class diagrams Figs. 14 and 15 introduce the same concepts as found in DEVS.” A. Agrawal et al. The design of a language for model transformations. SoSym, 2006 33

34
‘07 CONCLUSION AND FUTURE WORK DEVS is a sequential, deterministic formalism Parallel-DEVS Kiltera (CSP-like languages) Parallelism 34

35
‘07 CONCLUSION AND FUTURE WORK Metric, Statistics Timed graph transformation Real-Time DEVS Time 35

36
‘07 CONCLUSION AND FUTURE WORK Event-driven Graph Rewriting Modelling of the user User - Events 36

37
‘07 CONCLUSION AND FUTURE WORK Optimization hints Information on the flow Replace python code by... Statechart? Multi-formalism Add an AI block in the autonomous rules Some Extensions 37

38
‘07 GRAPH REWRITING CONTROL FLOW class AExample(AtomicDEVS): def __init__(self): self.state = ExampleState() self.in = self.addInPort() self.out = self.addOutPort() def extTransition(self): X = self.peak(self.in)... return self.state return 1 e(AtomicDEVS): def ___(self): self.state = ExampleState() self.in = self.addInPort() self.out = hsdhfjhb Sdvjvkv Ds v return 1 classself.state = ExampleState() sdvv self.in = self.addInPort() self.out = self.addOutPort() def extTransition(self): X = self.peak(self.in)... return sdsdfsdfsdfsfsdfsdf In AToM 3 Outside AToM 3 38

Similar presentations

OK

McGill University Proposal Exam School of Computer Science Ph.D. Candidate in the Modelling, Simulation and Design Lab Eugene Syriani.

McGill University Proposal Exam School of Computer Science Ph.D. Candidate in the Modelling, Simulation and Design Lab Eugene Syriani.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Resource based view ppt on android Download ppt on festivals of france Ppt on aircraft emergencies Ppt on self development Ppt on reliance securities limited Ppt on drought in india Ppt on cartesian product sql Download ppt on indus valley civilization geography Ppt on waxes are lipids Ppt on collective nouns for grade 3