Behaviour-Preserving Model Transformation Arend Rensink, University of Twente IPA Spring Days, 18 April 2012.

Slides:



Advertisements
Similar presentations
Eugene Syriani and Huseyin Ergin University of Alabama Software Modeling Lab Software Engineering Group Department of Computer Science College of Engineering.
Advertisements

June 9, 2006 Transforming models with ATL © 2006 ATLAS Nantes Transforming models with ATL The A TLAS Transformation Language Frédéric Jouault ATLAS.
ARTIST2 - MOTIVES Trento - Italy, February 19-23, 2007 Model Transformation and UML Reiko Heckel University of Leicester, UK Foundations of Model Transformation.
Budapesti Műszaki és Gazdaságtudományi Egyetem Méréstechnika és Információs Rendszerek Tanszék Model Transformation Lab From UML Activities to Petri nets.
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.
Model-Based Programming: Executable UML with Sequence Diagrams By Ruben Campos Cal State L.A. Computer Science Thesis Work Spring 2007.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
Interactive Generation of Integrated Schemas Laura Chiticariu et al. Presented by: Meher Talat Shaikh.
1 © Wolfgang Pelz UML3 UML 3 Notations describe how to use reusable software. Package Component Deployment Node.
Model checking dynamic states in GROOVE Arend Rensink Formal Methods and Tools University of Twente.
30 March 2005, IPA lentedagen, BredaGraph-Based State Spaces1 Graph Transformation for Model Transformation Arend Rensink University of Twente.
Institute For Software Integrated Systems Vanderbilt University Applications of Model Integrated Computing to The Synchronous Language Signal Ethan Jackson.
Programming Language Semantics Mooly SagivEran Yahav Schrirber 317Open space html://
Slide 1 Chapter 2-b Syntax, Semantics. Slide 2 Syntax, Semantics - Definition The syntax of a programming language is the form of its expressions, statements.
Object-Oriented Theories for Model Driven Architecture Tony Clark, King’s College, UK. Andy Evans, University of York, UK. Robert France, Colorado University,
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
1/31 CS 426 Senior Projects Chapter 1: What is UML? Chapter 2: What is UP? [Arlow and Neustadt, 2005] January 22, 2009.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
Describing Syntax and Semantics
(2.1) Grammars  Definitions  Grammars  Backus-Naur Form  Derivation – terminology – trees  Grammars and ambiguity  Simple example  Grammar hierarchies.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
An Information Theory based Modeling of DSMLs Zekai Demirezen 1, Barrett Bryant 1, Murat M. Tanik 2 1 Department of Computer and Information Sciences,
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.
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer Mappings, Use of MOF for Language Families Joachim Fischer Workshop on.
1 Introduction to Modeling Languages Striving for Engineering Precision in Information Systems Jim Carpenter Bureau of Labor Statistics, and President,
1 MODEL PATTERNS (WHAT STANDS IN THE WAY OF MORE WIDESPREAD ADOPTION OF MODEL-DRIVEN ENGINEERING?) Arend Rensink, University of Twente ECMFA Keynote, 22.
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,
1 MDWE'2008, Toulouse, France, September 30, 2008 A Comparative Analysis of Transformation Engines for User Interface Development Juan Manuel González.
Assessing the Suitability of UML for Modeling Software Architectures Nenad Medvidovic Computer Science Department University of Southern California Los.
What is “model transformation”? Distinction between source and target Source may be same as target May be multiple sources, or targets Reaching a fixed.
Validated Model Transformation Tihamér Levendovszky Budapest University of Technology and Economics Department of Automation and Applied Informatics Applied.
Introduction to Graph Grammars Fulvio D’Antonio LEKS, IASI-CNR Rome,
University of Paderborn Software Engineering Group Prof. Dr. Wilhelm Schäfer Towards Verified Model Transformations Holger Giese 1, Sabine Glesner 2, Johannes.
Overview of Previous Lesson(s) Over View  An ambiguous grammar which fails to be LR and thus is not in any of the classes of grammars i.e SLR, LALR.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
1 Graph-Based State Spaces Arend Rensink, University of Twente CamPaM 2012 April 2012Graph-Based State Spaces.
1 Advanced Software Architecture Muhammad Bilal Bashir PhD Scholar (Computer Science) Mohammad Ali Jinnah University.
4 March 2005, NVTI day, UtrechtGraph-Based State Spaces1 Arend Rensink University of Twente.
I-Neighbourhood Abstraction in Graph Transformation Arend Rensink University of Twente Based on work with: Jörg Bauer, Iovka Boneva, Dino Distefano, Marcus.
Multi-Path Development of User Interfaces 1 Quentin Limbourg Louvain-la-Neuve, 4th November 2004.
Semantics Preserving Transformation: An Impossible Dream? Arend Rensink, University of Twente BX Position Statement.
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.
Chapter 3 Part II Describing Syntax and Semantics.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Future Work  Formal specification of modeling language semantic is key issue  Reliance on well-established formal models of computation (i.e. finite.
Overview of Previous Lesson(s) Over View  In syntax-directed translation 1 st we construct a parse tree or a syntax tree then compute the values of.
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.
Programming Language Descriptions. What drives PL Development? Computers are “in charge” of extremely important issues Execute a program literally. Exercise.
Parsing and Code Generation Set 24. Parser Construction Most of the work involved in constructing a parser is carried out automatically by a program,
C H A P T E R T W O Linking Syntax And Semantics Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
AOP/cross-cutting What is an aspect?. An aspect is a modular unit that cross-cuts other modular units. What means cross-cutting? Apply AOP to AOP. Tease.
GRAMMARS & PARSING. Parser Construction Most of the work involved in constructing a parser is carried out automatically by a program, referred to as a.
1 CEN 4020 Software Engineering PPT4: Requirement analysis.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
UML (Unified Modeling Language)
SysML 2.0 Requirements for Visualization
Course Outcomes of Object Oriented Modeling Design (17630,C604)
State Digrams in UML: A Formal Senmatics using Graph Transformations
Graph-Based Operational Semantics
Discussion with Gregor Kiczales at UBC
Object Oriented Analysis and Design
Internet of Things A Process Calculus Approach
Generic Language Technology (2IS15) Dynamic Semantics
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Analysis models and design models
Introduction to Graph Transformation
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Software Architecture & Design
Presentation transcript:

Behaviour-Preserving Model Transformation Arend Rensink, University of Twente IPA Spring Days, 18 April 2012

Models in Science 2 18 April 2012Behaviour Preserving Model Transformation Physical world Mathematical model explanation prediction description

Models in computer science 18 April 2012Behaviour Preserving Model Transformation 3

Use case diagram Sequence diagram Class diagram Statechart Models for software requirements and design 18 April 2012Behaviour Preserving Model Transformation 4

Models for software implementation 18 April 2012Behaviour Preserving Model Transformation 5  Is this a model?  Claim:  Textual and graphical models only differ in concrete syntax  Compilation is a special case of model transformation while (x >= y) x = x – y; x = x-y x >= y ? yes no

 Definition of modelling language  Definition of model transformation  Definition of language semantics Syntax Modelling Language Aspects of models in software development 18 April 2012Behaviour Preserving Model Transformation 6 Semantic domain Modelling Language Semantics Transfor- mation Modelling Language

Transfor- mation Syntax Semantics Require- ments Design Semantic domain Transfor- mation Program Semantics Syntax The role of models in software development 18 April 2012Behaviour Preserving Model Transformation 7

Structure of this presentation 18 April 2012Behaviour Preserving Model Transformation 8  Models in Software Engineering  Syntax, semantics, transformation  Graph Transformation  Provides uniform framework  Behaviour preservation  Observational equivalence  Examples  Graph-based syntax and semantics  Triple graph-based model transformation  Conclusion  What you should take home

9 Graph Transformation  Formalism to capture dynamics of graph-like structures  Transformation rules embody predefined changes to graphs  Aim: Provide a universal modelling framework  All elements in previous slides can be formalised:  Syntax: Syntax graphs + graph grammar  Transformation: Syntax graphs + transformation rules  Semantics: States + operational semantics  Why graph transformation?  Very powerful, widely applicable paradigm  Graphs are natural for the software modelling domain  Capture the essentials of (many) discrete structures  Direct capabilities for visualisation 18 April 2012Behaviour Preserving Model Transformation

18 April 2012Behaviour Preserving Model Transformation 10 Graphs as models  Example state graph  Nodes represents objects  Edges represent fields or relations between objects  Here: Circular buffer  Objects inserted at the tail (last element)  Objects removed from the head (first element)

18 April 2012Behaviour Preserving Model Transformation 11 Type graphs as metamodels  Compare with (UML) class diagrams  Nodes stand for object types  Also supported: Node inheritance  Edges stand for field/relation types  Also supported: Multiplicities

18 April 2012Behaviour Preserving Model Transformation 12 Relation between instance and type graphs  Typing is a (weak) structuring mechanism  Limits node and edge labels and their interconnection  May enforce presence of edges through multiplicities State graphType graph

18 April 2012Behaviour Preserving Model Transformation 13 Graph rewrite rules  A rule embodies a particular change to a graph  Left Hand Side (LHS): should be matched in the host (source) graph  Difference of Right Hand Side (RHS) and LHS defines change  Negative Application Condition (NAC): should not occur in host graph  Compare to string rewriting  Graph rewrite rules are context sensitive  Graph Production System: Set of rewrite rules LHS RHS NAC Putting an element into a circular buffer:

18 April 2012Behaviour Preserving Model Transformation 14 Single-graph representation blue = eraser: LHS, not RHS to be matched and deleted green = creator: RHS, not LHS to be added black = reader: LHS and RHS to be matched and preserved red = embargo: NAC, not LHS forbidden

18 April 2012Behaviour Preserving Model Transformation 15 forbidden Graph productions Rewrite rule source graph matching Graph transition (labelled by rule and underlying morphism graph morphism target graph pushout NAC NACs LHSRHS rule morphism

18 April 2012Behaviour Preserving Model Transformation 16 Example production LHS RHS NAC

18 April 2012Behaviour Preserving Model Transformation 17 Graph Transition Systems put get Isomorphic state graphs are collapsed together

Structure of this presentation 18 April 2012Behaviour Preserving Model Transformation 18  Models in Software Engineering  Syntax, semantics, transformation  Graph Transformation  Provides uniform framework  Behaviour preservation  Observational equivalence  Examples  Graph-based syntax and semantics  Triple graph-based model transformation  Conclusion  What you should take home

Behaviour preservation 18 April 2012Behaviour Preserving Model Transformation 19

Transfor- mation Syntax Semantics Require- ments Design Semantic domain Transfor- mation Program Semantics Syntax Behaviour preservation needs semantics 18 April 2012Behaviour Preserving Model Transformation 20

Structure of this presentation 18 April 2012Behaviour Preserving Model Transformation 21  Models in Software Engineering  Syntax, semantics, transformation  Graph Transformation  Provides uniform framework  Behaviour preservation  Observational equivalence  Examples  Graph-based syntax and semantics  Triple graph-based model transformation  Conclusion  What you should take home

Two laughably simple languages: Syntax 18 April 2012Behaviour Preserving Model Transformation 22  Language A: Featherweight flow graphs  Statements and next-arrows  Language B: Featherweight activity diagrams  Actions and connectors Type Instance Syntax Modelling Language

Language semantics 18 April 2012Behaviour Preserving Model Transformation 23  Language A: Thread-based execution  Language B: Token-based execution start next start next-offer next-take Semantic domain Modelling Language Semantics

Once more: Behaviour preservation 18 April 2012Behaviour Preserving Model Transformation 24  Initial thought: use rule names as transition labels  Does not work: rule names chosen for understandability  Names for comparable activities may differ between languages  For instance: A’s next does not correspond to B’s next-* actions  Refinement: allow relabelling between semantics  Map actions of one language onto that of the other  In LTS: make (sequences of) transitions unobservable or atomic  In this example: two possibilities  Rename one of B’s next-* to next and make the other invisible  Combine next-offer + next-take into single atomic action

Model transformation 18 April 2012Behaviour Preserving Model Transformation 25  In general, transformation occurs between different languages  In-place (endogenous) or side-by-side (exogenous)  For traceability, exogenous is to be preferred  Triple graph: composition of  Syntax graph of language A  Syntax graph of language B  Glue graph: connects A-elements with B-elements (tracing)  Triple graph grammar: builds A- and B-models + glue simultaneously  Each triple graph can be projected onto source and target graph Transfor- mation Modelling Language A-graph B-graph Glue graph

Laughably simple triple graph grammar 18 April 2012Behaviour Preserving Model Transformation 26 AB-init AB-new-state AB-new-next A-graphsGlueB-graphs

Finally: Behaviour preservation 18 April 2012Behaviour Preserving Model Transformation 27  For every combined graph produced by the triple graph grammar … … if we project to the A- and B-models … … and compute the corresponding LTS using the semantic rules … … and apply action relabelling … … then the LTSs are weakly bisimilar (Full Semantics Preservation in Model Transformation – A Comparison of Proof Techniques, IFM 2010) Semantics Semantic domain Semantics A-graph B-graph Glue graph A-graph B-graph

Structure of this presentation 18 April 2012Behaviour Preserving Model Transformation 28  Models in Software Engineering  Syntax, semantics, transformation  Graph Transformation  Provides uniform framework  Behaviour preservation  Observational equivalence  Examples  Graph-based syntax and semantics  Triple graph-based model transformation  Conclusion  What you should take home

Conclusions 18 April 2012Behaviour Preserving Model Transformation 29  Modelling is the new programming  We should take our models more seriously  Compilation is a special case of model transformation  Distinction between textual and graphical languages is artificial  Learn (more) lessons from compiler construction  Behaviour preservation is a tough proof obligation  Universally quantified over all models in a language  Requires semantics of modelling languages  Alternative: run-time verification

18 April 2012Behaviour Preserving Model Transformation 30 What you should take home Triple graph grammar Graph grammar Graph-based semantics Require- ments Design Graph Transition Systems Triple graph grammar Program Graph-based semantics Graph grammar