event-driven model transformations in domain-specific modeling languages

58
Budapesti Műszaki és Gazdaságtudományi Egyetem Méréstechnika és Információs Rendszerek Event-driven Model Transformations in Domain- specific Modeling Languages PhD thesis István Ráth

Upload: istvan-rath

Post on 06-May-2015

965 views

Category:

Technology


2 download

DESCRIPTION

PhD Theses overview, presented at public defense.

TRANSCRIPT

Page 1: Event-driven Model Transformations in Domain-specific Modeling Languages

Budapesti Műszaki és Gazdaságtudományi EgyetemMéréstechnika és Információs Rendszerek Tanszék

Event-driven Model Transformations in Domain-specific Modeling Languages

PhD thesisIstván Ráth

Page 2: Event-driven Model Transformations in Domain-specific Modeling Languages

Introduction

Page 3: Event-driven Model Transformations in Domain-specific Modeling Languages

Software Engineering by Domain-specific Modeling

Page 4: Event-driven Model Transformations in Domain-specific Modeling Languages

Challenges

Complexity of modeling environments• Multi-aspect modeling,

language families, product lines, …

Page 5: Event-driven Model Transformations in Domain-specific Modeling Languages

Challenges

Scalability of MDE toolchains• Large models vs.

incremental change propagation

• Tool integration in heterogeneous environments

Page 6: Event-driven Model Transformations in Domain-specific Modeling Languages

Challenges

Usability issues of DSMLs• Abstraction: abstract-

concrete syntax• Dynamics: execution

semantics

Page 7: Event-driven Model Transformations in Domain-specific Modeling Languages

Tool integration

Research goals

Advanced language engineering features

Model transformations

Abstraction

Simulation

Multi-aspect modeling

Change propagation

Incrementalcode

generation

“Middleware” for MDSE

DSM complexity and usability challenges Advanced language engineering solutions

Page 8: Event-driven Model Transformations in Domain-specific Modeling Languages

Advanced language engineering

Page 9: Event-driven Model Transformations in Domain-specific Modeling Languages

Motivation: limited abstractions Limitations of abstract-concrete syntax

representation in DSM language engineering frameworks

Usability problem!

Page 10: Event-driven Model Transformations in Domain-specific Modeling Languages

Separating abstract and concrete syntax

What? o concrete syntax diagramso abstract syntax logical model

Why?o reduce complexity for the usero Give more power

to the language engineer

Test : Class

“id0” :String

ID : Attribute

Test

ID: id0

Abstractsyntax

Concretesyntax

Page 11: Event-driven Model Transformations in Domain-specific Modeling Languages

Objectives Arbitrary mapping

o abstractiono aggregation

o diagram-specific elements

o decorators

p0 : Place

t0:Token

:token

t1:Token t2:Token

:token :token

h0Logical model Diagram

3

Page 12: Event-driven Model Transformations in Domain-specific Modeling Languages

Solution

Bi-directional mappingo goal: arbitrary mappingomeans: event-driven transformations (EDT)

p0 : Place

t0:Token

:token

t1:Token t2:Token

:token :token 3

h0_p0 : PlaceFigure:model

Logical model Diagram model Diagram

tokenCount:Property

:propertyEDT

Page 13: Event-driven Model Transformations in Domain-specific Modeling Languages

Motivation: no design-time simulation support

Dynamic semantics specification and execution still a missing feature from industrial DSM environments Dedicated simulators serve a different purpose General case: execution semantics introduced only during code

generation phase delayed appearance of design errors

Page 14: Event-driven Model Transformations in Domain-specific Modeling Languages

Design-time simulation Discrete Event System Specification (DEVS)

o Denotational semantics (specified by event-driven GT rules) generic approach

o Supports state automata, Kripke structures, Petri nets, DFNs, BPEL/BPMN, UML statecharts, …

Execution modeso Interactive (guided debugging)o Automatic (stochastic)

Page 15: Event-driven Model Transformations in Domain-specific Modeling Languages

Simulation efficiency

