Presentation is loading. Please wait.

Presentation is loading. Please wait.

SEAA 2014 Automatic Production of Transformation Chains Using Structural Constraints on Output Models Cuauhtémoc Castellanos Etienne Borde Thomas Vergnaud.

Similar presentations


Presentation on theme: "SEAA 2014 Automatic Production of Transformation Chains Using Structural Constraints on Output Models Cuauhtémoc Castellanos Etienne Borde Thomas Vergnaud."— Presentation transcript:

1 SEAA 2014 Automatic Production of Transformation Chains Using Structural Constraints on Output Models Cuauhtémoc Castellanos Etienne Borde Thomas Vergnaud Thomas Derive Laurent Pautet 2014/08/27

2 Context In Model Driven Development refactoring model is common
Automated with model transformations Model refactoring using multiple design patterns Ex: adapter, composite patterns Design pattern are generic solutions to specific problem Can be applied multiple times in one model: multiple instances Ex : adapter pattern SEAA 2014

3 Model Transformations
Operation on model Refinement for analysis Code generation Model fusion Model modification Advocate reusability Model transformation is a design pattern Can be applied multiple times Applying multiple patterns  applying multiple transformations Nedd to chain transformations We have to express the transformation rule in a comsume/produce semantic SEAA 2014

4 Chaining Model Transformations
Non-commutative composition of transformations T1(T2(In)) ≠ T2(T1(In)) Problems to Identify chains: Precedence: the output model of a transformation must conforms to the application conditions of another transformation Validity: last model must verify user defined constraints Complexity: number of possible chains grows rapidly: !n A B C B C A C B A C B C A A B out out out out out out Validation SEAA 2014

5 Chain Identification Using Constraints
Precedence Abstract chaining process as an ordered set Abstract transformations in constraints between elements Validity Post-conditions constraints on last model Complexity: Use of Satisfiability Solver to identify a chain Need to abstract involved artifacts as constraints Objective: formalize chain of transformations (models, meta-models, trasformations…) with a set of satisfiability constraints (relational algebra, binary relations, first order logic…) to identify valid chains. SEAA 2014

6 Involved artifacts to abstraction
Input model and meta-model Oriented object semantic Constraints on elements to express the model architecture Model transformations Consumption/production semantic Chaining process and validity post-conditions Ordering Constraints on models Implementation choice: Alloy Signature and atoms Relational algebra Facts and predicates First order logic with quantifiers Objective: formalize chain of transformations (models, meta-models, trasformations…) with a set of satisfiability constraints (relational algebra, binary relations, first order logic…) to identify valid chains. SEAA 2014

7 Illustrative example UML subset Pattern adapter
Diagram, class, interface Pattern adapter Adapter transformation Chaining process: ordered set of transformations SEAA 2014

8 Meta-model Typed elements : Relation between elements
Type Class is a signatures Relation between elements Class inheritance is a relation Architectural constraints: Quantification is enforced with first order logic on relations abstract sig Element {} abstract sig UMLElement extends Element { composed : set UMLElement } sig Class extends UMLElement{ inherits : lone Class, implements : set Interface} SEAA 2014

9 Input Model Abstraction of the real model
Particular instance of signatures: atoms Set of atoms with particular relations Constraints on first model of the chain Use of a predicate on first model Constraints must be sharp: avoid multiple solutions Each relation must be initialized pred init (d : one Diagram){ no d.Interface some disj A, B : d.Class { A.composed = B A.interface = none A.inherits = none B.composed = none B.interface = none B.inherits = none } } SEAA 2014

10 Adapter Pattern Transformation
Adapter and adapter applied decorator Each decorator is a pattern instance Target elements identification Traceability Signature Adapter pre-conditions Context: Client, Adaptee Clients and Adaptee must be in relation Predicate SEAA 2014

11 Model transformation as constraints
Transformations Implemented with matching/production rules : ATL Rule foo from A to B Relations between 2 oriented labeled graphs Arcs are relations between elements within a graph Relational algebra Matching rules are a binary relation set: mapping Output graph arcs are relation through mapping relation juncture and constraints Constraints depends on the transformation R’ = mappingt . R . mapping ╞ C SEAA 2014

12 Model transformation as binary relations: example
The mapping relation: Client  Client’ Adaptee  Adaptee’ Adaptee  Adapter’ Adaptee  IAdapter’ AdapterPattern  AdapterPatternApplied Input model relations: Client  Adaptee Output model relations: Client’  IAdapter’ Adapter’  IAdapter’ Adapter’  Adaptee’ We have to express the transformation rule in a comsume/produce semantic SEAA 2014

13 Chaining Process Precedence: Pre-conditions verify applicability of next transformations Each transformation has pre-conditions To apply one transformation another must be applicable next Validity: post-conditions on last model Complexity: The solver search a chain by ordering the list Sizing of the solving universe for the chain: maximum atoms possible Ex : M0 = 5 atoms, T1 : 3, T2 : 1, 3 times T1 and 2 times T2 T1  T1  T1  T2  T2 : = 69 T2  T2  T1  T1  T1 : = 57 SEAA 2014

14 Conclusion and future works
Abstract model transformations chaining using relational algebra Identify valid transformation chain using SAT solving technique Time consuming due to the number of manipulated element 2 design patterns modeled: Adapter pattern Composite pattern Future works Anticipate the number of elements generated Improve performance to treat bigger chains Automate DSL and transformation language to relational algebra transformation SEAA 2014


Download ppt "SEAA 2014 Automatic Production of Transformation Chains Using Structural Constraints on Output Models Cuauhtémoc Castellanos Etienne Borde Thomas Vergnaud."

Similar presentations


Ads by Google