SlideShare a Scribd company logo
Dipartimento di Ingegneria e Scienze 
dell’Informazione e Matematica 
Università degli Studi dell’Aquila 
Towards Analysing Non-­‐Determinism 
in Bidirec?onal Transforma?ons 
Romina Eramo 
Romeo Marinelli, Alfonso Pierantonio, Gianni Rosa
Goal 
To support designers in solving non-­‐determinism in their 
specifica?ons by detec?ng the rules that give place to 
alterna?ve solu?ons, at design ?me. 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
Roadmap 
Background 
Contribu?on 
Realiza?on 
Applica?on 
Challenges 
Conclusion 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
Bidirec?onality 
Bidirec?onal transforma?ons are useful for maintaining the 
consistency of two (or more) related sources of informa?on 
The relevance of bidirec?onality in model transforma?ons has 
been advocated already in 2005 by OMG by including a 
bidirec?onal language in QVT 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
Bidirec?onality 
In spite of its relevance, bidirec?onality has rarely produced 
an?cipated benefits 
WHY? 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
Non-­‐determinism 
Probably, among the reasons why bidirec?onal transforma?on 
had limited success there is the ambivalence concerning 
non-­‐bijec)vity 
When transforma?on are non-­‐bijec)ve, there may be mul?ple 
ways to transform two models into a consistent state 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
A small example ... 
...a typical round-­‐trip problem based on a non-­‐bijec?ve class 
diagram to rela?onal data base -­‐ UML2RDBMS 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
A small example ... 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo 
University 
Person 
name {is_primary} 
Worker 
working_address 
Employer 
{persistent} 
department 
Professor 
{persistent} 
number_of_publication 
① 
UML model
A small example ... 
University 
Employer 
Professor 
working_address 
department 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo 
University 
Person 
name {is_primary} 
Worker 
working_address 
Employer 
{persistent} 
department 
Professor 
{persistent} 
number_of_publication 
PK name 
working_address 
department 
PK name 
number_of_publication 
① ② forward transf. 
UML model 
RDBMS model 
Persistent classes are mapped to 
correspondent tables and aributes 
to columns, including inherited 
aributes 
Aributes of non-­‐persistent classes 
are distributed over tables from 
persistent classes which access 
non-­‐persistent ones
A small example ... 
University 
Employer 
Professor 
working_address 
department 
University 
Employer 
Professor 
PK name 
working_address 
department 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo 
University 
Person 
name {is_primary} 
Worker 
working_address 
Employer 
{persistent} 
department 
Professor 
{persistent} 
number_of_publication 
PK name 
working_address 
department 
PK name 
number_of_publication 
① ② 
PK name 
working_address 
department 
number_of_publication 
③ 
email 
forward transf. manual change 
UML model 
RDBMS model 
modified 
RDBMS model 
A new column 
email is added 
to the table 
Employer 
How back 
propagate ?
University 
University 
A small example ... 
forward transf. manual change backward transf. 
University 
Employer 
Professor 
working_address 
department 
University 
Employer 
Professor 
PK name 
working_address 
department 
University 
[email] 
[email] 
Professor 
{persistent} 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo 
University 
Person 
name {is_primary} 
Worker 
working_address 
Employer 
{persistent} 
department 
Professor 
{persistent} 
number_of_publication 
PK name 
working_address 
department 
PK name 
number_of_publication 
① ② 
PK name 
working_address 
department 
number_of_publication 
③ 
Person 
name {is_primary} 
Worker 
working_address 
Employer 
{persistent} 
department 
number_of_publication 
④ 
[email] 
email 
UML model 
RDBMS model 
modified 
RDBMS model 
corresponding 
UML models 
email can be associated with Employer or 
with each parent Worker and Person
Related issues 
There have been several works analyzing 
seman?c issues of bidirec?onal model transforma?ons 
From Stevens 2009 : 
“The developer needs full control of what the transforma)on 
does. [...] We claim that determinism is necessary in order to 
ensure, first, that developers will find tool behavior predictable, 
and second, that organisa)ons will not be unacceptably “locked 
in” to the tool they first use.” 
[P. Stevens. Bidirec?onal model transforma?ons in QVT: seman?c issues and open ques?ons. SOSYM, 2009] 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
How it is solved in the current 
approaches? 
① fix ambiguity via defaults strategy (tool) 
② resolve ambiguity by contraining the specifica?on (designer) 
③ genera?ng mul?ple solu?ons (tool) and select the desired one 
Drawbacks: 
① limited control over how models are synchronized 
② early decision and difficult to detect ambiguity 
③ onerous management of (large) set of models 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo 
(desinger)
Roadmap 
Background 
Contribu?on 
Realiza?on 
Applica?on 
Challenges 
Conclusion 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
Contribu?on 
GOAL 
HOW 
OUTPUT 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo 
ADVANTAGE 
To support designers in dealing with 
non-­‐determinism 
Sta?c analysis of bidirec?onal transforma?on 
Degree of non-­‐determinism of the transforma?on 
Non-­‐determinis?c por?ons of the transforma?on 
Analysis at design ?me 
Detec?on of code ambiguity before the execu?on
Roadmap 
Background 
Contribu?on 
Realiza?on 
Applica?on 
Challenges 
Conclusion
Descrip?on of the approach 
Model transforma?ons are mapped in a format suitable for 
the analysis. Only relevant informa?on are captured. 
The analysis is performed within a logic environment realized 
in Answer Set Programming (ASP) 
• the engine is able to analyze the behavior of the transforma?on 
with an emphasis on non-­‐determinism 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo 
Analysis nota?on 
Logical rules and constraints
Descrip?on of the approach 
STEP 1 -­‐ Transla?on from the transforma?on to the analysis nota?on 
STEP 2 -­‐ Execu?on of the ASP-­‐based analysis and annota?on of the 
transforma?on 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo 
BIDIRECTIONAL 
TRANSFORMATION 
LANGUAGE 
C2 
C2 
TRASLATE 
ASP TRANSF. 
ANALYSIS MODEL 
ASP SOLVER 
IN 
OUT 
ANNOTATE 
BIDIRECTIONAL 
TRANSFORMATION 
MODEL 
TRANSFORMATION 
ANALYSIS LANGUAGE 
TRANSFORMATION 
ANALYSIS MODEL 
ASP ANALYSIS 
RESULT MODEL 
ENCODE 
STEP 1 
STEP 2 
LOGICAL ANALYSIS 
ASP RULES AND CONSTRAINTS
Roadmap 
Background 
Contribu?on 
Realiza?on 
Applica?on 
Challenges 
Conclusion
Applica?on of the approach 
UML to RDBMS, inheritance hierarchy of classes to corresponding tables, and 
viceversa 
Used transforma?on language 
JTL (Janus Transforma?on Language), a constraint-­‐based bidirec?onal 
language, able to deal with non-­‐bijec?vity by genera?ng all the admissible 
solu?ons 
4 STEPS 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo 
Case study 
① implementa?on of the UML2RDBMS bidirec?onal transf. in JTL 
② transforma?on of the UML2RDBMS transf. in the analysis language 
③ execu?on of the analysis on the UML2RDBMS analysis model 
④ annota?on of the UML2RDBMS transf. model with the analysis results
① Implemen?ng UML2RDBMS in JTL 
1transformation UML2RDBMS(uml:UML, rdbms:RDBMS) { ...! 
2 top relation Class2Table {! 
3 cn, an: String;! 
4 enforce domain uml c:Class {! 
5 is_persistent = true,! 
relates classes and tables in the 
6 name = cn,! 
two different metamodels 
7 attrs = attr: Attribute { name = an}! 
8 };! 
9 enforce domain rdbms t:Table {! 
10 name = cn,! 
11 cols = col: Column { name = an }! 
12 };! 
13 when { ... }! 
relates albutes and columns in 
14 where { Attribute2Column(c, t); }! 
15 }! 
the two different metamodels 
16 relation Attribute2Column {! 
17 an, at : String;! 
18 enforce domain uml c:Class {! 
19 attrs = attr: Attribute { name = an, owner = c, is_primary = false }! 
20 };! 
21 enforce domain rdbms t:Table {! 
22 cols = col: Column { name = an, owner = t }! 
23 };! 
24 when { ... }! 
25 }! 
relates aributes of the parent 
26 top relation SuperAttributeToColumn{! 
27 enforce domain uml c: Class {! 
class to columns of the 
28 parent = sc: Class { }! 
29 };! 
corresponding child table 
30 enforce domain rdbms t: Table { };! 
31 when { ClassToTable(c,t) | (cc = c.parentOf & SuperAttributeToColumn(cc,t));}! 
32 where { AttributeToColumn(sc, t); }! 
33 } ...! 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
② Transla?ng in the analysis nota?on 
domain paerns are 
captured 
pre and post condi?on are 
captured as paerns 
A transforma?on model consists of a set of rules that define mapping among 
elements types, and pre/post con??ons that limit its applicability and behavior 
The correspondent transforma?on analysis model captures only the informa?on 
which is relevant for performing the analysis, conforming a specific analysis nota?on 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
③ Execu?ng the analysis 
1 relation_name(1, class2table).! 
2 relation_domain(1, uml).! 
3 relation_pattern(1, uml, c, class).! 
4 relation_predicate(1, uml, c, is_persistent, true).! 
5 relation_predicate(1, uml, c, name, cn).! 
6 relation_predicate(1, uml, c, attrs, attr). [...]! 
the analysis model is 
automa?cally encoded in ASP 
1 are_equal_domains(ID1, ID2, Dom) :-! 
2 have_equal_patterns(ID1, ID2, Dom, MC, MCName),! 
3 have_equal_predicates(ID1, ID2, Dom, MC, MCName),! 
4 not have_different_patterns(ID1, ID2, Dom).! 
5! 
6 non_deterministic_relation(ID, RelName, DomLeft) :-! 
7 are_equal_domains(ID, ID2, DomRight),! 
8 relation_name(ID, RelName),! 
9 tranformation_model(DomRight), ! 
10 tranformation_model(DomLeft), ! 
11 DomRight != DomLeft.! 
12! 
13 are_ambiguous_relations(ID1, ID2, DomLeft) :-! 
14 are_equal_domains(ID1, ID2, DomRight),! 
15 tranformation_model(DomRight), ! 
16 tranformation_model(DomLeft), ! 
17 DomRight != DomLef. [...]! 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo 
non-­‐determinism is 
verified by executed ASP 
rules and constraints on 
the analysis model used 
as base knowledge 
sets of ambiguous 
transforma?on rules 
are detected 
%%%% sets of non-deterministic relations (RDBMS to UML direction):! 
[(1,class2table), (3,superAttribute2column), (5,superAttribute2column)]!
④ Annota?ng the UML2RDBMS transf. 
1transformation UML2RDBMS(uml:UML, rdbms:RDBMS) { ...! 
2 top relation Class2Table {! 
3 cn, an: String;! 
4 enforce domain uml c:Class {! 
5 is_persistent = true,! 
6 name = cn,! 
7 attrs = attr: Attribute { name = an}! 
A set of 
8 };! 
9 non-­‐determinis?c rela?ons 
enforce domain rdbms t:Table {! 
10 name = cn,! 
in UML to RDBMS direc?on 
11 cols = col: Column { name = an }! 
12 };! 
is detected 
13 when { ... }! 
14 where { Attribute2Column(c, t); }! 
15 }! 
16 relation Attribute2Column {! 
17 an, at : String;! 
18 enforce domain uml c:Class {! 
19 attrs = attr: Attribute { name = an, owner = c, is_primary = false }! 
20 };! 
21 enforce domain rdbms t:Table {! 
22 cols = col: Column { name = an, owner = t }! 
23 };! 
24 when { ... }! 
25 }! 
26 top relation SuperAttributeToColumn{! 
27 enforce domain uml c: Class {! 
28 parent = sc: Class { }! 
29 };! 
30 enforce domain rdbms t: Table { };! 
31 when { ClassToTable(c,t) | (cc = c.parentOf & SuperAttributeToColumn(cc,t));}! 
32 where { AttributeToColumn(sc, t); }! 
33 } ...! 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
④ Annota?ng the UML2RDBMS transf. 
1transformation UML2RDBMS(uml:UML, rdbms:RDBMS) { ...! 
2 top relation Class2Table {! 
3 cn, an: String;! 
4 enforce domain uml c:Class {! 
5 is_persistent = true,! 
6 name = cn,! 
7 attrs = attr: Attribute { name = an}! 
A set of 
8 };! 
9 non-­‐determinis?c rela?ons 
enforce domain rdbms t:Table {! 
10 name = cn,! 
in UML to RDBMS direc?on 
11 cols = col: Column { name = an }! 
12 };! 
is detected 
13 when { ... }! 
14 where { Attribute2Column(c, t); }! 
15 }! 
16 relation Attribute2Column {! 
17 an, at : String;! 
18 enforce domain uml c:Class {! 
19 attrs = attr: Attribute { name = an, owner = c, is_primary = false }! 
20 };! 
21 enforce domain rdbms t:Table {! 
22 cols = col: Column { name = an, owner = t }! 
23 };! 
24 when { ... }! 
25 }! 
26 top relation SuperAttributeToColumn{! 
27 enforce domain uml c: Class {! 
28 parent = sc: Class { }! 
29 };! 
30 enforce domain rdbms t: Table { };! 
31 when { ClassToTable(c,t) | (cc = c.parentOf & SuperAttributeToColumn(cc,t));}! 
32 where { AttributeToColumn(sc, t); }! 
33 } ...! 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
Roadmap 
Background 
Contribu?on 
Realiza?on 
Applica?on 
Challenges 
Conclusion
Challenges 
Language-­‐independent approach 
Despite the analysis is completely independent from JTL, in order to 
make the approach completely language-­‐independent addi?onal 
implementa?on efforts are required 
Analysis of formal proper?es 
The logical founda?on of the engine makes possible the verifica?on of 
different formal proper?es by transla?ng them in ASP, with the scope 
to provide a mean for improving the quality of model transforma?on 
specifica?ons 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
Roadmap 
Background 
Contribu?on 
Realiza?on 
Applica?on 
Challenges 
Conclusion
Conclusion 
Bidirec?onal transforma?ons are known as a promising approach for 
maintaining models in a consistent state, their success is limites by 
seman?c issues and intrinsic characteris?cs 
This work represent a first step to support transforma?on 
implementors with a tool capable of analyzing transforma?ons in order 
to return feedback which could resolve poten?al problem, such as 
non-­‐determinism 
Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
Thanks 
Dipartimento di Ingegneria e Scienze 
dell’Informazione e Matematica 
Università degli Studi dell’Aquila 
Romina Eramo 
romina.eramo@univaq.it

More Related Content

What's hot

Logic Formulation 2
Logic Formulation 2Logic Formulation 2
Logic Formulation 2
deathful
 
CIS110 Computer Programming Design Chapter (4)
CIS110 Computer Programming Design Chapter  (4)CIS110 Computer Programming Design Chapter  (4)
CIS110 Computer Programming Design Chapter (4)
Dr. Ahmed Al Zaidy
 
Bert
BertBert
Fortran 95
Fortran 95Fortran 95
Fortran 95
Zaahir Salam
 
CIS110 Computer Programming Design Chapter (3)
CIS110 Computer Programming Design Chapter  (3)CIS110 Computer Programming Design Chapter  (3)
CIS110 Computer Programming Design Chapter (3)
Dr. Ahmed Al Zaidy
 
CIS110 Computer Programming Design Chapter (5)
CIS110 Computer Programming Design Chapter  (5)CIS110 Computer Programming Design Chapter  (5)
CIS110 Computer Programming Design Chapter (5)
Dr. Ahmed Al Zaidy
 
CIS110 Computer Programming Design Chapter (7)
CIS110 Computer Programming Design Chapter  (7)CIS110 Computer Programming Design Chapter  (7)
CIS110 Computer Programming Design Chapter (7)
Dr. Ahmed Al Zaidy
 
Unit i
Unit iUnit i
Unit i
guna287176
 
Ey36927936
Ey36927936Ey36927936
Ey36927936
IJERA Editor
 
Bert pre_training_of_deep_bidirectional_transformers_for_language_understanding
Bert  pre_training_of_deep_bidirectional_transformers_for_language_understandingBert  pre_training_of_deep_bidirectional_transformers_for_language_understanding
Bert pre_training_of_deep_bidirectional_transformers_for_language_understanding
ThyrixYang1
 
Intro to Programming: Modularity
Intro to Programming: ModularityIntro to Programming: Modularity
Intro to Programming: Modularity
Nicole Ryan
 
Chapter 12 Lecture: GUI Programming, Multithreading, and Animation
Chapter 12 Lecture: GUI Programming, Multithreading, and AnimationChapter 12 Lecture: GUI Programming, Multithreading, and Animation
Chapter 12 Lecture: GUI Programming, Multithreading, and Animation
Nicole Ryan
 
CIS110 Computer Programming Design Chapter (13)
CIS110 Computer Programming Design Chapter  (13)CIS110 Computer Programming Design Chapter  (13)
CIS110 Computer Programming Design Chapter (13)
Dr. Ahmed Al Zaidy
 
DISE - Programming Concepts
DISE - Programming ConceptsDISE - Programming Concepts
DISE - Programming Concepts
Rasan Samarasinghe
 
A New Reusability Metric for Object-Oriented Software
A New Reusability Metric for Object-Oriented SoftwareA New Reusability Metric for Object-Oriented Software
A New Reusability Metric for Object-Oriented Softwarenewreusabilitymetric
 
Programming Logic and Design: Working with Data
Programming Logic and Design: Working with DataProgramming Logic and Design: Working with Data
Programming Logic and Design: Working with Data
Nicole Ryan
 

What's hot (18)

Logic Formulation 2
Logic Formulation 2Logic Formulation 2
Logic Formulation 2
 
Krml203
Krml203Krml203
Krml203
 
CIS110 Computer Programming Design Chapter (4)
CIS110 Computer Programming Design Chapter  (4)CIS110 Computer Programming Design Chapter  (4)
CIS110 Computer Programming Design Chapter (4)
 
Bert
BertBert
Bert
 
Fortran 95
Fortran 95Fortran 95
Fortran 95
 
CIS110 Computer Programming Design Chapter (3)
CIS110 Computer Programming Design Chapter  (3)CIS110 Computer Programming Design Chapter  (3)
CIS110 Computer Programming Design Chapter (3)
 
CIS110 Computer Programming Design Chapter (5)
CIS110 Computer Programming Design Chapter  (5)CIS110 Computer Programming Design Chapter  (5)
CIS110 Computer Programming Design Chapter (5)
 
CIS110 Computer Programming Design Chapter (7)
CIS110 Computer Programming Design Chapter  (7)CIS110 Computer Programming Design Chapter  (7)
CIS110 Computer Programming Design Chapter (7)
 
Unit i
Unit iUnit i
Unit i
 
Ey36927936
Ey36927936Ey36927936
Ey36927936
 
Bert pre_training_of_deep_bidirectional_transformers_for_language_understanding
Bert  pre_training_of_deep_bidirectional_transformers_for_language_understandingBert  pre_training_of_deep_bidirectional_transformers_for_language_understanding
Bert pre_training_of_deep_bidirectional_transformers_for_language_understanding
 
Intro to Programming: Modularity
Intro to Programming: ModularityIntro to Programming: Modularity
Intro to Programming: Modularity
 
Chapter 12 Lecture: GUI Programming, Multithreading, and Animation
Chapter 12 Lecture: GUI Programming, Multithreading, and AnimationChapter 12 Lecture: GUI Programming, Multithreading, and Animation
Chapter 12 Lecture: GUI Programming, Multithreading, and Animation
 
CIS110 Computer Programming Design Chapter (13)
CIS110 Computer Programming Design Chapter  (13)CIS110 Computer Programming Design Chapter  (13)
CIS110 Computer Programming Design Chapter (13)
 
DISE - Programming Concepts
DISE - Programming ConceptsDISE - Programming Concepts
DISE - Programming Concepts
 
A New Reusability Metric for Object-Oriented Software
A New Reusability Metric for Object-Oriented SoftwareA New Reusability Metric for Object-Oriented Software
A New Reusability Metric for Object-Oriented Software
 
Unit 1
Unit 1Unit 1
Unit 1
 
Programming Logic and Design: Working with Data
Programming Logic and Design: Working with DataProgramming Logic and Design: Working with Data
Programming Logic and Design: Working with Data
 

Similar to Towards Analysing Non-Determinism in Bidirectional Transformations (AMT2014)

Model-driven Development of Model Transformations
Model-driven Development of Model TransformationsModel-driven Development of Model Transformations
Model-driven Development of Model Transformations
Pieter Van Gorp
 
Operation's research models
Operation's research modelsOperation's research models
Operation's research models
Abhinav Kp
 
Evolution in the Large and in the Small in Model-Driven Development
Evolution in the Large and in the Small in Model-Driven DevelopmentEvolution in the Large and in the Small in Model-Driven Development
Evolution in the Large and in the Small in Model-Driven Development
Alfonso Pierantonio
 
Testing Model Transformations
Testing Model TransformationsTesting Model Transformations
Testing Model Transformations
miso_uam
 
MOSKitt Transformations And Traceability
MOSKitt Transformations And TraceabilityMOSKitt Transformations And Traceability
MOSKitt Transformations And TraceabilityJavier Muñoz
 
Automated chaining of model transformations with incompatible metamodels
Automated chaining of model transformations with incompatible metamodelsAutomated chaining of model transformations with incompatible metamodels
Automated chaining of model transformations with incompatible metamodels
Alfonso Pierantonio
 
Leap isec 2011
Leap isec 2011Leap isec 2011
Leap isec 2011ClarkTony
 
Applying Transformation Characteristics to Solve the Multi Objective Linear F...
Applying Transformation Characteristics to Solve the Multi Objective Linear F...Applying Transformation Characteristics to Solve the Multi Objective Linear F...
Applying Transformation Characteristics to Solve the Multi Objective Linear F...
AIRCC Publishing Corporation
 
Dynamic programming prasintation eaisy
Dynamic programming prasintation eaisyDynamic programming prasintation eaisy
Dynamic programming prasintation eaisy
ahmed51236
 
Competence-Level Prediction and Resume & Job Description Matching Using Conte...
Competence-Level Prediction and Resume & Job Description Matching Using Conte...Competence-Level Prediction and Resume & Job Description Matching Using Conte...
Competence-Level Prediction and Resume & Job Description Matching Using Conte...
Jinho Choi
 
UNIT-2 Quantitaitive Anlaysis for Mgt Decisions.pptx
UNIT-2 Quantitaitive Anlaysis for Mgt Decisions.pptxUNIT-2 Quantitaitive Anlaysis for Mgt Decisions.pptx
UNIT-2 Quantitaitive Anlaysis for Mgt Decisions.pptx
MinilikDerseh1
 
Determan SummerSim_submit_rev3
Determan SummerSim_submit_rev3Determan SummerSim_submit_rev3
Determan SummerSim_submit_rev3John Determan
 
Rejunevating software reengineering processes
Rejunevating software reengineering processesRejunevating software reengineering processes
Rejunevating software reengineering processes
manishthaper
 
Approaches to Model Transformation Reuse: from Concepts to A-posteriori typing
Approaches to Model Transformation Reuse: from Concepts to A-posteriori typingApproaches to Model Transformation Reuse: from Concepts to A-posteriori typing
Approaches to Model Transformation Reuse: from Concepts to A-posteriori typing
miso_uam
 
An Interactive Decomposition Algorithm for Two-Level Large Scale Linear Multi...
An Interactive Decomposition Algorithm for Two-Level Large Scale Linear Multi...An Interactive Decomposition Algorithm for Two-Level Large Scale Linear Multi...
An Interactive Decomposition Algorithm for Two-Level Large Scale Linear Multi...
IJERA Editor
 
IJCAI01 MSPC.ppt
IJCAI01 MSPC.pptIJCAI01 MSPC.ppt
IJCAI01 MSPC.pptPtidej Team
 
Ijcai01 mspc.ppt
Ijcai01 mspc.pptIjcai01 mspc.ppt
Ijcai01 mspc.ppt
Yann-Gaël Guéhéneuc
 
ReusingMT
ReusingMTReusingMT
ReusingMT
miso_uam
 
Model Transformation Reuse
Model Transformation ReuseModel Transformation Reuse
Model Transformation Reuse
miso_uam
 

Similar to Towards Analysing Non-Determinism in Bidirectional Transformations (AMT2014) (20)

Model-driven Development of Model Transformations
Model-driven Development of Model TransformationsModel-driven Development of Model Transformations
Model-driven Development of Model Transformations
 
L..p..
L..p..L..p..
L..p..
 
Operation's research models
Operation's research modelsOperation's research models
Operation's research models
 
Evolution in the Large and in the Small in Model-Driven Development
Evolution in the Large and in the Small in Model-Driven DevelopmentEvolution in the Large and in the Small in Model-Driven Development
Evolution in the Large and in the Small in Model-Driven Development
 
Testing Model Transformations
Testing Model TransformationsTesting Model Transformations
Testing Model Transformations
 
MOSKitt Transformations And Traceability
MOSKitt Transformations And TraceabilityMOSKitt Transformations And Traceability
MOSKitt Transformations And Traceability
 
Automated chaining of model transformations with incompatible metamodels
Automated chaining of model transformations with incompatible metamodelsAutomated chaining of model transformations with incompatible metamodels
Automated chaining of model transformations with incompatible metamodels
 
Leap isec 2011
Leap isec 2011Leap isec 2011
Leap isec 2011
 
Applying Transformation Characteristics to Solve the Multi Objective Linear F...
Applying Transformation Characteristics to Solve the Multi Objective Linear F...Applying Transformation Characteristics to Solve the Multi Objective Linear F...
Applying Transformation Characteristics to Solve the Multi Objective Linear F...
 
Dynamic programming prasintation eaisy
Dynamic programming prasintation eaisyDynamic programming prasintation eaisy
Dynamic programming prasintation eaisy
 
Competence-Level Prediction and Resume & Job Description Matching Using Conte...
Competence-Level Prediction and Resume & Job Description Matching Using Conte...Competence-Level Prediction and Resume & Job Description Matching Using Conte...
Competence-Level Prediction and Resume & Job Description Matching Using Conte...
 
UNIT-2 Quantitaitive Anlaysis for Mgt Decisions.pptx
UNIT-2 Quantitaitive Anlaysis for Mgt Decisions.pptxUNIT-2 Quantitaitive Anlaysis for Mgt Decisions.pptx
UNIT-2 Quantitaitive Anlaysis for Mgt Decisions.pptx
 
Determan SummerSim_submit_rev3
Determan SummerSim_submit_rev3Determan SummerSim_submit_rev3
Determan SummerSim_submit_rev3
 
Rejunevating software reengineering processes
Rejunevating software reengineering processesRejunevating software reengineering processes
Rejunevating software reengineering processes
 
Approaches to Model Transformation Reuse: from Concepts to A-posteriori typing
Approaches to Model Transformation Reuse: from Concepts to A-posteriori typingApproaches to Model Transformation Reuse: from Concepts to A-posteriori typing
Approaches to Model Transformation Reuse: from Concepts to A-posteriori typing
 
An Interactive Decomposition Algorithm for Two-Level Large Scale Linear Multi...
An Interactive Decomposition Algorithm for Two-Level Large Scale Linear Multi...An Interactive Decomposition Algorithm for Two-Level Large Scale Linear Multi...
An Interactive Decomposition Algorithm for Two-Level Large Scale Linear Multi...
 
IJCAI01 MSPC.ppt
IJCAI01 MSPC.pptIJCAI01 MSPC.ppt
IJCAI01 MSPC.ppt
 
Ijcai01 mspc.ppt
Ijcai01 mspc.pptIjcai01 mspc.ppt
Ijcai01 mspc.ppt
 
ReusingMT
ReusingMTReusingMT
ReusingMT
 
Model Transformation Reuse
Model Transformation ReuseModel Transformation Reuse
Model Transformation Reuse
 

Towards Analysing Non-Determinism in Bidirectional Transformations (AMT2014)

  • 1. Dipartimento di Ingegneria e Scienze dell’Informazione e Matematica Università degli Studi dell’Aquila Towards Analysing Non-­‐Determinism in Bidirec?onal Transforma?ons Romina Eramo Romeo Marinelli, Alfonso Pierantonio, Gianni Rosa
  • 2. Goal To support designers in solving non-­‐determinism in their specifica?ons by detec?ng the rules that give place to alterna?ve solu?ons, at design ?me. Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 3. Roadmap Background Contribu?on Realiza?on Applica?on Challenges Conclusion Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 4. Bidirec?onality Bidirec?onal transforma?ons are useful for maintaining the consistency of two (or more) related sources of informa?on The relevance of bidirec?onality in model transforma?ons has been advocated already in 2005 by OMG by including a bidirec?onal language in QVT Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 5. Bidirec?onality In spite of its relevance, bidirec?onality has rarely produced an?cipated benefits WHY? Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 6. Non-­‐determinism Probably, among the reasons why bidirec?onal transforma?on had limited success there is the ambivalence concerning non-­‐bijec)vity When transforma?on are non-­‐bijec)ve, there may be mul?ple ways to transform two models into a consistent state Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 7. A small example ... ...a typical round-­‐trip problem based on a non-­‐bijec?ve class diagram to rela?onal data base -­‐ UML2RDBMS Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 8. A small example ... Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo University Person name {is_primary} Worker working_address Employer {persistent} department Professor {persistent} number_of_publication ① UML model
  • 9. A small example ... University Employer Professor working_address department Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo University Person name {is_primary} Worker working_address Employer {persistent} department Professor {persistent} number_of_publication PK name working_address department PK name number_of_publication ① ② forward transf. UML model RDBMS model Persistent classes are mapped to correspondent tables and aributes to columns, including inherited aributes Aributes of non-­‐persistent classes are distributed over tables from persistent classes which access non-­‐persistent ones
  • 10. A small example ... University Employer Professor working_address department University Employer Professor PK name working_address department Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo University Person name {is_primary} Worker working_address Employer {persistent} department Professor {persistent} number_of_publication PK name working_address department PK name number_of_publication ① ② PK name working_address department number_of_publication ③ email forward transf. manual change UML model RDBMS model modified RDBMS model A new column email is added to the table Employer How back propagate ?
  • 11. University University A small example ... forward transf. manual change backward transf. University Employer Professor working_address department University Employer Professor PK name working_address department University [email] [email] Professor {persistent} Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo University Person name {is_primary} Worker working_address Employer {persistent} department Professor {persistent} number_of_publication PK name working_address department PK name number_of_publication ① ② PK name working_address department number_of_publication ③ Person name {is_primary} Worker working_address Employer {persistent} department number_of_publication ④ [email] email UML model RDBMS model modified RDBMS model corresponding UML models email can be associated with Employer or with each parent Worker and Person
  • 12. Related issues There have been several works analyzing seman?c issues of bidirec?onal model transforma?ons From Stevens 2009 : “The developer needs full control of what the transforma)on does. [...] We claim that determinism is necessary in order to ensure, first, that developers will find tool behavior predictable, and second, that organisa)ons will not be unacceptably “locked in” to the tool they first use.” [P. Stevens. Bidirec?onal model transforma?ons in QVT: seman?c issues and open ques?ons. SOSYM, 2009] Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 13. How it is solved in the current approaches? ① fix ambiguity via defaults strategy (tool) ② resolve ambiguity by contraining the specifica?on (designer) ③ genera?ng mul?ple solu?ons (tool) and select the desired one Drawbacks: ① limited control over how models are synchronized ② early decision and difficult to detect ambiguity ③ onerous management of (large) set of models Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo (desinger)
  • 14. Roadmap Background Contribu?on Realiza?on Applica?on Challenges Conclusion Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 15. Contribu?on GOAL HOW OUTPUT Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo ADVANTAGE To support designers in dealing with non-­‐determinism Sta?c analysis of bidirec?onal transforma?on Degree of non-­‐determinism of the transforma?on Non-­‐determinis?c por?ons of the transforma?on Analysis at design ?me Detec?on of code ambiguity before the execu?on
  • 16. Roadmap Background Contribu?on Realiza?on Applica?on Challenges Conclusion
  • 17. Descrip?on of the approach Model transforma?ons are mapped in a format suitable for the analysis. Only relevant informa?on are captured. The analysis is performed within a logic environment realized in Answer Set Programming (ASP) • the engine is able to analyze the behavior of the transforma?on with an emphasis on non-­‐determinism Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo Analysis nota?on Logical rules and constraints
  • 18. Descrip?on of the approach STEP 1 -­‐ Transla?on from the transforma?on to the analysis nota?on STEP 2 -­‐ Execu?on of the ASP-­‐based analysis and annota?on of the transforma?on Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo BIDIRECTIONAL TRANSFORMATION LANGUAGE C2 C2 TRASLATE ASP TRANSF. ANALYSIS MODEL ASP SOLVER IN OUT ANNOTATE BIDIRECTIONAL TRANSFORMATION MODEL TRANSFORMATION ANALYSIS LANGUAGE TRANSFORMATION ANALYSIS MODEL ASP ANALYSIS RESULT MODEL ENCODE STEP 1 STEP 2 LOGICAL ANALYSIS ASP RULES AND CONSTRAINTS
  • 19. Roadmap Background Contribu?on Realiza?on Applica?on Challenges Conclusion
  • 20. Applica?on of the approach UML to RDBMS, inheritance hierarchy of classes to corresponding tables, and viceversa Used transforma?on language JTL (Janus Transforma?on Language), a constraint-­‐based bidirec?onal language, able to deal with non-­‐bijec?vity by genera?ng all the admissible solu?ons 4 STEPS Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo Case study ① implementa?on of the UML2RDBMS bidirec?onal transf. in JTL ② transforma?on of the UML2RDBMS transf. in the analysis language ③ execu?on of the analysis on the UML2RDBMS analysis model ④ annota?on of the UML2RDBMS transf. model with the analysis results
  • 21. ① Implemen?ng UML2RDBMS in JTL 1transformation UML2RDBMS(uml:UML, rdbms:RDBMS) { ...! 2 top relation Class2Table {! 3 cn, an: String;! 4 enforce domain uml c:Class {! 5 is_persistent = true,! relates classes and tables in the 6 name = cn,! two different metamodels 7 attrs = attr: Attribute { name = an}! 8 };! 9 enforce domain rdbms t:Table {! 10 name = cn,! 11 cols = col: Column { name = an }! 12 };! 13 when { ... }! relates albutes and columns in 14 where { Attribute2Column(c, t); }! 15 }! the two different metamodels 16 relation Attribute2Column {! 17 an, at : String;! 18 enforce domain uml c:Class {! 19 attrs = attr: Attribute { name = an, owner = c, is_primary = false }! 20 };! 21 enforce domain rdbms t:Table {! 22 cols = col: Column { name = an, owner = t }! 23 };! 24 when { ... }! 25 }! relates aributes of the parent 26 top relation SuperAttributeToColumn{! 27 enforce domain uml c: Class {! class to columns of the 28 parent = sc: Class { }! 29 };! corresponding child table 30 enforce domain rdbms t: Table { };! 31 when { ClassToTable(c,t) | (cc = c.parentOf & SuperAttributeToColumn(cc,t));}! 32 where { AttributeToColumn(sc, t); }! 33 } ...! Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 22. ② Transla?ng in the analysis nota?on domain paerns are captured pre and post condi?on are captured as paerns A transforma?on model consists of a set of rules that define mapping among elements types, and pre/post con??ons that limit its applicability and behavior The correspondent transforma?on analysis model captures only the informa?on which is relevant for performing the analysis, conforming a specific analysis nota?on Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 23. ③ Execu?ng the analysis 1 relation_name(1, class2table).! 2 relation_domain(1, uml).! 3 relation_pattern(1, uml, c, class).! 4 relation_predicate(1, uml, c, is_persistent, true).! 5 relation_predicate(1, uml, c, name, cn).! 6 relation_predicate(1, uml, c, attrs, attr). [...]! the analysis model is automa?cally encoded in ASP 1 are_equal_domains(ID1, ID2, Dom) :-! 2 have_equal_patterns(ID1, ID2, Dom, MC, MCName),! 3 have_equal_predicates(ID1, ID2, Dom, MC, MCName),! 4 not have_different_patterns(ID1, ID2, Dom).! 5! 6 non_deterministic_relation(ID, RelName, DomLeft) :-! 7 are_equal_domains(ID, ID2, DomRight),! 8 relation_name(ID, RelName),! 9 tranformation_model(DomRight), ! 10 tranformation_model(DomLeft), ! 11 DomRight != DomLeft.! 12! 13 are_ambiguous_relations(ID1, ID2, DomLeft) :-! 14 are_equal_domains(ID1, ID2, DomRight),! 15 tranformation_model(DomRight), ! 16 tranformation_model(DomLeft), ! 17 DomRight != DomLef. [...]! Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo non-­‐determinism is verified by executed ASP rules and constraints on the analysis model used as base knowledge sets of ambiguous transforma?on rules are detected %%%% sets of non-deterministic relations (RDBMS to UML direction):! [(1,class2table), (3,superAttribute2column), (5,superAttribute2column)]!
  • 24. ④ Annota?ng the UML2RDBMS transf. 1transformation UML2RDBMS(uml:UML, rdbms:RDBMS) { ...! 2 top relation Class2Table {! 3 cn, an: String;! 4 enforce domain uml c:Class {! 5 is_persistent = true,! 6 name = cn,! 7 attrs = attr: Attribute { name = an}! A set of 8 };! 9 non-­‐determinis?c rela?ons enforce domain rdbms t:Table {! 10 name = cn,! in UML to RDBMS direc?on 11 cols = col: Column { name = an }! 12 };! is detected 13 when { ... }! 14 where { Attribute2Column(c, t); }! 15 }! 16 relation Attribute2Column {! 17 an, at : String;! 18 enforce domain uml c:Class {! 19 attrs = attr: Attribute { name = an, owner = c, is_primary = false }! 20 };! 21 enforce domain rdbms t:Table {! 22 cols = col: Column { name = an, owner = t }! 23 };! 24 when { ... }! 25 }! 26 top relation SuperAttributeToColumn{! 27 enforce domain uml c: Class {! 28 parent = sc: Class { }! 29 };! 30 enforce domain rdbms t: Table { };! 31 when { ClassToTable(c,t) | (cc = c.parentOf & SuperAttributeToColumn(cc,t));}! 32 where { AttributeToColumn(sc, t); }! 33 } ...! Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 25. ④ Annota?ng the UML2RDBMS transf. 1transformation UML2RDBMS(uml:UML, rdbms:RDBMS) { ...! 2 top relation Class2Table {! 3 cn, an: String;! 4 enforce domain uml c:Class {! 5 is_persistent = true,! 6 name = cn,! 7 attrs = attr: Attribute { name = an}! A set of 8 };! 9 non-­‐determinis?c rela?ons enforce domain rdbms t:Table {! 10 name = cn,! in UML to RDBMS direc?on 11 cols = col: Column { name = an }! 12 };! is detected 13 when { ... }! 14 where { Attribute2Column(c, t); }! 15 }! 16 relation Attribute2Column {! 17 an, at : String;! 18 enforce domain uml c:Class {! 19 attrs = attr: Attribute { name = an, owner = c, is_primary = false }! 20 };! 21 enforce domain rdbms t:Table {! 22 cols = col: Column { name = an, owner = t }! 23 };! 24 when { ... }! 25 }! 26 top relation SuperAttributeToColumn{! 27 enforce domain uml c: Class {! 28 parent = sc: Class { }! 29 };! 30 enforce domain rdbms t: Table { };! 31 when { ClassToTable(c,t) | (cc = c.parentOf & SuperAttributeToColumn(cc,t));}! 32 where { AttributeToColumn(sc, t); }! 33 } ...! Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 26. Roadmap Background Contribu?on Realiza?on Applica?on Challenges Conclusion
  • 27. Challenges Language-­‐independent approach Despite the analysis is completely independent from JTL, in order to make the approach completely language-­‐independent addi?onal implementa?on efforts are required Analysis of formal proper?es The logical founda?on of the engine makes possible the verifica?on of different formal proper?es by transla?ng them in ASP, with the scope to provide a mean for improving the quality of model transforma?on specifica?ons Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 28. Roadmap Background Contribu?on Realiza?on Applica?on Challenges Conclusion
  • 29. Conclusion Bidirec?onal transforma?ons are known as a promising approach for maintaining models in a consistent state, their success is limites by seman?c issues and intrinsic characteris?cs This work represent a first step to support transforma?on implementors with a tool capable of analyzing transforma?ons in order to return feedback which could resolve poten?al problem, such as non-­‐determinism Towards Analysing Non-Determinism in Bidirectional Transformations – Romina Eramo
  • 30. Thanks Dipartimento di Ingegneria e Scienze dell’Informazione e Matematica Università degli Studi dell’Aquila Romina Eramo romina.eramo@univaq.it