100 1000 10000 10000010

100

1000

10000

100000

1000000

Sparse Petri net benchmark

Viatra/RETE (x1k)

Viatra/LS (x1k)

Viatra/RETE (x1M)

Petri net size

Exec

ution

tim

e (m

s)

Page 16: Event-driven Model Transformations in Domain-specific Modeling Languages

Thesis 2: automatic model transformations in domain-specific languages

Collaboration

2.1. Multi-aspect modeling for DSMLs based on multiple instantiation and metamodel hierarchies

2.2. Complete separation of abstract and concrete syntax representations

2.3. Design-time interactive simulation (specification and execution semantics)

2.4. Efficient implementation techniques, verification by benchmarking

2.2. András Ökrös (MSc student)

2.3. Dávid Vágó

Page 17: Event-driven Model Transformations in Domain-specific Modeling Languages

Important related publicationsJournal paper István Ráth, András Ökrös, and Dániel Varró. Synchronization of abstract and concrete syntax in

domain-specific modeling languages. Software and Systems Modeling, 9:453–471, 2010. 6 citations

International Conferences Ajab Khan, Reiko Heckel, Paolo Torrini, and István Ráth. Model-based stochastic simulation of P2P

VoIP using graph transformation. 17th International Conference on Analytical and Stochastic Modeling Techniques and Applications, 2010. 3 citations

Paolo Torrini, Reiko Heckel, and István Ráth. Stochastic simulation of graph transformation systems. Fundamental Approaches to Software Engineering, 6013/2010 LNCS pp. 154–157. 3 citations

István Ráth, Dávid Vágó, and Dániel Varró. Design-time simulation of domain-specific models by incremental pattern matching. The IEEE Symposium on Visual Languages and Human-Centric Computing, VL/HCC 2008 pp. 219–222. Acceptance rate: 29%. 2 citations

István Ráth and Dániel Varró. Challenges for advanced domain-specific modeling frameworks. International Workshop on Domain Specific Program Development(DSPD2006), Nantes, France, July 2006. 7 citations

National conferences István Ráth. Modelltranszformációk integrált alkalmazása domain-specifikus nyelvekben. In Tavaszi

Szél Konferenciakiadvány, 2009. István Ráth. Declarative mapping between abstract and concrete syntax of domain- specific visual

languages. In The Proceedings of the Fifth Conference of PhD Students in Computer Science, 2006.

Page 18: Event-driven Model Transformations in Domain-specific Modeling Languages

Tool integration

Research goals

Advanced language engineering features

Model transformations

Abstraction

Simulation

Multi-aspect modeling

Change propagation

Incrementalcode

generation

“Middleware” for MDSE

Efficiency for language engineeringIntegrated MTs

new execution model

Page 19: Event-driven Model Transformations in Domain-specific Modeling Languages

Event-driven transformations

Page 20: Event-driven Model Transformations in Domain-specific Modeling Languages

Motivation Domain-specific modeling applications don’t align

well with the batch execution modeloModel/view synchronizationoModel queries and reports

S2S1

T2T1

t tL

modification

update

S3

T3

tL

Sn

Tn

tLtransformation

context

Key ideas: • Correlate events to

model changes• Capture formally by

graph pattern match set changes

• Adapt graph transformations to specify reactions

Source model

Target model

Page 21: Event-driven Model Transformations in Domain-specific Modeling Languages

Graph Transformations in VIATRA2

Phases of GT matching– Pattern Matching phase– Updating phase: delete+ create

LHS RHS

Place

Token

Tran. Placea1:inarc a2:outarc

Place

Token

Tran. Plana1:inarc a2:outarc

ttn1:tokens tkn2:tokens

matching updating

Pattern Matching is the most critical issue from performance viewpoint Matches can be cached and updated incrementally by RETE nets Changes in the match sets can be detected efficiently

Page 22: Event-driven Model Transformations in Domain-specific Modeling Languages

MS(PA)

Matching set delta monitor

MS(PB)

fall

rise

Incremental pattern matcher

