programmed graph rewriting: motif
DESCRIPTION
Eugene Syriani. Programmed Graph Rewriting: MoTif. Programmed Graph Rewriting With DEVS. Eugene Syriani and Hans Vangheluwe . Programmed Graph Rewriting with DEVS. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/1.jpg)
McGill UniversitySchool of Computer Science
COMP 763
Ph.D. Student in the Modelling, Simulation and Design Lab
Programmed Graph Rewriting: MoTif
Eugene Syriani
1
![Page 2: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/2.jpg)
Programmed Graph Rewriting: MoTif
2
COMP 763
PROGRAMMED GRAPH REWRITING WITH DEVS
Eugene Syriani and Hans Vangheluwe.
Programmed Graph Rewriting with DEVS.
Proceedings of the 4th International Conference Applications of Graph Transformations with Industrial Relevance (AGTIVE 2007),
Lecture Notes in Computer Science (LNCS). Springer-Verlag,
October 2007.
Kassel, Germany.
![Page 3: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/3.jpg)
Programmed Graph Rewriting: MoTif
3
COMP 763
OVERVIEW
In the context
Existing Programmed Graph Rewriting Systems
AToM3’s graph rewriting engine by example
Modelled and Modular Timed Graph
Transformation (MoTif): Mimic AToM3 and beyond
Conclusion and Future Work
![Page 4: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/4.jpg)
Programmed Graph Rewriting: MoTif
4
COMP 763
IN THE CONTEXT• MDA = Meta-Model + Model Transformation (+ …)
• Model Transformation Graph Transformation
• Types of Graph Transformations [1]– Unordered Graph Rewrting: non-deterministic, run till no more
– Ordered Graph Rewriting: explicit (partial) ordering
– Event-driven Graph Rewriting: external ordering
• Ordered Graph Rewriting can be generalized to Programmed Graph Rewriting
[1] Blostein D., Fahmy H., Grbavec A., Practical Use of Graph Rewriting, Technical Report No. 95-373, 1995.
![Page 5: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/5.jpg)
5
Programmed Graph Rewriting: MoTifCOMP 763
• Tabular: success & failure lists for each production
• Diagrammatic: graphical representation of the flow, using arrows
• Textual: imperative programming language constructs
IN THE CONTEXTProgrammed Graph Rewriting CONCRETE SYNTAX
Rule 1 Rule 2 Rule 3
Rule 1 0 S F
Rule 2 S S F
Rule 3 F 0 S
Rule 1 Rule 3Rule 2
while(match)if Rule1
match = Rule2;elif Rule2
match = Rule1 || Rule2;elif Rule3
match = Rule3;else
match = Rule1 || Rule2 || Rule3;
![Page 6: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/6.jpg)
6
Programmed Graph Rewriting: MoTifCOMP 763
IN THE CONTEXT
• Cleanly tear apart1. Transformation entities2. Control flow, structure, hierarchy
• Graph transformation control flow primitives– Sequencing, Branching, Looping
– Parallelism
– Hierarchy
– Time
Programmed Graph Rewriting WISH LIST
![Page 7: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/7.jpg)
Programmed Graph Rewriting: MoTif
7
COMP 763
OVERVIEW
In the context
Existing Programmed Graph Rewriting Systems
AToM3’s graph rewriting engine by example
Modelled and Modular Timed Graph
Transformation (MoTif): Mimic AToM3 and beyond
Conclusion and Future Work
![Page 8: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/8.jpg)
8
Programmed Graph Rewriting: MoTifCOMP 763
EXISTING PROGRAMMED GRAPH REWRITING SYSTEMS
Programmed Graph Rewriting System (ProGReS) [2,3]
[2] Blostein D., Schürr A., Computing with graphs and graph rewriting, Proceedings in Informatics, pp. 1-21, 1999.[3] Schürr A., Winter A.J., Zündorf A., Graph grammar engineering with progres, Proceedings of ESEC, pp. 219-234, 1995.
Manfred Nagl Andy Schürr Albert Zündorf
1988-1999
University of Aächen, Germany
![Page 9: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/9.jpg)
Programmed Graph Rewriting: MoTif
9
COMP 763
PROGRES
![Page 10: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/10.jpg)
Programmed Graph Rewriting: MoTif
10
COMP 763
PROGRES• First fully implemented environment for programming
through graph transformation
Transformation Control Structure: Programming constructs Sequencing (sequence,&&,||) Branching (choose) Looping (loop) Hierarchy (encapsulation of rules)– Parallelism– Time+ Transactions+ Backtracking
![Page 11: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/11.jpg)
11
Programmed Graph Rewriting: MoTifCOMP 763
EXISTING PROGRAMMED GRAPH REWRITING SYSTEMS
From UML to JAVA And Back Again (FUJABA) [4,5]
[4] Nickel U., Niere J., Zündorf A. Tool demonstration: The FUJABA environment, Proceedings of ICSE, ACM Press, pp. 742-745, 2000.[5] Fischer T. et al. Story Diagrams: an new graph grammar language based on UML and JAVA, Proceedings of ESEC, LNCS 1764, pp. 1-21, 2000.
Since 1998
University of Kassel, Germany
![Page 12: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/12.jpg)
Programmed Graph Rewriting: MoTif
12
COMP 763
FUJABA
![Page 13: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/13.jpg)
Programmed Graph Rewriting: MoTif
13
COMP 763
FUJABA• Implementation (JAVA) oriented: content of class
methods is described by Story Charts diagrams
Transformation Control Structure: Story ChartsSequencing (success-fail transition)Branching (if-else guard on transition)Looping (for-all pattern)– Hierarchy– Parallelism– Time
![Page 14: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/14.jpg)
14
Programmed Graph Rewriting: MoTifCOMP 763
EXISTING PROGRAMMED GRAPH REWRITING SYSTEMS
MOFLON [6]
[6] Amelunxen C. et al. Moflon: A standard compliant metamodeling framework with graph transformations, Proceedings of MDA – Foundations and Applications, LNCS 4066, pp. 361-375, 2006.
Since 2004
University of Darmstädt, Germany
![Page 15: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/15.jpg)
Programmed Graph Rewriting: MoTif
15
COMP 763
MOFLON
![Page 16: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/16.jpg)
Programmed Graph Rewriting: MoTif
16
COMP 763
MOFLON• Uses the FUJABA graph transformation engine
• Environment for declarative specification of transformations in terms of a Triple Graph Grammar (TGG)
• TGGs are compiled to Story Diagrams
![Page 17: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/17.jpg)
17
Programmed Graph Rewriting: MoTifCOMP 763
EXISTING PROGRAMMED GRAPH REWRITING SYSTEMS
Visual Modelling and Transformation System (VMTS) [10,11]
[10] Lengyel L. et al., Control flow support in meta-model based model trasnformation frameworks, Proceedings of EUROCON, pp. 595-598, 2005.[11] Lengyel L. et al., Model transformation with a visual control flow language, IJCS 1, pp. 45-53, 2006.
Since 2004
Budapest University of Technology and Economics, Hungary
Tihamér Levendovszky László Lengyel
![Page 18: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/18.jpg)
Programmed Graph Rewriting: MoTif
18
COMP 763
VMTS
![Page 19: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/19.jpg)
Programmed Graph Rewriting: MoTif
19
COMP 763
VMTS• Stereotyped-Activity diagram
• LHS and RHS can be linked by XSLT scripts and actions specified in imperative OCL
• QVT realizations
Transformation Control Structure: VMTS Control Flow Language Sequencing (link steps) Branching (OCL condition) Looping (link steps and OCL condition) Hierarchy (composition of primitive steps)– Parallelism– Time+ Pivot Information
![Page 20: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/20.jpg)
20
Programmed Graph Rewriting: MoTifCOMP 763
EXISTING PROGRAMMED GRAPH REWRITING SYSTEMS
Graph Rewriting and Transformation (GReAT) [7,8,9]
[7] Vizhanyo A. et al., Towards generation of high-performance transformations, Proceedings of GPCE, LNCS 3286 pp. 298-396, 2004.[8] Agrawal A., Metamodel based model transformation language, Proceedings of OOPSLA, ACM Press pp. 386-397, 2003.[9] Agrawal A., The design of a language for model transformations, SoSym 5, pp. 261-288, 2005.
Since 2001
Vanderbilt University, Nashville (TN), USA
Gabor Karsai Aditya Agrawal
![Page 21: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/21.jpg)
Programmed Graph Rewriting: MoTif
21
COMP 763
GREAT
![Page 22: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/22.jpg)
Programmed Graph Rewriting: MoTif
22
COMP 763
GREAT• Rules represented in blocks
• Packets (graphs) are sent via ports
Transformation Control Structure: Custom Control Flow Language Sequencing (connection of Inports and Outports) Branching (Test-Case rules) Looping (recursion) Hierarchy (forblock) Parallelism (one-to-many connection)– Time+ Pivot Information
![Page 23: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/23.jpg)
Programmed Graph Rewriting: MoTif
23
COMP 763
OVERVIEW
In the context
Existing Programmed Graph Rewriting Systems
AToM3’s graph rewriting engine by example
Modelled and Modular Timed Graph
Transformation (MoTif): Mimic AToM3 and beyond
Conclusion and Future Work
![Page 24: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/24.jpg)
24
Programmed Graph Rewriting: MoTifCOMP 763
BUILDING EXAMPLE WITH ATOM3 [12]
Simplified PacMan formalism [13]
[12] de Lara J., Vangheluwe H., AToM3: A tool for multi-formalism and meta-modelling, LNCS (2002), 174-188[ 13] Heckel R., Graph Transformation in a nutshell, ENTCS (2006), 187-198
![Page 25: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/25.jpg)
Programmed Graph Rewriting: MoTif
25
COMP 763
BUILDING EXAMPLE WITH ATOM3
Build the Meta-Model of the PacMan formalism
![Page 26: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/26.jpg)
26
Programmed Graph Rewriting: MoTifCOMP 763
BUILDING EXAMPLE WITH ATOM3
Build the Graph Grammar
![Page 27: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/27.jpg)
27
Programmed Graph Rewriting: MoTifCOMP 763
BUILDING EXAMPLE WITH ATOM3
Build the Graph Grammar
14
2
1
2
5 pacLink
3
ghostLink
3
ghostLink
1: return self.LHS.nodeWithLabel(1).score + 1
1
2
3
1
2
35
4
pacLink
foodLink
6
4
pacLink
P 1
P 2
![Page 28: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/28.jpg)
28
Programmed Graph Rewriting: MoTifCOMP 763
BUILDING EXAMPLE WITH ATOM3
Build the Graph Grammar
4
1 2
36
gridLeft
ghostLink
1 2
3
4
7
gridLeft
ghostLink
4
1 2
5
gridRight
pacLink
1 2
4
6
gridRight
pacLink
33
P 3
P 3
![Page 29: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/29.jpg)
Programmed Graph Rewriting: MoTif
29
COMP 763
BUILDING EXAMPLE WITH ATOM3
![Page 30: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/30.jpg)
Programmed Graph Rewriting: MoTif
30
COMP 763
BUILDING EXAMPLE WITH ATOM3
• Capture a trace of execution– Keep log of used rules
![Page 31: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/31.jpg)
Programmed Graph Rewriting: MoTif
31
COMP 763
OVERVIEW
In the context
Existing Programmed Graph Rewriting Systems
AToM3’s graph rewriting engine by example
Modelled and Modular Timed Graph
Transformation (MoTif): Mimic AToM3 and beyond
Conclusion and Future Work
![Page 32: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/32.jpg)
Programmed Graph Rewriting: MoTif
32
COMP 763
OVERVIEW OF THE DEVS FORMALISM• Bernard Zeigler, late ‘70s
• Basis for compositional modelling and simulation of discrete event systems
• Design, performance analysis and implementation
![Page 33: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/33.jpg)
Programmed Graph Rewriting: MoTif
33
COMP 763
OVERVIEW OF THE DEVS FORMALISM
• Block:– Atomic
– Coupled
• Port:– Inport
– Outport
• Event
• Global time
![Page 34: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/34.jpg)
Programmed Graph Rewriting: MoTif
34
COMP 763
OVERVIEW OF THE DEVS FORMALISM
Atomic DEVS:– Time Advance– Output Function– Internal Transition– External Transition
ATOMIC
![Page 35: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/35.jpg)
35
Programmed Graph Rewriting: MoTifCOMP 763
OVERVIEW OF THE DEVS FORMALISMCoupled DEVS
CA1
A2
A3
![Page 36: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/36.jpg)
Programmed Graph Rewriting: MoTif
36
COMP 763
C
OVERVIEW OF THE DEVS FORMALISM
Coupled DEVS:– Select Function
A1
A2
![Page 37: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/37.jpg)
37
Programmed Graph Rewriting: MoTifCOMP 763
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: pythonDEVSclass 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]
![Page 38: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/38.jpg)
Programmed Graph Rewriting: MoTif
38
COMP 763
MOTIF• DEVS blocks– Atomic block: encapsulate the graph rewriting rule
– Coupled block: encapsulate a graph grammar
• Events– Inport: recieve the host graph
– Outport(s): send the transformed graph
![Page 39: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/39.jpg)
Programmed Graph Rewriting: MoTif
39
COMP 763
MOTIF META-MODEL
![Page 40: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/40.jpg)
Programmed Graph Rewriting: MoTif
40
COMP 763
MOTIF MODELLING ENVIRONMENT
CRule Ports
Atomic RuleSynchronizerCoupled RuleAtomic DEVS
Coupled DEVS
pyDEVS Generator
![Page 41: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/41.jpg)
Programmed Graph Rewriting: MoTif
41
COMP 763
Graph Transformation
Rules
Trace
MOTIF
Model AToM3’s graph transformation engineUserInput
Control
Input graph Step
Send graph to transform
Transformed graph
Rules used
Rule
Rule
GT Rules
![Page 42: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/42.jpg)
Programmed Graph Rewriting: MoTif
42
COMP 763
MOTIF
Graph transformation engineUserInput
g_out out_stepdone_rcv
Controllerg_init done_send in_step
g_out
g_modified
g_unmodified
Trace
g_in g_succeed
match_fail
match_succeed
g_in
match_fail
trace
trace
g_in
g_fail
trace
ARule
ARule
match_succeed
CRule
![Page 43: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/43.jpg)
Programmed Graph Rewriting: MoTif
43
COMP 763
MOTIFManaging priorities
g_in
CRule
Synchronizer
match_fail
g_in
g_in
abort
match_succeed
Priority ng_in
abort
abort
out_fail
match_failARule ARule
match_succeed
in_success in_fail
out_success g_succeed
g_fail
ARule
Priority n+1
Non-determinism:Randomize select function
![Page 44: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/44.jpg)
44
Programmed Graph Rewriting: MoTifCOMP 763
MOTIF
Given the ASG of the model Loading1. Build N={label:[Nodes]} the list of the potential nodes of the isomorphic subgraph with
the LHS label as key2. Initialize M empty LHS Match3. From each root, perform an incremental DFS that finds the nodes (path) one by one4. When path is complete, build M={label:node} of matched nodes5. If M is incomplete: FAIL RHS application6. Remove nodes from the in/out-connections and from the graph dictionary7. Create new nodes in the graph dictionary and connect them8. Modify attributes9. SUCCESS
Compiling the rules
![Page 45: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/45.jpg)
45
Programmed Graph Rewriting: MoTifCOMP 763
MOTIFUse compiled version of AToM3’s rule
class Pacmandie:
...
![Page 46: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/46.jpg)
46
Programmed Graph Rewriting: MoTifCOMP 763
MOTIF
Given the ASG of the model Pre-generation1. Generate Executer for simulation and Event classes2. Generate the Environment: User, Controller and interface with the model Model to DEVS: Visitor Pattern3. For each Atomic block,
Call the DEVSGenerator with parameters of the block (transitions, functions, inports, outports)4. For each Coupled block,
Keep information of the block (select, inports, outports)5. For each Coupled block,
Open the submodel and goto 3Call the DEVSGenerator with its information
DEVS to code: Command Pattern6. Atomic block code generator7. Coupled block code generator8. Special blocks code generator9. Use of predefined constants
Generating pyDEVS code
![Page 47: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/47.jpg)
Programmed Graph Rewriting: MoTif
47
COMP 763
MOTIFGENERATE
GENERATE
IMPORT
SIMULATE
![Page 48: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/48.jpg)
Programmed Graph Rewriting: MoTif
48
COMP 763
MOTIFExtension of AToM3’s graph transformation engine
g_out out_step
g_init done_send in_step
done_rcv
g_out
g_succeed
g_failg_in
AutonomousRules
Usercontrolled
Rules
g_fail
g_modifiedg_unmodified
g_in
out_control
control_out
control_in
Controller
User
in_control
![Page 49: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/49.jpg)
Programmed Graph Rewriting: MoTif
49
COMP 763
MOTIFExtension of AToM3’s graph transformation engine
Up Down Left Right
g_incontrol_in
key g_in
g_up
g_down
g_in
match_succeedmatch_fail
g_in
match_succeedmatch_fail
g_in
match_succeedmatch_fail
g_in
match_fail
Dispatchg_left
out_fail
in_successin_fail
out_success
g_succeedg_fail
User controlled Rules
match_succeed
g_right
![Page 50: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/50.jpg)
Programmed Graph Rewriting: MoTif
50
COMP 763
Autonomous Rules
match_fail
g_in
match_fail
g_in
MOTIFExtension of AToM3’s graph transformation engine
g_in g_succeed
match_succeed
g_in
g_fail
Kill
Eat
Ghost Move
match_succeed
match_fail
match_succeed
![Page 51: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/51.jpg)
51
Programmed Graph Rewriting: MoTifCOMP 763
MOTIF
• Controlled Transformations
• Layered Transformations
• Prioritized Transformations
Priorities revisited
![Page 52: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/52.jpg)
Programmed Graph Rewriting: MoTif
52
COMP 763
OVERVIEW
In the context
Existing Programmed Graph Rewriting Systems
AToM3’s graph rewriting engine by example
Modelled and Modular Timed Graph
Transformation (MoTif): Mimic AToM3 and beyond
Conclusion and Future Work
![Page 53: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/53.jpg)
53
Programmed Graph Rewriting: MoTifCOMP 763
SUMMARY
SequenceBranchingLoopingHierarchy + ModularityParallelismTime
Control flow structure properties satisfied
![Page 54: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/54.jpg)
54
Programmed Graph Rewriting: MoTifCOMP 763
CONCLUSION AND FUTURE WORK
• DEVS is a sequential formalism
• Parallel-DEVS
• Kiltera (CSP-like languages)
Parallelism
![Page 55: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/55.jpg)
55
Programmed Graph Rewriting: MoTifCOMP 763
IN COMPLETION FUTURE WORK
• Metric, Statistics
• Timed graph transformation
• Real-Time DEVS
• Simulation…
Time
![Page 56: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/56.jpg)
56
Programmed Graph Rewriting: MoTifCOMP 763
COMPLETED FUTURE WORK
• Event-driven Graph Rewriting
• Modelling of the user
Web-based pacman game– AJAX
– SVG
– Real-time
User - Events
![Page 57: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/57.jpg)
57
Programmed Graph Rewriting: MoTifCOMP 763
FUTURE WORK
• Optimization on rule application
• Information on the flow
• Replace python code by... Statechart? Modelica? Kermeta?
Some Extensions
![Page 58: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/58.jpg)
Programmed Graph Rewriting: MoTif
58
COMP 763
MORE REFERENCES13. Progres website: http://www.se.rwth-aachen.de/tikiwiki/tiki-index.php?page=Research%3A+Progres
14. Fujaba website: http://wwwcs.uni-paderborn.de/cs/fujaba
15. MOFLON website: www.moflon.org
16. VMTSwebsite: http://vmts.aut.bme.hu
![Page 59: Programmed Graph Rewriting: MoTif](https://reader038.vdocument.in/reader038/viewer/2022102910/568140fc550346895dacc4c3/html5/thumbnails/59.jpg)
59
Programmed Graph Rewriting: MoTifCOMP 763
Are we at the right level of abstraction?Is it the way industry should go in
model transformation?