McGill University School of Computer Science COMP 763 Ph.D. Student in the Modelling, Simulation and Design Lab Eugene Syriani 1.

Slides:



Advertisements
Similar presentations
McGill University School of Computer Science Ph.D. Candidate in the Modelling, Simulation and Design Lab MSDL09 De-/Re-constructing Model Transformation.
Advertisements

McGill University School of Computer Science Ph.D. Student in the Modelling, Simulation and Design Lab Eugene Syriani Hans Vangheluwe.
Eugene Syriani and Huseyin Ergin University of Alabama Software Modeling Lab Software Engineering Group Department of Computer Science College of Engineering.
McGill University School of Computer Science Ph.D. Student in the Modelling, Simulation and Design Lab GraBaTS08 Eugene Syriani Hans Vangheluwe.
Comparison of Several Meta-modeling Tools 2 Yi Lu Computer Science Department McGill University
McGill University School of Computer Science Ph.D. Candidate in the Modelling, Simulation and Design Lab Eugene Syriani.
Huseyin Ergin and Eugene Syriani University of Alabama Software Modeling Lab Software Engineering Group Department of Computer Science College of Engineering.
McGill University GT-VMT’10 School of Computer Science Ph.D. Candidate in the Modelling, Simulation and Design Lab Eugene Syriani Hans Vangheluwe.
McGill University School of Computer Science Ph.D. Student in the Modelling, Simulation and Design Lab MSDL’08 Eugene Syriani.
Component Oriented Programming 1 Chapter 2 Theory of Components.
McGill University School of Computer Science ‘07 Eugene Syriani and Hans Vangheluwe McGill University School of Computer Science 1.
Budapest University of Technology and EconomicsDagstuhl 2004 Department of Measurement and Information Systems 1 Towards Automated Formal Verification.
Eugene Syriani * † Hans Vangheluwe * ‡ Amr Al Mallah * † * ‡ Tuscaloosa, AL Montreal, Canada Antwerp, Belgium.
Extended DEVSML as a Model Transformation Intermediary to Make UML Diagrams Executable Jianpeng Hu Dept. of Computer Science and Engineering Shanghai Jiao.
Higher-Order Transformation Eugene SyrianiandHans Vangheluwe.
Huseyin Ergin and Eugene Syriani. PROBLEM Development of model transformation is still an error-prone and hard task. One reason is the lack of a development.
Semantic Translation of Simulink/Stateflow Models to Hybrid Automata using Graph Transformations A. Agarwal, Gy. Simon, G. Karsai ISIS, Vanderbilt University.
Hüseyin Ergin University of Alabama Software Modeling Lab Software Engineering Group Department of Computer Science College of Engineering.
1 Towards formal manipulations of scenarios represented by High-level Message Sequence Charts Loïc Hélouet Claude Jard Benoît Caillaud IRISA/PAMPA (INRIA/CNRS/Univ.
Rule Based Operational Semantics Specification in Ptolemy Yanwar Asrigo COMP 763B - Modeling and Simulation Based Design 30 th April 2008.
McGill University School of Computer Science Ph.D. Candidate in the Modelling, Simulation and Design Lab MPM’09 Explicit Transformation Modelling Thomas.
A model-driven course on Petri-Nets, Metamodels and Graph Grammars Pieter Van Gorp Hans Schippers Dirk.
Institute For Software Integrated Systems Vanderbilt University Applications of Model Integrated Computing to The Synchronous Language Signal Ethan Jackson.
Using the Vanderbilt Generic Modeling Environment (GME) to Address SOA QoS Sumant Tambe Graduate Intern, Applied Research, Telcordia Technologies Inc.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.
McGill University Proposal Exam School of Computer Science Ph.D. Candidate in the Modelling, Simulation and Design Lab Eugene Syriani.
GReAT: Graph Rewriting And Transformation Presenter: Yuehua Lin 2/17/04, Tuesday Slides help from Aditya Agrawal
Behaviour-Preserving Model Transformation Arend Rensink, University of Twente IPA Spring Days, 18 April 2012.
An Information Theory based Modeling of DSMLs Zekai Demirezen 1, Barrett Bryant 1, Murat M. Tanik 2 1 Department of Computer and Information Sciences,
The Design Discipline.
CHART: An Approach for Non Invasive Model Transformation IPA Spring Days, April 18 th, 2012 Maarten de Mol 1, Arend Rensink 1, James J. Hunt 2 1 University.
Reverse Engineering of Web Pages based on Derivations and Transformations L.Bouillon, Q.Limbourg, J.Vanderdonckt, B.Michotte Université catholique de Louvain,
Huseyin Ergin and Eugene Syriani. PROBLEM (DIDN’T CHANGE) Development of model transformation is still an error-prone and hard task. One reason is the.
Yu SunUniversity of Alabama at Birmingham PAR Works Jeff Gray University of Alabama Montpellier, France July 3rd, 2013 This research is supported.
Designing a Discrete Event Simulation Tool Peter L. Jackson School of Operations Research and Industrial Engineering March 15, 2003 Cornell University.
AToM 3 : A Tool for Multi- Formalism and Meta-Modelling Juan de Lara (1,2) Hans Vangheluwe (2) (1) ETS Informática Universidad Autónoma de Madrid Madrid,
MDE Model Driven Engineering Xavier Blanc Université Pierre et Marie Curie
1 MDWE'2008, Toulouse, France, September 30, 2008 A Comparative Analysis of Transformation Engines for User Interface Development Juan Manuel González.
Class Diagrams with Constraints Philippe Nguyen McGill University COMP-762 Winter 2005.
Validated Model Transformation Tihamér Levendovszky Budapest University of Technology and Economics Department of Automation and Applied Informatics Applied.
Vanderbilt University 23 July 2003 Metamodel Based Model Migration Jonathan Sprinkle Dissertation Defense Given toward satisfaction of the requirements.
University of Paderborn Software Engineering Group Prof. Dr. Wilhelm Schäfer Towards Verified Model Transformations Holger Giese 1, Sabine Glesner 2, Johannes.
Systems Analysis and Design in a Changing World, 3rd Edition
1 LiSyC ENSIETA/DTN 02/04/2008 AADL execution semantics transformation for formal verification Joel Champeau, Thomas Abdoul, Pierre Yves Pillain, Philippe.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
1 Advanced Software Architecture Muhammad Bilal Bashir PhD Scholar (Computer Science) Mohammad Ali Jinnah University.
Hybrid Transformation Modeling Integrating a Declarative with an Imperative Model Transformation Language Pieter Van Gorp
Visual Specification of a DSL Processor Debugger Tamás Mészáros and Tihamér Levendovszky Budapest University of Technology and Economics.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Budapest University of Technology and Economics Technical University of Darmstadt Real-Time Systems Lab Benchmarking for Graph Transformation Gergely Varró.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Week 04 Object Oriented Analysis and Designing. What is a model? A model is quicker and easier to build A model can be used in simulations, to learn more.
Budapest University of Technology and Economics Department of Computer Science and Information Theory 1 Graph Transformation in Relational Databases Gergely.
Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The syllabus and all lectures for this course are copyrighted materials and may not be used.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Chapter 3: Introducing the UML
CS223: Software Engineering
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Basic Characteristics of Object-Oriented Systems
Extension du formalisme SES pour l’intégration de la hiérarchie d’abstraction et la granularité temporelle au sein de la modélisation et la simulation.
DEVS modeling of Traffic in AToM3 Presented by Ximeng Sun April 11, 2005.
1 Functional Modeling Lecture # Recap We had talked about object-oriented static modeling in quite detail We had developed a OO static model of.
© 2009 Artisan Software Tools. All rights reserved. Testing Solutions with UML/SysML Andrew Stuart, Matthew Hause.
Dynamic structure modelling for Causal Block Diagrams
Unified Modeling Language
SyDEVS Introduction Theory – Paradigm – Implementation
Model Transformation with Hierarchical Discrete-Event Control
Model Transformation with Hierarchical Discrete-Event Control
Software Architecture & Design
Presentation transcript:

McGill University School of Computer Science COMP 763 Ph.D. Student in the Modelling, Simulation and Design Lab Eugene Syriani 1

COMP 763 PROGRAMMED GRAPH REWRITING WITH DEVS Eugene Syriani and Hans Vangheluwe. Programmed Graph Rewriting with DEVS. Proceedings of the 4 th International Conference Applications of Graph Transformations with Industrial Relevance (AGTIVE 2007), Lecture Notes in Computer Science (LNCS). Springer-Verlag, October Kassel, Germany. 2

COMP 763 OVERVIEW  In the context  Existing Programmed Graph Rewriting Systems  AToM 3 ’s graph rewriting engine by example  Modelled and Modular Timed Graph Transformation (MoTif): Mimic AToM 3 and beyond  Conclusion and Future Work 3

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 4 [1] Blostein D., Fahmy H., Grbavec A., Practical Use of Graph Rewriting, Technical Report No , 1995.

COMP 763 Tabular: success & failure lists for each production Diagrammatic: graphical representation of the flow, using arrows Textual: imperative programming language constructs IN THE CONTEXT Programmed Graph Rewriting CONCRETE SYNTAX 5 while(match) if Rule1 match = Rule2; elif Rule2 match = Rule1 || Rule2; elif Rule3 match = Rule3; else match = Rule1 || Rule2 || Rule3;

COMP 763 IN THE CONTEXT Cleanly tear apart 1.Transformation entities 2.Control flow, structure, hierarchy Graph transformation control flow primitives – Sequencing, Branching, Looping – Parallelism – Hierarchy – Time Programmed Graph Rewriting WISH LIST 6

COMP 763 OVERVIEW  In the context  Existing Programmed Graph Rewriting Systems  AToM 3 ’s graph rewriting engine by example  Modelled and Modular Timed Graph Transformation (MoTif): Mimic AToM 3 and beyond  Conclusion and Future Work 7

COMP 763 EXISTING PROGRAMMED GRAPH REWRITING SYSTEMS Programmed Graph Rewriting System (ProGReS) [2,3] 8 [2] Blostein D., Schürr A., Computing with graphs and graph rewriting, Proceedings in Informatics, pp. 1-21, [3] Schürr A., Winter A.J., Zündorf A., Graph grammar engineering with progres, Proceedings of ESEC, pp , Manfred NaglAndy SchürrAlbert Zündorf University of Aächen, Germany

COMP 763 PROGRES 9

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 10

COMP 763 EXISTING PROGRAMMED GRAPH REWRITING SYSTEMS From UML to JAVA And Back Again (FUJABA) [4,5] 11 [4] Nickel U., Niere J., Zündorf A. Tool demonstration: The FUJABA environment, Proceedings of ICSE, ACM Press, pp , [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, Since 1998 University of Kassel, Germany

COMP 763 FUJABA 12

COMP 763 FUJABA Implementation (JAVA) oriented: content of class methods is described by Story Charts diagrams Transformation Control Structure: Story Charts Sequencing ( success-fail transition) Branching ( if-else guard on transition) Looping ( for-all pattern) –Hierarchy –Parallelism –Time 13

COMP 763 EXISTING PROGRAMMED GRAPH REWRITING SYSTEMS MOFLON [6] 14 [6] Amelunxen C. et al. Moflon: A standard compliant metamodeling framework with graph transformations, Proceedings of MDA – Foundations and Applications, LNCS 4066, pp , Since 2004 University of Darmstädt, Germany

COMP 763 MOFLON 15

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 16

COMP 763 EXISTING PROGRAMMED GRAPH REWRITING SYSTEMS Visual Modelling and Transformation System (VMTS) [10,11] 17 [10] Lengyel L. et al., Control flow support in meta-model based model trasnformation frameworks, Proceedings of EUROCON, pp , [11] Lengyel L. et al., Model transformation with a visual control flow language, IJCS 1, pp , Since 2004 Budapest University of Technology and Economics, Hungary Tihamér LevendovszkyLászló Lengyel

COMP 763 VMTS 18

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 19

COMP 763 EXISTING PROGRAMMED GRAPH REWRITING SYSTEMS Graph Rewriting and Transformation (GReAT) [7,8,9] 20 [7] Vizhanyo A. et al., Towards generation of high-performance transformations, Proceedings of GPCE, LNCS 3286 pp , [8] Agrawal A., Metamodel based model transformation language, Proceedings of OOPSLA, ACM Press pp , [9] Agrawal A., The design of a language for model transformations, SoSym 5, pp , Since 2001 Vanderbilt University, Nashville (TN), USA Gabor KarsaiAditya Agrawal

COMP 763 GREAT 21

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 22

COMP 763 OVERVIEW  In the context  Existing Programmed Graph Rewriting Systems  AToM 3 ’s graph rewriting engine by example  Modelled and Modular Timed Graph Transformation (MoTif): Mimic AToM 3 and beyond  Conclusion and Future Work 23

COMP 763 BUILDING EXAMPLE WITH ATOM 3 [12] Simplified PacMan formalism [13] [12] de Lara J., Vangheluwe H., AToM 3 : A tool for multi-formalism and meta-modelling, LNCS (2002), [ 13] Heckel R., Graph Transformation in a nutshell, ENTCS (2006),

COMP 763 BUILDING EXAMPLE WITH ATOM 3 Build the Meta-Model of the PacMan formalism 25

COMP 763 BUILDING EXAMPLE WITH ATOM 3 Build the Graph Grammar 26

COMP 763 BUILDING EXAMPLE WITH ATOM 3 Build the Graph Grammar pacLink 3 ghostLink 3 1: return self.LHS.nodeWithLabel(1).score pacLink foodLink 6 4 pacLink P 1 P 2 27

COMP 763 BUILDING EXAMPLE WITH ATOM 3 Build the Graph Grammar gridLeft ghostLink gridLeft ghostLink gridRight pacLink gridRight pacLink 3 3 P 3 28

COMP 763 BUILDING EXAMPLE WITH ATOM 3 29

COMP 763 BUILDING EXAMPLE WITH ATOM 3 Capture a trace of execution – Keep log of used rules 30

COMP 763 OVERVIEW  In the context  Existing Programmed Graph Rewriting Systems  AToM 3 ’s graph rewriting engine by example  Modelled and Modular Timed Graph Transformation (MoTif): Mimic AToM 3 and beyond  Conclusion and Future Work 31

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 32

COMP 763 OVERVIEW OF THE DEVS FORMALISM Block: – Atomic – Coupled Port: – Inport – Outport Event Global time 33

COMP 763 OVERVIEW OF THE DEVS FORMALISM Atomic DEVS: – Time Advance – Output Function – Internal Transition –External Transition ATOMIC 34

COMP 763 OVERVIEW OF THE DEVS FORMALISM Coupled DEVS C A1 A2 A3 35

COMP 763 C OVERVIEW OF THE DEVS FORMALISM Coupled DEVS: – Select Function A1 A2 36

COMP 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: 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] 37

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 38

COMP 763 MOTIF META-MODEL 39

COMP 763 MOTIF MODELLING ENVIRONMENT 40 CRule Ports Atomic RuleSynchronizer Coupled Rule Atomic DEVS Coupled DEVS pyDEVS Generator

COMP 763 MOTIF Model AToM 3 ’s graph transformation engine Input graph Step Send graph to transform Transformed graph Rules used 41

COMP 763 MOTIF 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 42

COMP 763 MOTIF 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 43

COMP 763 MOTIF Given the ASG of the model  Loading 1.Build N={label:[Nodes]} the list of the potential nodes of the isomorphic subgraph with the LHS label as key 2.Initialize M empty  LHS Match 3.From each root, perform an incremental DFS that finds the nodes (path) one by one 4.When path is complete, build M={label:node} of matched nodes 5.If M is incomplete: FAIL  RHS application 6.Remove nodes from the in/out-connections and from the graph dictionary 7.Create new nodes in the graph dictionary and connect them 8.Modify attributes 9.SUCCESS Compiling the rules 44

COMP 763 MOTIF Use compiled version of AToM 3 ’s rule class Pacmandie:... 45

COMP 763 MOTIF Given the ASG of the model  Pre-generation 1.Generate Executer for simulation and Event classes 2.Generate the Environment: User, Controller and interface with the model  Model to DEVS:  Model to DEVS: Visitor Pattern 3.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 3 Call the DEVSGenerator with its information  DEVS to code:  DEVS to code: Command Pattern 6.Atomic block code generator 7.Coupled block code generator 8.Special blocks code generator 9.Use of predefined constants Generating pyDEVS code 46

COMP 763 MOTIF 47 GENERATE IMPORT SIMULATE

COMP 763 MOTIF 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 48

COMP 763 MOTIF 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 49

COMP 763match_fail g_in match_fail g_in MOTIF Extension of AToM 3 ’s graph transformation engine g_ing_succeed match_succeed g_in g_fail match_succeed match_fail match_succeed 50

COMP 763 MOTIF Controlled Transformations Layered Transformations Prioritized Transformations Priorities revisited 51

COMP 763 OVERVIEW  In the context  Existing Programmed Graph Rewriting Systems  AToM 3 ’s graph rewriting engine by example  Modelled and Modular Timed Graph Transformation (MoTif): Mimic AToM 3 and beyond  Conclusion and Future Work 52

COMP 763 SUMMARY Sequence Branching Looping Hierarchy + Modularity Parallelism Time Control flow structure properties satisfied 53

COMP 763 CONCLUSION AND FUTURE WORK DEVS is a sequential formalism Parallel-DEVS Kiltera (CSP-like languages) Parallelism 54

COMP 763 IN COMPLETION FUTURE WORK Metric, Statistics Timed graph transformation Real-Time DEVS Simulation… Time 55

COMP 763 COMPLETED FUTURE WORK Event-driven Graph Rewriting Modelling of the user  Web-based pacman game – AJAX – SVG – Real-time User - Events 56

COMP 763 FUTURE WORK Optimization on rule application Information on the flow Replace python code by... Statechart? Modelica? Kermeta? Some Extensions 57

COMP 763 MORE REFERENCES 13.Progres website: 14.Fujaba website: 15.MOFLON website: 16.VMTSwebsite: 58

COMP 763 Are we at the right level of abstraction? Is it the way industry should go in model transformation? 59