C

D

U

C

D

D

U

C

Conditions

Transactions

Model Store

Transaction1

Transaction2

Comm

it

Notification

ExecutionEngine

trigger actions

Events

Event-driven graph transformations

Page 23: Event-driven Model Transformations in Domain-specific Modeling Languages

MS(PA)

Matching set delta monitor

MS(PB)

fall

rise

Incremental pattern matcher

C

D

U

C

D

D

U

C

Conditions

Transactions

Model Store

Transaction1

Transaction2

Comm

it

Notification

ExecutionEngine

trigger actions

Events

Event-driven graph transformations

Event-Condition-Action formalism• Adapted from expert systems• Specification language: graph triggers• Execution semantics: priority queue automatonEvent-driven Transformations• Run in the background• React when necessary• Model/view synchronization, change processing, …

Page 24: Event-driven Model Transformations in Domain-specific Modeling Languages

Thesis 1: event-driven model transformations

Collaboration

1.1. Concepts for event-driven GT based on incremental pattern matching

1.2. Execution semantics based on a queue automaton model

1.3. GT-based specification language: graph triggers

1.4. Efficient implementation techniques and a software framework, verification by benchmarking

1.4. András Ökrös, Gábor Bergmann (MSc students)

Page 25: Event-driven Model Transformations in Domain-specific Modeling Languages

Important related publicationsJournal paper István Ráth, András Ökrös, and Dániel Varró. Synchronization of abstract and concrete syntax in

domain-specific modeling languages. Software and Systems Modeling, 9:453–471, 2010. 6 citations

International conferences István Ráth, Gábor Bergmann, András Ökrös, and Dániel Varró. Live model transformations

driven by incremental pattern matching. International Conference on Model Transformations (ICMT2008), 5063/2008 LNCS, pp 107–121. Acceptance rate: 31%. 10 citations

Gábor Bergmann, Ákos Horváth, István Ráth, and Dániel Varró. Efficient model transformations by combining pattern matching strategies. International Conference on Model Transformations (ICMT2009), 5563/2009 LNCS, pp 20–34. Acceptance rate: 23% 4 citations

Gábor Bergmann, Ákos Horváth, István Ráth, and Dániel Varró. A benchmark evaluation of incremental pattern matching in graph transformation. International Conference on Graph Transformations, 5214/2008 LNCS, pp. 396–410. Acceptance rate: 40%. 11 citations

Gábor Bergmann, András Ökrös, István Ráth, Dániel Varró, and Gergely Varró. Incremental pattern matching in the VIATRA transformation system. 3rd International Workshop on Graph and Model Transformation. 30th International Conference on Software Engineering, 2008. 9 citations

Page 26: Event-driven Model Transformations in Domain-specific Modeling Languages

Applications in tool integration

Page 27: Event-driven Model Transformations in Domain-specific Modeling Languages

Tool integration

Research goals

Advanced language engineering features

Model transformations

Abstraction

Simulation

Multi-aspect modeling

Change propagation

Incrementalcode

generation

“Middleware” for MDSE

New applications new execution infrastructure

Page 28: Event-driven Model Transformations in Domain-specific Modeling Languages

Tool integration chains

Tool 1 (modeling)

Tool 2 (analysis)

Tool 3 (model annotation)

Tool n(code generator)

Tool k (documentation)

Tool m(test generator)

Tool x (test bench)

Page 29: Event-driven Model Transformations in Domain-specific Modeling Languages

Tool integration chains

Tool 1 (modeling)

Tool 2 (analysis)

Tool 3 (model annotation)

Tool n(code generator)

Tool k (documentation)

Tool m(test generator)

Tool x (test bench)

Challenge 1:Efficient change

propagation

Page 30: Event-driven Model Transformations in Domain-specific Modeling Languages

Change-driven transformations Incremental change propagation

Change-driven transformations

MA MB

M’A M’B

changeA changeB

TRTR

TR’TR’Model-based

domain-independent

change representation

Model transformations for change processing

