Graph Constraints and Application Conditions for Transformation - - PowerPoint PPT Presentation

graph constraints and application conditions
SMART_READER_LITE
LIVE PREVIEW

Graph Constraints and Application Conditions for Transformation - - PowerPoint PPT Presentation

OCL2AC Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions for Transformation Rules Nebras Nassar , Jens Kosiol, Thorsten Arendt, and Gabriele Taentzer Philipps-Universitt, Marburg, Germany GFFT


slide-1
SLIDE 1

OCL2AC Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions for Transformation Rules

Philipps-Universität, Marburg, Germany GFFT Innovationsförderung GmbH, Bad Vilbel, Germany June 25, 2018

Nebras Nassar, Jens Kosiol, Thorsten Arendt, and Gabriele Taentzer

slide-2
SLIDE 2

2 OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Introduction

satisfies

Apply model transformation

slide-3
SLIDE 3

3 OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Introduction

satisfies

Apply model transformation

Strategy 1 (Posteriori check)

rollback Check the constraint Apply the rule

1 2 3

slide-4
SLIDE 4

4 OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Introduction

satisfies

Apply model transformation Apply the preserving rule

1 Strategy 2 (Preserving transformation rules) Strategy 1 (Posteriori check)

rollback Check the constraint Apply the rule

1 2 3

slide-5
SLIDE 5

5 OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Introduction

satisfies

Apply model transformation Apply the preserving rule

1 Strategy 2 (Preserving transformation rules) Strategy 1 (Posteriori check)

rollback Check the constraint Apply the rule

1 2 3

slide-6
SLIDE 6

6

Challenge

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

How can we automatically update model transformations to preserve a given set of constraints? Transformation Rules Set of Constraints context A invariant: self.b()-> size()>=1; Constraints-preserving Transformation Rules

slide-7
SLIDE 7

7

Contribution

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Transformation Rules Set of Constraints context A invariant: self.b()-> size()>=1; Constraints-preserving Transformation Rules

slide-8
SLIDE 8

8

Contribution

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Based on existing theory [1, 2] we developed a tool, called OCL2AC, which automatically adapts a given rule- based model transformation such that resulting models do not violate a given set of constraints

[1] Radke, H., Arendt, T., Becker, J.S., Habel, A., Taentzer, G.: Translating essential OCL invariants to nested graph constraints for generating instances of metamodels. Science of Computer Programming 152, 38 - 62 (2018) [2] Habel, A., Pennemann, K.H.: Correctness of high-level transformation systems relative to nested conditions. Mathematical Structures in Computer Science 19, 245-296 (2009)

OCL2AC is an Eclipse plugin which relies on: EMF, OCL and the Henshin language

slide-9
SLIDE 9

9

OCL2AC: Overview

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

 Two main components:

  • OCL2GC: Translate OCL constraints to graph constraints
slide-10
SLIDE 10

10

OCL2AC: Overview

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

 Two main components:

  • OCL2GC: Translate OCL constraints to graph constraints
  • GC2AC: Integrate graph constraints as application conditions
slide-11
SLIDE 11

11

OCL2AC: Overview

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

 Two main components:

  • OCL2GC: Translate OCL constraints to graph constraints
  • GC2AC: Integrate graph constraints as application conditions
  • Each component is designed to be usable on its own (as Eclipse plugins)
  • Limitation: The theory beyond the tool considers OCL constraints corresponding to a first-order, two-valued logic

and sets as the only collection type

slide-12
SLIDE 12

12

Agenda

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

  • 1. Introduction
  • 2. Challenge and contribution
  • 3. OCL2AC overview
  • 4. Agenda
  • 5. Scenario for presenting the tool architecture and functionalities
  • Running example
  • OCL2GC: Translate OCL constraints to graph constraints
  • GC2AC: Integrate graph constraints as application conditions
  • 6. Future work: Simplifications of application conditions
  • 7. Demo
  • 8. Conclusion
slide-13
SLIDE 13

13

Running Example

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

 Meta-model: A simple Statechart  Editing rules Henshin rule: Insert_outgoing_transition

slide-14
SLIDE 14

14

Running Example

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

 Meta-model: A simple Statechart  Editing rules Henshin rule: Insert_outgoing_transition Insert_outgoing_transition rule (Formally)

slide-15
SLIDE 15

15

Running Example

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

 Meta-model: A simple Statechart  Editing rules  Model Henshin rule: Insert_outgoing_transition The abstract syntax of the state machine

slide-16
SLIDE 16

16

Running Example

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

 Meta-model: A simple Statechart  Editing rules Henshin rule: Insert_outgoing_transition  Model The abstract syntax of the state machine

slide-17
SLIDE 17

17

Running Example

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

 Meta-model: A simple Statechart  Editing rules Henshin rule: Insert_outgoing_transition  Model The abstract syntax of the state machine

slide-18
SLIDE 18

18

Running Example

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

 Meta-model: A simple Statechart  Constraint: A FinalState has no

  • utgoing transition.

 Editing rules context FinalState inv no-outgoing-transitions: self.outgoing -> isEmpty(); Henshin rule: Insert_outgoing_transition OCL specification

slide-19
SLIDE 19

19

Running Example

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

 Meta-model: A simple Statechart  Editing rules We want to adapt the rule to preserve the given constraint using OCL2AC  Constraint: A FinalState has no

  • utgoing transition.

context FinalState inv no-outgoing-transitions: self.outgoing -> isEmpty(); OCL specification Henshin rule: Insert_outgoing_transition

slide-20
SLIDE 20

20

OCL2GC: Translate OCL Constraints to Graph Constraints

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

