reconciling tggs with qvt - mcgill universitymsdl.cs.mcgill.ca/conferences/campam/.../qvttgg.pdf ·...
TRANSCRIPT
![Page 1: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/1.jpg)
1
A Study of Model Transformation Technologies:
Reconciling TGGs with QVTJoel Greenyer
Diploma Thesis supervised by Dr. Ekkart Kindler and Robert Wagner
Software Engineering Group
2007 Bellairs
CAMPaM Workshop
![Page 2: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/2.jpg)
2
Example: ComponentTools To Petrinet
Track
Track
Project Petrinet
![Page 3: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/3.jpg)
3
Example: ComponentTools To Petrinet
Track
Track
Project Petrinet
Track
Project Petri net
context
relation/transformation
● Example Rule: TrackToPlaceArcTransition– Declarative– Relational– Graph-pattern-
based
![Page 4: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/4.jpg)
4
Example: ComponentTools To Petrinet
Track
Project Petri net
context
relation/transformation
● Example Rule: TrackToPlaceArcTransition– Declarative– Relational– Graph-pattern-
based
Track
Track
Project Petri net
Track
Track
Project Petri net
![Page 5: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/5.jpg)
5
TGG Rule TrackToPlaceArcTransition
project:Project
track:Track
inPort:Port
outPort:Port
petrinet:Petrinet
place:Place
arc:Arc
tr...:Transition
prToPn:ProjectToPetrnet
outPortToTrans:OutPortToTransition
trackToPAT:TrackToPAT
inPortToPlace:InPortToPlace
ctools correspondence pnet
left
right
Track
Project Petri net
context
relation/transformation
● The correspondingTGG rule:
![Page 6: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/6.jpg)
6
TGG Rule TrackToPlaceArcTransition
project:Project
track:Track
inPort:Port
outPort:Port
petrinet:Petrinet
place:Place
arc:Arc
tr...:Transition
prToPn:ProjectToPetrnet
outPortToTrans:OutPortToTransition
trackToPAT:TrackToPAT
inPortToPlace:InPortToPlace
ctools correspondence pnet
left
right
project:Project petrinet:PetrinetprToPn:ProjectToPetrnet
::= ::= ::=
![Page 7: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/7.jpg)
7
TGG Rule TrackToPlaceArcTransition
project:Project
track:Track
inPort:Port
outPort:Port
petrinet:Petrinet
place:Place
arc:Arc
tr...:Transition
prToPn:ProjectToPetrnet
outPortToTrans:OutPortToTransition
trackToPAT:TrackToPAT
inPortToPlace:InPortToPlace
ctools correspondence pnet
left
right
Track
Project Petri net
context
relation/transformation
● The correspondingTGG rule:
![Page 8: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/8.jpg)
8
TGG Rule TrackToPlaceArcTransition
Track
Project Petri net
context
relation/transformation
project:Project
track:Track
inPort:Port
outPort:Port
petrinet:Petrinet
place:Place
arc:Arc
tr...:Transition
prToPn:ProjectToPetrnet
outPortToTrans:OutPortToTransition
trackToPAT:TrackToPAT
inPortToPlace:InPortToPlace
ctools correspondence pnet
++
++
++
++
++
++ ++
++
++
● The correspondingTGG rule:
![Page 9: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/9.jpg)
9
TGG Rule TrackToPlaceArcTransition
project:Project
track:Track
inPort:Port
outPort:Port
petrinet:Petrinet
place:Place
arc:Arc
tr...:Transition
prToPn:ProjectToPetrnet
outPortToTrans:OutPortToTransition
trackToPAT:TrackToPAT
inPortToPlace:InPortToPlace
ctools correspondence pnet
++
++
++
++
++
++ ++
++
++
Track
Track
Project Petri net
Track
Track
Project Petri net
![Page 10: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/10.jpg)
10
TGG Rule TrackToPlaceArcTransition
project:Project
track:Track
inPort:Port
outPort:Port
petrinet:Petrinet
place:Place
arc:Arc
tr...:Transition
prToPn:ProjectToPetrnet
outPortToTrans:OutPortToTransition
trackToPAT:TrackToPAT
inPortToPlace:InPortToPlace
ctools correspondence pnet
++
++
++
++
++
++ ++
++
++
Track
Track
Project Petri net
Track
Track
Project Petri net
bound?
![Page 11: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/11.jpg)
11
TGG Rule TrackToPlaceArcTransition
project:Project
track:Track
inPort:Port
outPort:Port
petrinet:Petrinet
place:Place
arc:Arc
tr...:Transition
prToPn:ProjectToPetrnet
outPortToTrans:OutPortToTransition
trackToPAT:TrackToPAT
inPortToPlace:InPortToPlace
ctools correspondence pnet
++
++
++
++
++
++ ++
++
++
Track
Track
Project Petri net
Track
Track
Project Petri net
unbound?
bound?
![Page 12: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/12.jpg)
12
TGG Rule TrackToPlaceArcTransition
project:Project
track:Track
inPort:Port
outPort:Port
petrinet:Petrinet
place:Place
arc:Arc
tr...:Transition
prToPn:ProjectToPetrnet
outPortToTrans:OutPortToTransition
trackToPAT:TrackToPAT
inPortToPlace:InPortToPlace
ctools correspondence pnet
++
++
++
++
++
++ ++
++
++
Track
Track
Project Petri net
Track
Track
Project Petri net
unbound?
bound?
create!
![Page 13: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/13.jpg)
13
QVT Overview
● Model Transformation Approaches in MDD and MDA– Many techniques, different strenghts and weaknesses
● OMG's QVT (Query/Views/Transformations)[2]
– Result of selecting and merging different approaches– Combination of declarative and imperative languages– Focus on declarative languages
Operational Black Box
Relations
Core
RelationsToCoreTransformation
![Page 14: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/14.jpg)
14
QVT-Core vs. TGGs – Short Comparison
● Structurally similar rules
domain A correspondence domain B
++
++
++
++
++
++
++
precnd.
create++ ++
● Graph structure: Nodes and Edges
● Multiple Correspondence Nodes
domain A mapping domain B
guard
bottom
● Graph structure: Variables and OCL-Predicates
● One Trace Class
QVT-Core* TGG
*:QVT-Core does not specify a graphical notation
![Page 15: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/15.jpg)
15
QVT-Core vs. TGGs – Short Comparison
● Structurally similar rulesQVT-Core TGG
map TrackToPlaceArcTransition{ check ctools(project:Project){ track:Track, portIn:Port| track.project = project; track.port = portIn; track.port = portOut; } check enforce pnet(petrinet:Petrinet){ realize place:Place, ...
● Graph structure: Nodes and Edges
● Multiple Correspondence Nodes
● Graph structure: Variables and OCL-Predicates
● One Trace Class
domain A correspondence domain B
++
++
++
++
++
++
++
precnd.
create++ ++
![Page 16: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/16.jpg)
16
Mapping QVT to TGGs
● Main focus: Mapping QVT-Core to TGG– Realized through a TGG transformation– For fundamental pattern structure expressions
QVT-Core TGG
![Page 17: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/17.jpg)
17
Mapping QVT to TGGs
● Main focus: Mapping QVT-Core to TGG– Realized through a TGG transformation– For fundamental pattern structure expressions
● Approach presented: QVT-Relations to TGG● Learn from QVT: More usable “TGG++”?
QVT-Relations
QVT-Core
TGG++
TGG
![Page 18: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/18.jpg)
18
QVT Relation TrackToPlaceArcTransition
Track
Project Petri net
context
relation/transformation
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr..:Transition
c e<<domain>> <<domain>>ctools pnet
whenProjectToPetrinet(pr, pn);
Relation TrackToPlaceArcTransition
![Page 19: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/19.jpg)
19
QVT Relation TrackToPlaceArcTransition
Track
Project Petri net
context
relation/transformation
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr..:Transition
c e<<domain>> <<domain>>ctools pnet
whenProjectToPetrinet(pr, pn);
Relation TrackToPlaceArcTransition
pr:Project pn:Petrinete e
<<domain>> <<domain>>ctools pnet
ProjectToPetrinet
![Page 20: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/20.jpg)
20
QVT Relation TrackToPlaceArcTransition
Track
Project Petri net
context
relation/transformation
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr..:Transition
c e<<domain>> <<domain>>ctools pnet
whenProjectToPetrinet(pr, pn);
Relation TrackToPlaceArcTransition
pr:Project pn:Petrinete e
<<domain>> <<domain>>ctools pnet
ProjectToPetrinet
Domain-Element:● “Root” of pattern● Parameter for “relation calls”
![Page 21: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/21.jpg)
21
QVT-Core Mapping TrackToPlaceArcTransition
Track
Project Petri net
context
relation/transformation
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr...:Transition
t1:TProjectToPetrnet
t2:TTrackToPAT
ctools (check) mapping pnet (enforce)
guard
bottom
Mapping TrackToPlaceArcTransition
● Is transformed into aQVT-Core Mapping:
![Page 22: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/22.jpg)
22
Semantics of a QVT-Core Mapping (fwd)
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr...:Transition
t1:TProjectToPetrnet
t2:TTrackToPAT
ctools (check) mapping pnet (enforce)
guard
bottom
Mapping TrackToPlaceArcTransition
![Page 23: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/23.jpg)
23
Semantics of a QVT-Core Mapping (fwd)
1) If Bottom Pattern found in unbound source model
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr...:Transition
t1:TProjectToPetrnet
t2:TTrackToPAT
ctools (check) mapping pnet (enforce)
guard
bottom
Mapping TrackToPlaceArcTransition
unbound?
![Page 24: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/24.jpg)
24
Semantics of a QVT-Core Mapping (fwd)
1) If Bottom Pattern found in unbound source model
2) & If Guard Pattern found in prev. bound model
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr...:Transition
t1:TProjectToPetrnet
t2:TTrackToPAT
ctools (check) mapping pnet (enforce)
guard
bottom
Mapping TrackToPlaceArcTransition
unbound?
bound?
![Page 25: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/25.jpg)
25
Semantics of a QVT-Core Mapping (fwd)
1) If Bottom Pattern found in unbound source model
2) & If Guard Pattern found in prev. bound model
3) Then create target model (and Trace Class)
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr...:Transition
t1:TProjectToPetrnet
t2:TTrackToPAT
ctools (check) mapping pnet (enforce)
guard
bottom
Mapping TrackToPlaceArcTransition
unbound?
bound?
create!
![Page 26: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/26.jpg)
26
Semantics of a QVT-Core Mapping (fwd)
1) If Bottom Pattern found in unbound source model
2) & If Guard Pattern found in prev. bound model
3) Then create target model (and Trace Class)
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr...:Transition
t1:TProjectToPetrnet
t2:TTrackToPAT
ctools (check) mapping pnet (enforce)
guard
bottom
Mapping TrackToPlaceArcTransition
unbound?
bound?
create!
Different processing of TGGs, but same result!
(Even more efficient...)
![Page 27: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/27.jpg)
27
“where”-Relationships in QVT-Relations
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr..:Transition
c e<<domain>> <<domain>>ctools pnet
whenProjectToPetrinet(pr, pn);
Relation TrackToPlaceArcTransition
wherePortPropertyToPlaceAnnotation(inPort, place);
PortPropertyToTransitionAnnotation(outPort, transition);
![Page 28: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/28.jpg)
28
“where”-Relationships in QVT-Relations
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr..:Transition
c e<<domain>> <<domain>>ctools pnet
whenProjectToPetrinet(pr, pn);
Relation TrackToPlaceArcTransition
wherePortPropertyToPlaceAnnotation(inPort, place);
PortPropertyToTransitionAnnotation(outPort, transition);
prop:Property
port:Port
an:Annotation
place:Place
c e
<<domain>> <<domain>>
ctools pnet
Relation TrackToPlaceArcTransition
![Page 29: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/29.jpg)
29
When vs. Where
● “Where” similar to a backward “When” of the invoked Relation:
where
TrackToPlaceArcTransition
PortPropertyToPlaceAnnotation
when
TrackToPlaceArcTransition
PortPropertyToPlaceAnnotation
≈
![Page 30: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/30.jpg)
30
A “When”-Relationship in QVT-Core
prop:Property
port:Port
an:Annotation
place:Place
Mapping PortPropertyToPlaceAnnotation
t1:TTrackToPAT
t2:TPropToAnnotation
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr...:Transition
t1:TProjectToPetrnet
t2:TTrackToPAT
ctools (check) mapping pnet (enforce)
guard
bottom
Mapping TrackToPlaceArcTransition
![Page 31: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/31.jpg)
31
when&where Relationships in QVT-Core
QVT-Relations
QVT-Core
RelationsToCoreTransformation
where where
when
where where
when
TrackToPlaceArcTransition
ProjectToPetrinet
PortPropToPlaceAnnot PortPropToTransitionAnnot
SignalToPlaceArcTransitions
whenwhen
ProjectToPetrinet
TrackToPlaceArcTransition SignalToPlaceArcTransitions
Track_PortPToPlaceAn Track_PortPToTransAn Signal_PortPToPlaceAn Signal_PortPToTransAn
whenwhen whenwhen
![Page 32: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/32.jpg)
32
where where
when
where where
when
TrackToPlaceArcTransition
ProjectToPetrinet
PortPropToPlaceAnnot PortPropToTransitionAnnot
SignalToPlaceArcTransitions
whenwhen
ProjectToPetrinet
TrackToPlaceArcTransition SignalToPlaceArcTransitions
Track_PortPToPlaceAn Track_PortPToTransAn Signal_PortPToPlaceAn Signal_PortPToTransAn
whenwhen whenwhen
when&where Relationships in QVT-Core
QVT-Relations
QVT-Core
RelationsToCoreTransformation
![Page 33: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/33.jpg)
33
“Unfolded” Mappings
prop:Property
port:Port
an:Annotation
place:Place
Mapping TrackToPlaceArcTransition_PortPropertyToPlaceAnnotation
t1:TTrackToPAT
t2:TPropToAnnotation
prop:Property
port:Port
an:Annotation
place:Place
Mapping SignalToPlaceArcTransition_PortPropertyToPlaceAnnotation
t1:TSignalToPAT
t2:TPropToAnnotation
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr...:Transition
t1:TProjectToPetrnet
t2:TTrackToPAT
ctools (check) mapping pnet (enforce)
guard
bottom
Mapping TrackToPlaceArcTransition
![Page 34: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/34.jpg)
34
“Unfolded” Mappings
prop:Property
port:Port
an:Annotation
place:Place
Mapping TrackToPlaceArcTransition_PortPropertyToPlaceAnnotation
t1:TTrackToPAT
t2:TPropToAnnotation
prop:Property
port:Port
an:Annotation
place:Place
Mapping SignalToPlaceArcTransition_PortPropertyToPlaceAnnotation
t1:TSignalToPAT
t2:TPropToAnnotation
pr:Project
track:Track
inPort:Port
outPort:Port
pn:Petrinet
place:Place
arc:Arc
tr...:Transition
t1:TProjectToPetrnet
t2:TTrackToPAT
ctools (check) mapping pnet (enforce)
guard
bottom
Mapping TrackToPlaceArcTransition
![Page 35: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/35.jpg)
35
QVT-Core vs. TGGs – Short Comparison
● Structurally similar rules
domain A correspondence domain B
++
++
++
++
++
++
++
precnd.
create++ ++
● Graph structure: Nodes and Edges
● Multiple Correspondence Nodes
domain A mapping domain B
guard
bottom
● Graph structure: Variables and OCL-Predicates
● One Trace Class
QVT-Core* TGG
*:QVT-Core does not specify a graphical notation
![Page 36: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/36.jpg)
36
QVT-Core vs. TGGs – Short Comparison
● Structurally similar rulesQVT-Core TGG
map TrackToPlaceArcTransition{ check ctools(project:Project){ track:Track, portIn:Port| track.project = project; track.port = portIn; track.port = portOut; } check enforce pnet(petrinet:Petrinet){ realize place:Place, ...
● Graph structure: Nodes and Edges
● Multiple Correspondence Nodes
● Graph structure: Variables and OCL-Predicates
● One Trace Class
domain A correspondence domain B
++
++
++
++
++
++
++
precnd.
create++ ++
![Page 37: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/37.jpg)
37
QVT-Core vs. TGGs – Short Comparison
QVT-Core TGG
NodeVariable
![Page 38: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/38.jpg)
38
QVT-Core vs. TGGs – Short Comparison
QVT-Core TGG
NodeVariable
EdgeReference Predicate (==) orReference Assignment (:=)
track:Track outPort:Porttrack.port:=outPort;
![Page 39: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/39.jpg)
39
QVT-Core vs. TGGs – Short Comparison
QVT-Core TGG
NodeVariable
EdgeReference Predicate (==) orReference Assignment (:=)
Attribute Value Constraint(Simple) Attribute Value Predicate or Attribute Value Assignment
track:Track outPort:Porttrack.port:=outPort;
![Page 40: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/40.jpg)
40
QVT-Core vs. TGGs – Short Comparison
QVT-Core TGG
NodeVariable
EdgeReference Predicate (==) orReference Assignment (:=)
Attribute Value Constraint(Simple) Attribute Value Predicate or Attribute Value Assignment
track:Track outPort:Porttrack.port:=outPort;
outPort.type==”out”; outPort:Port type==”out”
![Page 41: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/41.jpg)
41
QVT-Core vs. TGGs – Short Comparison
QVT-Core TGG
NodeVariable
EdgeReference Predicate (==) orReference Assignment (:=)
Attribute Value Constraint(Simple) Attribute Value Predicate or Attribute Value Assignment
track:Track outPort:Porttrack.port:=outPort;
outPort.type==”out”; outPort:Port type==”out”
–String–Boolean– Integer
![Page 42: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/42.jpg)
42
QVT-Core vs. TGGs – Short Comparison
QVT-Core TGG
NodeVariable
EdgeReference Predicate (==) orReference Assignment (:=)
Attribute Value Constraint(Simple) Attribute Value Predicate or Attribute Value Assignment
track:Track outPort:Porttrack.port:=outPort;
outPort.type==”out”; outPort:Port type==”out”
place.title:=outPort.name; outPort:Port title:=name place:Place
–String–Boolean– Integer
![Page 43: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/43.jpg)
43
QVT-Core vs. TGGs – Short Comparison
QVT-Core TGG
NodeVariable
EdgeReference Predicate (==) orReference Assignment (:=)
Attribute Value Constraint(Simple) Attribute Value Predicate or Attribute Value Assignment
track:Track outPort:Porttrack.port:=outPort;
outPort.type==”out”; outPort:Port type==”out”
place.title:=outPort.name; outPort:Port title:=name place:Place
place.id:=”id_”+outPort.name;
OCL Attribute Value Constraint(Complex) Attribute Value Predicate/Assignment
id:=”id_”+outPort.name place:Place
–String–Boolean– Integer
![Page 44: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/44.jpg)
44
QVT-Core vs. TGGs – Short Comparison
QVT-Core TGG
NodeVariable
EdgeReference Predicate (==) orReference Assignment (:=)
Attribute Value Constraint(Simple) Attribute Value Predicate or Attribute Value Assignment
track:Track outPort:Porttrack.port:=outPort;
outPort.type==”out”; outPort:Port type==”out”
place.title:=outPort.name; outPort:Port title:=name place:Place
place.id:=”id_”+outPort.name;
OCL Attribute Value Constraint(Complex) Attribute Value Predicate/Assignment
id:=”id_”+outPort.name place:Place
Outlook
–String–Boolean– Integer
![Page 45: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/45.jpg)
45
Summary
● QVT and TGGs are very similar● TGGs still have advantages
– Multiple Correspondence Nodes– Formal theory, e.g. to support verification
● Flexible, extendable Interpreter– Effectively used– For popular meta-modelling facility EMF
(and also other Java models)– Flexible, e.g. n:m model transformations
● TGGs could be a valueable input for QVT
![Page 46: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/46.jpg)
46
TGG Editor Screenshot
![Page 47: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/47.jpg)
47
TGG Editor – Creating a Node
1. Create a TGG node with the Node creation tool
2. Enter the node name
3. Draw an association to the DomainGraph-Pattern node
4. Select the desired type class from the domain class model
![Page 48: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/48.jpg)
48
TGG Editor – Creating an Edge
1. Draw an edge from a source to a target node
2. Select the appropriate type-reference
![Page 49: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/49.jpg)
49
Starting a Transformation
configuration file
correspondence model file
![Page 50: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/50.jpg)
50
Further TGG-Interpreter Features
● n-to-m model transformations● Multi Graph Grammars (“MGGs”)
![Page 51: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/51.jpg)
51
Further TGG-Interpreter Features
v1:Variable
v2:Variable
node1:Node
node2:Node
++a:Assignment
++slotve:VariableExp
++valve:VariableExp
##
ereference:EReference
rgp:RightGraphPattern
++edge:Edge
var12node1:VariableToNode
var22node2:VariableToNode
++a2edge:ReferenceAssignmentToEdge
bp:BottomPatternbp2rgp:BottomPatternToRightGraphPattern
(Domain)
qvt
(Domain)
qvt2tgg
(Domain)
ecore
(Domain)
tgg
● No start node needed● Navigating backwards on Edges
![Page 52: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/52.jpg)
52
Further TGG-Interpreter Features
v1:Variable
v2:Variable
node1:Node
node2:Node
++a:Assignment
++slotve:VariableExp
++valve:VariableExp
##
ereference:EReference
rgp:RightGraphPattern
++edge:Edge
var12node1:VariableToNode
var22node2:VariableToNode
++a2edge:ReferenceAssignmentToEdge
bp:BottomPatternbp2rgp:BottomPatternToRightGraphPattern
(Domain)
qvt
(Domain)
qvt2tgg
(Domain)
ecore
(Domain)
tgg
● No start node needed● Navigating backwards on Edges
matching start
![Page 53: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/53.jpg)
53
Further TGG-Interpreter Features
v1:Variable
v2:Variable
node1:Node
node2:Node
++a:Assignment
++slotve:VariableExp
++valve:VariableExp
##
ereference:EReference
rgp:RightGraphPattern
++edge:Edge
var12node1:VariableToNode
var22node2:VariableToNode
++a2edge:ReferenceAssignmentToEdge
bp:BottomPatternbp2rgp:BottomPatternToRightGraphPattern
(Domain)
qvt
(Domain)
qvt2tgg
(Domain)
ecore
(Domain)
tgg
● No start node needed● Navigating backwards on Edges
matching start
![Page 54: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/54.jpg)
54
Further TGG-Interpreter Features
v1:Variable
v2:Variable
node1:Node
node2:Node
++a:Assignment
++slotve:VariableExp
++valve:VariableExp
##
ereference:EReference
rgp:RightGraphPattern
++edge:Edge
var12node1:VariableToNode
var22node2:VariableToNode
++a2edge:ReferenceAssignmentToEdge
bp:BottomPatternbp2rgp:BottomPatternToRightGraphPattern
(Domain)
qvt
(Domain)
qvt2tgg
(Domain)
ecore
(Domain)
tgg
● No start node needed● Navigating backwards on Edges
matching start
![Page 55: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/55.jpg)
55
Further TGG-Interpreter Features
v1:Variable
v2:Variable
node1:Node
node2:Node
++a:Assignment
++slotve:VariableExp
++valve:VariableExp
##
ereference:EReference
rgp:RightGraphPattern
++edge:Edge
var12node1:VariableToNode
var22node2:VariableToNode
++a2edge:ReferenceAssignmentToEdge
bp:BottomPatternbp2rgp:BottomPatternToRightGraphPattern
(Domain)
qvt
(Domain)
qvt2tgg
(Domain)
ecore
(Domain)
tgg
● No start node needed● Navigating backwards on Edges
matching start
![Page 56: Reconciling TGGs with QVT - McGill Universitymsdl.cs.mcgill.ca/conferences/CAMPaM/.../QVTTGG.pdf · Main focus: Mapping QVT-Core to TGG – Realized through a TGG transformation –](https://reader033.vdocuments.mx/reader033/viewer/2022051912/600317fc744aaa385c6cf3d0/html5/thumbnails/56.jpg)
56
Bibliography
[1] J. Greenyer: A Study of Model Transformation Technologies: Reconciling TGGs with QVT. University of Paderborn, July 2006. Master/Diploma thesis supervised by E. Kindler and R. Wagner
[2] OMG: MOF QVT Final Adopted Specification http://www.omg.org/docs/ptc/05-11-01.pdf, 2005.
[3] A. Schürr: Specification of Graph Translators with Triple Graph Grammars.. Proceedings of the 20th International Workshop on Graph-Theoretic Conceptsin Computer Science, Spinger Verlag, Germany, June 1994.
[4] H. Giese, R. Wagner: Incremental Model Synchronization with Triple Graph Grammars. Proc. of the 9th International Conference on Model Driven Engineering Languages and Systems (MoDELS) Springer Verlag, (to appear), October 2006.
[5] University of Paderborn, Germany: Fujaba Tool Suite http://www.fujaba.de, 2006.
[6] A. Gepting, J. Greenyer, E. Kindler, A. Maas, S. Munkelt, C. Pales, T. Pivl, O. Rohe, V. Rubin, M. Sander, A. Scholand, C. Wagner, R. Wagner: Component Tools: A vision for a tool. E. Kindler (ed.): Algorithmen und Werkzeuge für Petrinetze (AWPN) - Algorithms and Tools for Petri nets. Proceedings of the Workshop AWPN, pp. 37-42, September 30th, October 1st, 2004.
[7] Gepting A., Greenyer J., Maas A., Munkelt S., Pales C., Pivl T., Rohe O., Sanders M., Scholand A., Wagner C., ComponentTools, an Infrastructure for the Design of Component Based Systems, Informatiktage 2005, Congress of Computer Science, Sankt Augusting, Germany, April 2005.
[8] A. Geburzi: Synthese von Modelltransformationsregeln aus Uebersetzungsbeispielen (Synthesis of model transformation rules from examples). November, 2006. Master/Diploma thesis supervised by R. Wagner