Source model Target modelTraceability model

Page 31: Event-driven Model Transformations in Domain-specific Modeling Languages

Incremental and asynchronous code generation by CDTs

Asynchronous CDT

MA MB

M’A M’B

changeA CMB

IF

TRTR

TR’TR’

jPDLProcess

Description

jPDLProcess

Description

JBoss Workflow EngineJBoss Workflow Engine

Graphical DSML <node name=“Interface Type Mapping”> <action name=“UML2SAL Transformation” class = “…”> <toolId>UML2SAL transformer</toolId> <functionId>UML2SAL</functionId> <returnType>SALModel</returnType> <params> <entry> <key>umlModel</key><value>...<value> </entry> </params> </action> <transition from=“initial_node” to=“TCG-with-SAL-ATG” /></node>

Page 32: Event-driven Model Transformations in Domain-specific Modeling Languages

Incremental and asynchronous code generation by CDTs

Asynchronous CDT

MA MB

M’A M’B

changeA CMB

IF

TRTR

TR’TR’

jPDLProcess

Description

jPDLProcess

Description

JBoss Workflow EngineJBoss Workflow Engine

Graphical DSML <node name=“Interface Type Mapping”> <action name=“UML2SAL Transformation” class = “…”> <toolId>UML2SAL transformer</toolId> <functionId>UML2SAL</functionId> <returnType>SALModel</returnType> <params> <entry> <key>umlModel</key><value>...<value> </entry> </params> </action> <transition from=“initial_node” to=“TCG-with-SAL-ATG” /></node>

1

2 3

4

5

Page 33: Event-driven Model Transformations in Domain-specific Modeling Languages

Tool x (test bench)

Integration challenges

Tool 1 (modeling)

Tool 2 (analysis)

Tool 3 (model annotation)

Tool n(code generator)

Tool k (documentation)

Tool m(test generator)

Infrastructural challenges:• Many tools• Many formats• Many (types of) users• Collaborative data access• Process management

Solution:SENSORIA Development Environment• Tool integration framework• Model-based workflow orchestrations• Distributed infrastructure based on a

model bus

Page 34: Event-driven Model Transformations in Domain-specific Modeling Languages

Thesis 3: Tool integration based on change-driven transformations

Collaboration

3.1. Concept of change-driven transformations

3.2. New implementation techniques for incremental code generation by CDTs

3.3. Remote service invocation in the SENSORIA Development Environment

3.4. Implementation architecture for tool integration

3.5. Model-based framework for development workflows and synchronization

3.3. Ádám Horváth (MSc student)

3.4-3.5. Dr. Balázs Polgár & others

Page 35: Event-driven Model Transformations in Domain-specific Modeling Languages

Important related publicationsBook chapters István Ráth and Philip Mayer. The SENSORIA Development Environment. Book chapter in: Rigorous

Software Engineering for Service-Oriented Systems: Results of the SENSORIA project on Software Engineering for Service-Oriented Computing, Springer, 2010 (Accepted).

András Balogh, Gábor Bergmann, György Csertán, László Gönczy, Ákos Horváth, István Majzik, András Patariza, Balázs Polgár, István Ráth, Dániel Varró, Gergely Varró. Workflow-driven tool integration using model transformations. Book chapter in: Graph Transformations and Model-Driven Engineering, 5765 LNCS, pp. 224–248. 1 citation

Journal paper Bergmann Gábor, István Ráth, Gergely Varró, and Dániel Varró. Change-driven model transformations:

Change (in) the rule to rule the change. Journal of Software and Systems Modeling, 2011 (Accepted).

International conferences István Ráth, Gergely Varró, and Dániel Varró. Change-driven model transformations. Model Driven

Engineering Languages and Systems, 12th International Conference, MODELS 2009. 5795/2009 LNCS. Springer Best Paper Award and ACM Distinguished Paper Award; Acceptance rate: 18%. 2 citations