context FinalState inv no-outgoing-transitions: self.outgoing -> isEmpty();

slide-21
SLIDE 21

21

OCL2GC: Translate OCL Constraints to Graph Constraints

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

context FinalState inv no-outgoing-transitions: self.outgoing -> isEmpty(); context FinalState inv no-outgoing-transitions: not (self.outgoing -> size()>=1); 1

slide-22
SLIDE 22

22

OCL2GC: Translate OCL Constraints to Graph Constraints

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

context FinalState inv no-outgoing-transitions: self.outgoing -> isEmpty(); context FinalState inv no-outgoing-transitions: not (self.outgoing -> size()>=1); 1 2 3 +

slide-23
SLIDE 23

23

OCL2GC: Translate OCL Constraints to Graph Constraints

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

context FinalState inv no-outgoing-transitions: self.outgoing -> isEmpty(); context FinalState inv no-outgoing-transitions: not (self.outgoing -> size()>=1); 1 2 3 +

slide-24
SLIDE 24

24

OCL2GC: Translate OCL Constraints to Graph Constraints

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

context FinalState inv no-outgoing-transitions: self.outgoing -> isEmpty(); context FinalState inv no-outgoing-transitions: not (self.outgoing -> size()>=1); 1 2 4-5 3 +

slide-25
SLIDE 25

25

GC2AC: Integrate Graph Constraints as Left Application Conditions

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

  • Graph constraint (no-outgoing-transitions)
  • Henshin rule (insert_outgoing_transition)
slide-26
SLIDE 26

26

GC2AC: Integrate Graph Constraints as Left Application Conditions

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

  • Graph constraint
  • Henshin rule (insert_outgoing_transition)

Shift: For considering all possible ways in which a graph constraint could be satisfied after rule application

  • Right application condition (RAC)
slide-27
SLIDE 27

27

GC2AC: Integrate Graph Constraints as Left Application Conditions

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

  • Graph constraint
  • Henshin rule

Shift: For considering all possible ways in which a graph constraint could be satisfied after rule application

  • Right application condition (RAC)
  • verlapping the RHS

along graph constraint

slide-28
SLIDE 28

28

GC2AC: Integrate Graph Constraints as Left Application Conditions

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

  • Graph constraint
  • Henshin rule
  • Right application condition (RAC)
  • verlapping the RHS

along graph constraint Shift: For considering all possible ways in which a graph constraint could be satisfied after rule application

slide-29
SLIDE 29

29

GC2AC: Integrate Graph Constraints as Left Application Conditions

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

  • Right application condition (RAC)
  • Inverse rule (delete-outgoing-transition)
slide-30
SLIDE 30

30

GC2AC: Integrate Graph Constraints as Left Application Conditions

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

  • Right application condition (RAC)
  • Inverse rule (delete-outgoing-transition)
  • Left application condition (LAC = AC)

Apply it along RAC lefting

slide-31
SLIDE 31

31

GC2AC: Integrate Graph Constraints as Left Application Conditions

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

  • Right application condition (RAC)
  • Inverse rule (delete-outgoing-transition)
  • Left application condition (LAC = AC)

Apply it along RAC lefting

slide-32
SLIDE 32

32

GC2AC: Integrate Graph Constraints as Left Application Conditions

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Left application condition (LAC or AC) + Rule insert_outgoing_transition

slide-33
SLIDE 33

Requires that the rule is matched to consistent models only Forbids the rule node rv:Vertex being matched to a FinalState

33

GC2AC: Integrate Graph Constraints as Left Application Conditions

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Left application condition (LAC or AC) + Rule insert_outgoing_transition

slide-34
SLIDE 34

Requires that the rule is matched to consistent models only Forbids the rule node rv:Vertex being matched to a FinalState

34 OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Left application condition (LAC or AC) + Rule insert_outgoing_transition

  • Working with valid instance models

Future Work: Simplifications of Application Conditions

slide-35
SLIDE 35

Forbids the rule node rv:Vertex being matched to a FinalState

35

Future Work: Simplifications of Application Conditions

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Left application condition (LAC or AC) + Rule insert_outgoing_transition

  • Simplifications of application conditions
  • Eliminating unnecessary graphs. E.g.:

| g1 is a subgraph of g2

slide-36
SLIDE 36

Forbids the rule node rv:Vertex being matched to a FinalState

36 OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Left application condition (LAC or AC) + Rule insert_outgoing_transition

  • Simplifications of application conditions
  • | A is a subgraph of C

Future Work: Simplifications of Application Conditions

slide-37
SLIDE 37

37 OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Left application condition (LAC or AC) + Forbids the rule node rv:Vertex being matched to a FinalState Rule insert_outgoing_transition

Future Work: Simplifications of Application Conditions

+

slide-38
SLIDE 38

38

Demo

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Demo https://www.youtube.com/watch?v=75qXZboIVVg

slide-39
SLIDE 39

39

Tooling: Webpage

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

Webpage on GitHub: https://ocl2ac.github.io/home/

  • Installation
  • Getting Started
  • Relevant Meta-models
slide-40
SLIDE 40

40

Conclusion

OCL2AC: Automatic Translation of OCL Constraints to Graph Constraints and Application Conditions Nebras Nassar et al.

  • GC2AC: Integrate graph constraints as application conditions

OCL constraints Graph constraints Application conditions

  • OCL2GC: Translate OCL constraints to graph constraints

OCL2AC webpage on GitHub: https://ocl2ac.github.io/home/ OCL2GC GC2AC  OCL2AC automatically updates model transformations to preserve a given set of constraints Two main components as Eclipse plugins: