two basic correctness properties for atl transformations: executability and coverage (mtatl 2011)
TRANSCRIPT
![Page 1: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/1.jpg)
Two Basic Correctness Properties for Transformations:
Executability and Coverage
Elena PlanasJordi Cabot
Cristina Gómez
Universitat Oberta de Catalunya (Spain)École des Mines de Nantes – INRIA (France)Universitat Politècnica de Catalunya (Spain)
MtATL 2011: 3rd International Workshop on Model Transformation with ATLJuly 1st, 2011 - Zürich, Switzerland
![Page 2: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/2.jpg)
model transformations play a key role with the emergence of MDE.
the quality of the transformation process depends on the quality of the model transformations.
Related work
tools
analysis
testinglightweigh
t verificatio
n1/20
![Page 3: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/3.jpg)
Define two basic correctness properties of model transformations rulesPropose a method to check these properties
goal
Lightweight (efficient) verification method Feedback suggesting possible corrections
method features
matched rules (declarative rules)focus
2/20
![Page 4: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/4.jpg)
Property #1:
weak executability of an rule
3/20
![Page 5: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/5.jpg)
An rule is weakly executable if it has a chance of being successfully executed (the rule’s execution generates a target model consistent with the target metamodel integrity constraints).Source
MetaModel
Target MetaMod
el
rule
Conf
orm
s To
Conf
orm
s To
4/20
![Page 6: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/6.jpg)
rule Person2Student { from p: PersonMM!Person to s: StudentMM!Student ( name p.name college c ), c: StudentMM!College ( name p.collegeName )}
rule
Person
name: Stringage: IntegercollegeName: String
**
Knows
{Sym}
PersonMM
Student
name: StringSubject* IsEnrolledIn 1..*
id: String
College
name: String* StudiesAt 1
StudentMM
name: Erikage: 21collegeName: UOC
name: Erik
name: UOC
Studie
sAt
NOT
Con
form
s To
Conf
orm
s To
5/20
![Page 7: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/7.jpg)
A
dependency
6/20
![Page 8: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/8.jpg)
from an update up1 to another update up2 expresses that up2 must be included in all rules where up1 appears to avoid violating the metamodel constraints.
A
dependency
6/20
![Page 9: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/9.jpg)
A
dependency
Create a new object… to o: TargetMM!A …
Initialize its mandatory attributes… to o: TargetMM!A( attrA value) …
Create its mandatory links… to o: TargetMM!A( b obj) …
Every time we… we must… … and…
TargetMM
B* 1
attrB: Type
A
attrA: Type
6/20
![Page 10: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/10.jpg)
Compute dependencies
Mapdependencies
1
All dependenciesmapped?
2
rule
ruleis weakly executable
ruleis not weakly executable
FEEDBACK
no yes
7/20
![Page 11: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/11.jpg)
rule Person2Student { from p: PersonMM!Person to s: StudentMM!Student ( name p.name college c ), c: StudentMM!College ( name p.collegeName )}
Compute dependencies
Mapdependencies
1
All dependenciesmapped?
2
rule
is weakly executable
ruleis not weakly executable
FEEDBACK
no yes
rule
Subject* IsEnrolledIn 1..*
id: String
College
name: String* StudiesAt 1
Student
name: String
rule
Create a new Student requires:Initialize its name attributeCreate 1 link of StudiesAt associationCreate at least 1 link of IsEnrolledIn association
Create a new College requires:Initialize its name attribute
Dependencies
8/20
![Page 12: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/12.jpg)
Compute dependencies
Mapdependencies
1
2
rule
All dependenciesmapped?
ruleis weakly executable
ruleis not weakly executable
FEEDBACK
no yes
DependenciesCreate a new Student requires:
Initialize its name attributeCreate 1 link of StudiesAt associationCreate at least 1 link of IsEnrolledIn association
Create a new College requires:Initialize its name attribute
rule
rule Person2Student { from p: PersonMM!Person to s: StudentMM!Student ( name p.name college c ), c: StudentMM!College ( name p.collegeName )}
9/20
![Page 13: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/13.jpg)
Compute dependencies
Mapdependencies
1
2
rule
All dependenciesmapped?
ruleis weakly executable
ruleis not weakly executable
FEEDBACK
no yes
DependenciesCreate a new Student requires:
Initialize its name attributeCreate 1 link of StudiesAt associationCreate at least 1 link of IsEnrolledIn association
Create a new College requires:Initialize its name attribute
rule
rule Person2Student { from p: PersonMM!Person to s: StudentMM!Student ( name p.name college c ), c: StudentMM!College ( name p.collegeName )}
9/20
![Page 14: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/14.jpg)
Compute dependencies
Mapdependencies
1
2
rule
All dependenciesmapped?
ruleis weakly executable
ruleis not weakly executable
FEEDBACK
no yes
DependenciesCreate a new Student requires:
Initialize its name attributeCreate 1 link of StudiesAt associationCreate at least 1 link of IsEnrolledIn association
Create a new College requires:Initialize its name attribute
rule
rule Person2Student { from p: PersonMM!Person to s: StudentMM!Student ( name p.name college c ), c: StudentMM!College ( name p.collegeName )}
9/20
![Page 15: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/15.jpg)
Compute dependencies
Mapdependencies
1
2
rule
All dependenciesmapped?
ruleis weakly executable
ruleis not weakly executable
FEEDBACK
no yes
DependenciesCreate a new Student requires:
Initialize its name attributeCreate 1 link of StudiesAt associationCreate at least 1 link of IsEnrolledIn association
Create a new College requires:Initialize its name attribute
rule
rule Person2Student { from p: PersonMM!Person to s: StudentMM!Student ( name p.name college c ), c: StudentMM!College ( name p.collegeName )}
9/20
![Page 16: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/16.jpg)
Compute dependencies
Mapdependencies
1
2
rule
All dependenciesmapped?
ruleis weakly executable
ruleis not weakly executable
FEEDBACK
no yes
DependenciesCreate a new Student requires:
Initialize its name attributeCreate 1 link of StudiesAt associationCreate at least 1 link of IsEnrolledIn association
Create a new College requires:Initialize its name attribute
rule
rule Person2Student { from p: PersonMM!Person to s: StudentMM!Student ( name p.name college c ), c: StudentMM!College ( name p.collegeName )}
9/20
![Page 17: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/17.jpg)
Compute dependencies
Mapdependencies
1
2
rule
All dependenciesmapped?
DependenciesCreate a new Student requires:
Initialize its name attributeCreate 1 link of StudiesAt associationCreate at least 1 link of IsEnrolledIn association
Create a new College requires:Initialize its name attribute
rule
ruleis not weakly executable
FEEDBACK
no
ruleis weakly executable
yes
rule Person2Student { from p: PersonMM!Person to s: StudentMM!Student ( name p.name college c ), c: StudentMM!College ( name p.collegeName )}
9/20
is not Weakly Executable
rule Person2Student
ERROR:
![Page 18: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/18.jpg)
Compute dependencies
Mapdependencies
1
2
rule
All dependenciesmapped?
DependenciesCreate a new Student requires:
Initialize its name attributeCreate 1 link of StudiesAt associationCreate at least 1 link of IsEnrolledIn association
Create a new College requires:Initialize its name attribute
rule
ruleis not weakly executable
FEEDBACK
no
ruleis weakly executable
yes
AD
D F
EED
BA
CK
rule Person2Student { from p: PersonMM!Person to s: StudentMM!Student ( name p.name college c ), c: StudentMM!College ( name p.collegeName )}
9/20
is not Weakly Executable
rule Person2Student
ERROR:
![Page 19: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/19.jpg)
Property #2:
coverage of an rule set
10/20
![Page 20: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/20.jpg)
A set of rules is
covering if it allows addressing all elements of the source and target metamodels.
source perspective
source-coverage
target perspective
target-coverage
11/20
![Page 21: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/21.jpg)
A set of rules is source-covering when all elements of the source metamodel may be navigated throught the execution of these rules.
…is not source-covering (warning)
rule’s set
rule Person2Student { from p: PersonMM!Person to s: StudentMM!Student ( name p.name, college c ), c: StudentMM!College ( name p.collegeName )}
Person
name: Stringage: IntegercollegeName: String
**
Knows
{Sym}
PersonMM
12/20
![Page 22: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/22.jpg)
A set of rules is target-covering when all elements of the target metamodel may be created or initialized throught the execution of these rules.rule’s set
rule Person2Student { from p: PersonMM!Person to s: StudentMM!Student ( name p.name, college c ), c: StudentMM!College ( name p.collegeName )}
Student
name: StringSubject* IsEnrolledIn 1..*
id: String
College
name: String* StudiesAt 1
StudentMM
…is not target-covering (warning) 13/20
![Page 23: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/23.jpg)
Compute metamodel
elementsrule setFEEDBACK
Compute addressedelements
Compute non-addressed
elements
1 2 3
14/20
![Page 24: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/24.jpg)
Compute metamodel
elementsrule setFEEDBACK
Compute addressedelements
Compute non-addressed
elements
1 2 3
14/20
![Page 25: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/25.jpg)
Compute metamodel
elementsrule setFEEDBACK
Compute addressedelements
Compute non-addressed
elements
1 2 3
15/20
Person classname attribute (of Person)age attribute (of Person)collegeName attribute (of Person)Knows association
Student classname attribute (of Student)College classname attribute (of College)Subject classid attribute (of Subject)StudiesAt associationIsEnrolledIn association
![Page 26: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/26.jpg)
Compute metamodel
elementsrule setFEEDBACK
Compute addressedelements
Compute non-addressed
elements
1 2 3
16/20
Person classname attribute (of Person)age attribute (of Person)collegeName attribute (of Person)Knows association
Student classname attribute (of Student)College classname attribute (of College)Subject classid attribute (of Subject)StudiesAt associationIsEnrolledIn association
Is navigated?
Is created/initialized?
![Page 27: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/27.jpg)
17/20
Compute metamodel
elementsrule setFEEDBACK
Compute addressedelements
Compute non-addressed
elements
1 2 3
Non-addressed
Non-addressed
Non-addressed
Non-addressed
Non-addressed
rule setis not sourcecovering
WARNING:
is not targetcovering
rule setWARNING:
Is navigated?
Is created/initialized?
Person classname attribute (of Person)age attribute (of Person)collegeName attribute (of Person)Knows association
Student classname attribute (of Student)College classname attribute (of College)Subject classid attribute (of Subject)StudiesAt associationIsEnrolledIn association
![Page 28: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/28.jpg)
Conclusions:
feedback
18/20
![Page 29: Two Basic Correctness Properties for ATL Transformations: Executability and Coverage (MtATL 2011)](https://reader036.vdocuments.us/reader036/viewer/2022070604/5451d535af79590d428b9f1f/html5/thumbnails/29.jpg)
Further work:
weak executability coverage
feedbackAddress new correctness properties
Provide tool support
Address other types of rules 19/20