Balázs Polgár, István Ráth, Zoltán Szatmári, and István Majzik. Model-based Integration, Execution and Certification of Development Tool-chains. The 2nd ECMDA Workshop on Model-Driven Tool and Process Integration, 2009. 1 citation

Page 36: Event-driven Model Transformations in Domain-specific Modeling Languages

Summary

Page 37: Event-driven Model Transformations in Domain-specific Modeling Languages

New results

Event-driven transformations by incremental pattern matching• Specification language• Execution semantics and infrastructure

Advanced language engineering by EDTs• Interactive/stochastic simulation of dynamic semantics• Abstract-concrete synchronization

Tool integration by change-driven transformations• Incremental code generation• Incremental change propagation to deployed models

Page 38: Event-driven Model Transformations in Domain-specific Modeling Languages

Applications of new results in the VIATRA2 project

VIATRA2: state-of-the-art graph transformation frameworko Event-driven transformation engineo ViatraDSM: domain-specific modeling front-end

Collaborative follow-up researcho GraTS: stochastic simulator developed with the

University of Leicestero EMF-IncQuery: EMF-based implementation platform

for all of the new results

Page 39: Event-driven Model Transformations in Domain-specific Modeling Languages

Applications in EU projects DSM tools and incremental transformations

o Development workflow modeling o Model synchronization,

change impact analysis for requirements modeling

Tool integrationo SENSORIA Development Environment

• software engineering for SOA• automated configuration generation• formal verification by model checking

o MOGENTES extended tool integration framework• automated test generation for railway systems

Page 40: Event-driven Model Transformations in Domain-specific Modeling Languages

Publication overview Number of publications: 28

o Book chapters: 3o International journal articles: 5o International conference papers: 15o National conference papers: 4

Peer reviewed: 24 Independent citations: 81, h-index: 6 ACM Distinguished Paper and Springer Best Paper

Awards at the MODELS 2009 Conference

Page 41: Event-driven Model Transformations in Domain-specific Modeling Languages

Answers to reviewers

Prof. Dr. Richard Paige

Page 42: Event-driven Model Transformations in Domain-specific Modeling Languages

Remark 1

„While the thesis demonstrates the breadth of application of event-driven transformations, the introduction of the thesis might be improved by focusing more on event-driven transformations, perhaps by including one or two coherent, concise scenarios where event-driven transformations are the most suitable approach to apply solving the problem. These scenarios are straightforward to produce, and may improve readability.”

Page 43: Event-driven Model Transformations in Domain-specific Modeling Languages

Answer “Typical” EDT scenarios

oModel synchronizationoWell-formedness constraint evaluationo Simulationo Traceability management

Page 44: Event-driven Model Transformations in Domain-specific Modeling Languages

Remark 2„The breadth of applicability of the concepts outside of the VIATRA2 framework would be strengthened with either more detailed comparison with related model management frameworks (oAW, AMMA and Epsilon come to mind), or by summarising briefly how the concept of event driven transformations could be supported in other approaches. At the moment, the thesis is presented almost entirely in the context of VIATRA2; I am convinced that the work is more generally applicable, but the thesis could help the community more by synthesising lessons learned that could help other model management framework developers.”

Page 45: Event-driven Model Transformations in Domain-specific Modeling Languages

Answer Key: notion of event Transformation needs to be split into two major

phaseso Query: Pattern matching-based approach for queries

supported by EMF-IncQuery over EMF modelsoModel manipulation: EMF-based MT tools can be

invokedo Care needs to be taken for technological issues

(parameter passing, …) Other approaches for incremental queries also

feasible (Drools, Egyed’s inconsistency management framework, …)

Page 46: Event-driven Model Transformations in Domain-specific Modeling Languages

Question 1

„I would ask them, in particular, about the amount of context needed to run an event transformation, and about the relationship between event-driven and batch transformation (i.e., what problems may occur when having batch and event-driven transformations interact).”

Page 47: Event-driven Model Transformations in Domain-specific Modeling Languages

Answer Context

o Detection of changes: match sets of patternso Global (session) variables

Event-driven vs. batch transformationso EDT lifecycle can be managed by BTso BT (modules) can be called by EDTso Possible problems

• Parameter passing• execution timeout

Open research question: how to transform an existing BT into an EDT?o Currently under investigation

Page 48: Event-driven Model Transformations in Domain-specific Modeling Languages

Question 2

„I would also ask about the relationship between event-driven transformations and complex event processing engines, and the extent to which the event infrastructure can deal with large numbers of events.”

Page 49: Event-driven Model Transformations in Domain-specific Modeling Languages

Answer Event processing engines

o Droolso IBM WebSphere JRules (ILOG)o Esper

Slight difference in the notion of evento Explicit events vs. inferred eventso Adaptation very well possible as shown by ongoing

research Keys to Scalability

o (Filtering)o Hybrid PM

• Combine INC + LS strategies

Page 50: Event-driven Model Transformations in Domain-specific Modeling Languages

Answers to reviewers

Prof. Dr. Tibor Gyimóthy

Page 51: Event-driven Model Transformations in Domain-specific Modeling Languages

Question 1

„The thesis uses Petri nets as example. Did you make experiments with real life domain specific languages regarding any of your contributions? (For example AUTOSAR is mentioned in Chapter 6 in connection with limitations of GMF.)”

Page 52: Event-driven Model Transformations in Domain-specific Modeling Languages

Answer

DSMLs for academic prototypeso E-R, Petri net, UML profile adaptations, …

DSMLs for workflow modeling (SENSORIA, MOGENTES) Queries for AUTOSAR (collaboration with OptXware) Model synchronization in the SecMER tool

(SecureChange) New work (not included in thesis):

o DSML synthesis based on ontologieso Quick fix generation for BPMNo Other industrial applications

Page 53: Event-driven Model Transformations in Domain-specific Modeling Languages

Question 2

„In Section 5.4 when performance of event-driven transformation engine is evaluated, it is stated that practical model size is below 5000 nodes. How is this number estimated?”

Page 54: Event-driven Model Transformations in Domain-specific Modeling Languages

Answer“It is important to note that for practical model sizes (e.g. below the 5000 node count range), the event-driven VIATRA/RETE engine can perform a synchronization affecting a considerable portion of the model in the 10-500 msec range which makes the approach very suitable for interactive applications.”

Will be reworded Illustrative example of what might be considered practical In general, this depends very much on the concrete

applicationo scalability limit of our engine: 10^6 model elements

Page 55: Event-driven Model Transformations in Domain-specific Modeling Languages

Question 3„Design time model simulation can be controlled through a user interface of the ViatraDSM framework. Model elements can be decorated using an API (in Figure 7.4 fireable transitions are colored.) What kind of services are provided by this programming interface? Beyond modifying model elements, is there a possibility for example to define regions – set of elements – and modify their properties together?”

Page 56: Event-driven Model Transformations in Domain-specific Modeling Languages

Answer

ViatraDSM’s model access and manipulation APIo Domain-specific queries (types)o Basic CRUDo Access to concrete syntax (arbitrary customization

w.r.t. Draw2D possible) Generic queries (regions of elements)

o Possible by graph patternso Can be invoked from anywhere in the code

Page 57: Event-driven Model Transformations in Domain-specific Modeling Languages

Question 4

„In Chapter 8 change-driven transformations are introduced, where change impact analysis is named as an application. As I could not find [4], please explain the main results shortly. Give an overview on other impact analysis techniques (for example model level slicing) compared to your solution.”

Page 58: Event-driven Model Transformations in Domain-specific Modeling Languages

Answer Impact analysis by slicing

o Change the program calculate the set of affected parts of the program (control or data dependence)

Model slicingo Change the model calculate a simplified set of (affected)

models• Preserving semantics w.r.t. the sliced data• Make formal analysis easier/faster

o Relies on a formalization of the language (e.g. class invariants and operation pre/postconditions in UML)

Impact analysis in SecureChangeo interpretation of the model is performed by humans, so only

guidance is giveno Solved by change patterns defined on interconnected models