A Systematic Language Engineering Approach for Prototyping Domain Specific Modelling Languages
-
Upload
luis-pedro -
Category
Education
-
view
112 -
download
0
Transcript of A Systematic Language Engineering Approach for Prototyping Domain Specific Modelling Languages
Luis PedroUniversity of Geneva
A Systematic Language Engineering Approach for Prototyping Domain
Specific Modelling Languages
Luis Pedro January 23, 2009
Project
2
Luis Pedro January 23, 2009
Model
3
Luis Pedro January 23, 2009
Prototype
4
Luis Pedro January 23, 2009
Build
5
Luis Pedro January 23, 2009
Build
5
Luis Pedro January 23, 2009 6
Analysis/Requirements
Luis Pedro January 23, 2009 7
Model
Luis Pedro January 23, 2009 8
Prototype
Luis Pedro January 23, 2009 9
Implementation
Luis Pedro January 23, 2009 10
Luis Pedro January 23, 2009
Requirements
10
Luis Pedro January 23, 2009
ModelRequirements
10
Luis Pedro January 23, 2009
ModelRequirements Prototype
10
Luis Pedro January 23, 2009
ModelRequirements Prototype Implementation
10
Luis Pedro January 23, 2009
Language Engineering?
11
Luis Pedro January 23, 2009
A language that is used will be changed. - Meir M. Lehman
12
Luis Pedro January 23, 2009
LanguageModel
ImplementationRequirements Prototype
13
Luis Pedro January 23, 2009
What Language?
14
Luis Pedro January 23, 2009 14
Luis Pedro January 23, 2009
Domain Specific Language14
Luis Pedro January 23, 2009 15
Luis Pedro January 23, 2009
Complexity
15
Luis Pedro January 23, 2009
Diversity
Complexity
15
Luis Pedro January 23, 2009
Diversity
Complexity
Evolution
15
Luis Pedro January 23, 2009
Abstraction through rich concepts helps to manage complexity 16
Luis Pedro January 23, 2009
Integration of multiple languageshelps to manage diversity
Luis Pedro January 23, 2009
Flexible and modular languageshelp managing evolution 18
Luis Pedro January 23, 2009
Goals and Motivation
19
Luis Pedro January 23, 2009
Goals and Motivation
19
Luis Pedro January 23, 2009
Goals and Motivation
Re-use for Faster Language Development
19
Luis Pedro January 23, 2009
Goals and MotivationRe-use for Faster Language Development
Modularity
19
Luis Pedro January 23, 2009
Goals and MotivationRe-use for Faster Language Development
Modularity
Manage Language Complexity
19
Luis Pedro January 23, 2009
Goals and MotivationRe-use for Faster Language Development
Modularity
Manage Language Complexity
Incremental DSML development
19
Luis Pedro January 23, 2009
Goals and MotivationRe-use for Faster Language Development
Modularity
Manage Language Complexity
Incremental DSML development
19
Luis Pedro January 23, 2009
State of The Art
20
Luis Pedro January 23, 2009
Luis Pedro January 23, 2009
State of The Art: Methodologies
Luis Pedro January 23, 2009
Luis Pedro January 23, 2009
Metamodelling
Luis Pedro January 23, 2009
MetamodellingMOF and ECore
Luis Pedro January 23, 2009
Metamodelling
Model Transformation
MOF and ECore
Luis Pedro January 23, 2009
Metamodelling
Model Transformation
MOF and ECore
QVT
Luis Pedro January 23, 2009
Metamodelling
Model Transformation
Metamodel Composition
MOF and ECore
QVT
Luis Pedro January 23, 2009
Metamodelling
Model Transformation
Metamodel Composition
MOF and ECore
QVT
Model Extension
Luis Pedro January 23, 2009
Metamodelling
Model Transformation
Metamodel Composition
Semantics Enrichment
MOF and ECore
QVT
Model Extension
Luis Pedro January 23, 2009
Metamodelling
Model Transformation
Metamodel Composition
Semantics Enrichment
MOF and ECore
QVT
Model Extension
Semantics Anchoring
Luis Pedro January 23, 2009
Metamodelling
Model Transformation
Metamodel Composition
Semantics Enrichment
MOF and ECore
QVT
Model Extension
Transformation Composition
Semantics Anchoring
Luis Pedro January 23, 2009
Luis Pedro January 23, 2009
State of The Art: Tools
Luis Pedro January 23, 2009
Luis Pedro January 23, 2009
Language evolution
Luis Pedro January 23, 2009
Language evolution
Luis Pedro January 23, 2009
Language evolution
Verification
Luis Pedro January 23, 2009
Language evolution
Verification
Luis Pedro January 23, 2009
Language evolution
Verification
Graphical Mapping
Luis Pedro January 23, 2009
Language evolution
Verification
Graphical Mapping
Luis Pedro January 23, 2009
Language evolution
Verification
Graphical Mapping
Transformation
Luis Pedro January 23, 2009
Language evolution
Verification
Graphical Mapping
Transformation
Luis Pedro January 23, 2009
Language evolution
Verification
Graphical Mapping
Transformation
Composition
Luis Pedro January 23, 2009
Language evolution
Verification
Graphical Mapping
Transformation
Composition
Luis Pedro January 23, 2009
Composition23
Luis Pedro January 23, 2009 24
Luis Pedro January 23, 2009
Disjoint Union
24
Luis Pedro January 23, 2009
Disjoint UnionMerge (Union)
24
Luis Pedro January 23, 2009
Disjoint UnionMerge (Union)
AssociationAggregation
Inheritance
24
Luis Pedro January 23, 2009
Disjoint UnionMerge (Union)
AssociationAggregation
Inheritance
Parameterization
24
Luis Pedro January 23, 2009
Domain Concept
25
Luis Pedro January 23, 2009
Domain Concept
+Metamodel
25
Transformation
Luis Pedro January 23, 2009
Domain Concept
A semantic block capturingdomain knowledge
+Metamodel
25
Transformation
Luis Pedro January 23, 2009 26
Luis Pedro January 23, 2009 26
Domain Concepts
Luis Pedro January 23, 2009 26
uses
Domain Concepts
Luis Pedro January 23, 2009 26
Composition
uses
Domain Concepts
Luis Pedro January 23, 2009 26
DSM
L
Composition
uses
Domain Concepts
Luis Pedro January 23, 2009 26
Transformed DSML
Semantic
Mapping
DSM
L
Composition
uses
Domain Concepts
Luis Pedro January 23, 2009
Semantics, Prototyping and Animation
27
Luis Pedro January 23, 2009
Chosen Platform for Semantic Mapping:CO-OPN Builder
Semantics, Prototyping and Animation
27
Luis Pedro January 23, 2009
Chosen Platform for Semantic Mapping:CO-OPN Builder
Semantics, Prototyping and Animation
Validation Animation Test Case Generation
Java Prototype Generation
27
Luis Pedro January 23, 2009 28
fp formal parameter
ep effective parameter
Luis Pedro January 23, 2009 28
fp formal parameter
ep effective parameter
(Substitutes)
fpep
metamodel
�
Before Parameterization
mm
Luis Pedro January 23, 2009 28
fp formal parameter
ep effective parameter
(Substitutes)
fpep
metamodel
�
ep
Before Parameterization
After Parameterization
mm
mm’
Luis Pedro January 23, 2009
Metamodel Compositionmm� = mm[fp
�⇥� ep, Ffp]
29
Luis Pedro January 23, 2009
Metamodel Compositionmm� = mm[fp
�⇥� ep, Ffp]
fp is the formal parameter
29
Luis Pedro January 23, 2009
Metamodel Compositionmm� = mm[fp
�⇥� ep, Ffp]
fp is the formal parameter
ep is the effective parameter
29
Luis Pedro January 23, 2009
Metamodel Compositionmm� = mm[fp
�⇥� ep, Ffp]
fp is the formal parameter
ep is the effective parameter
φ is a total function creating a map between elements of fp and ep
29
Luis Pedro January 23, 2009 30
Moving Entity DSML Metamodel
Luis Pedro January 23, 2009 31
Train Entity DSML Metamodel
� = {⇤MovingEntity, T rainEntity⌅⇤JunctionPoint, RaiwayStation⌅}
Luis Pedro January 23, 2009 31
Train Entity DSML Metamodel
� = {⇤MovingEntity, T rainEntity⌅⇤JunctionPoint, RaiwayStation⌅}
Luis Pedro January 23, 2009 32
Robot Entity DSML Metamodel
� = {⇤MovingEntity, RobotEntity⌅⇤JunctionPoint, Object⌅}
Luis Pedro January 23, 2009 32
Robot Entity DSML Metamodel
� = {⇤MovingEntity, RobotEntity⌅⇤JunctionPoint, Object⌅}
Luis Pedro January 23, 2009
Transformation
33
Luis Pedro January 23, 2009
Transformation
Semantics Mapping
33
Luis Pedro January 23, 2009
Transformation
Semantics Mapping
Set of Rules Describing a Transformation
33
Luis Pedro January 23, 2009
Transformation
Semantics Mapping
Set of Rules Describing a Transformation
Model Transformation Language
33
Luis Pedro January 23, 2009
Trmm� = Trmm[Trfp⇥,�⇥�� Trep]
Transformation Composition
Metamodel Composition
mm� = mm[fp�⇥� ep, Ffp]
34
Luis Pedro January 23, 2009
Trmm� = Trmm[Trfp⇥,�⇥�� Trep]
Transformation Composition
Trfp template transformation for fp
Metamodel Composition
mm� = mm[fp�⇥� ep, Ffp]
34
Luis Pedro January 23, 2009
Trmm� = Trmm[Trfp⇥,�⇥�� Trep]
Transformation Composition
Trfp template transformation for fpTrep template transformation for ep
Metamodel Composition
mm� = mm[fp�⇥� ep, Ffp]
34
Luis Pedro January 23, 2009
Trmm� = Trmm[Trfp⇥,�⇥�� Trep]
Transformation Composition
Trfp template transformation for fpTrep template transformation for ep
φ: Dom(Trfp) ! Dom(Trep)
Metamodel Composition
mm� = mm[fp�⇥� ep, Ffp]
34
Luis Pedro January 23, 2009
Trmm� = Trmm[Trfp⇥,�⇥�� Trep]
Transformation Composition
Trfp template transformation for fpTrep template transformation for ep
φ: Dom(Trfp) ! Dom(Trep)
ψ: Cod(Trfp) ! Cod(Trep)
Metamodel Composition
mm� = mm[fp�⇥� ep, Ffp]
34
Luis Pedro January 23, 2009
What Happens to Transformations
35
Luis Pedro January 23, 2009
Transformation Element is a Leaf
36
Luis Pedro January 23, 2009
Transformation Element is a Leaf
36
Luis Pedro January 23, 2009
Transformation Element is a Leaf
Trfp1
Trfp2
...
Trfpn
Trep1
Trep2
...
Trepn
Trmm Trep
36
Luis Pedro January 23, 2009
Transformation Element is a Leaf
Trfp1
...
Trfpn
Trep1
Trep2
...
Trepn
...
Trfpn
Trmm Trep
36
Luis Pedro January 23, 2009
Transformation Element is a Leaf
Trfp1 Trep1
Trep2
...
Trepn
...
Trfpn
Trmm Trep
36
Luis Pedro January 23, 2009
Transformation Element is a Leaf
Trfp1
Trep1
Trep2
...
Trepn
...
Trfpn
Trfp⇥,�⇥�� Trep
�(Trfp2, T rep)
36
Luis Pedro January 23, 2009 37
Transformation Element is a Leaf
rule ruleJunctionPoint { from jp : MovingEntity!JunctionPoint to cl : COOPNMetaModel!COOPNClass(...)}
rule ruleMovingEntity { from me : MovingEntity!MovingEntity to cl : COOPNMetaModel!COOPNClass(...)}
rule ruleRailWayStation { from rs : TrainEntity!RailWayStation to cl : COOPNMetaModel!COOPNClass, pl: COOPNMetaModel!"COOPNClass!Place" (. . .)}
(. . .)
� = {�Trfp, T rTrainEntity⇥)
ep = TrTrainEntityTrfp
Luis Pedro January 23, 2009
General Case
38
Luis Pedro January 23, 2009
General Case
38
Luis Pedro January 23, 2009
Trfp1
Trfp2
...
Trfpn
Trep1
Trep2
...
Trepn
Trmm Trep
General Case
38
Luis Pedro January 23, 2009
Trfp1
Trfp2
...
Trfpn
Trep1
Trep2
...
Trepn
Trmm Trep
General Case
Trfp|TF {}TE
}Trep � TE
38
Luis Pedro January 23, 2009
Trfp1
Trfp2 Trep2
...
Trepn
...
Trfpn
Trmm Trep
General Case
Trfp|TF { }Trep � TE
38
Luis Pedro January 23, 2009
Trfp1
Trfp2
Trep2
...
Trepn
...
Trfpn
General Case
Trfp⇥,�⇥�� Trep
�(⇤Trfp, (Trep � TE) ⇥ (Trfp|TF )⌅)
Trfp|TF {
Trep � TE }38
Luis Pedro January 23, 2009 39
General Case
rule ruleJunctionPoint { from jp : MovingEntity!JunctionPoint to cl : COOPNMetaModel!COOPNClass(...)}
rule ruleTrainEntity { from tr : TrainEntity!TrainEntity to cl : COOPNMetaModel!COOPNClass(...)}
rule ruleActionPlan { (. . .)
}
rule ruleGoToAction { (. . .)
}
�(⇤Trfp, (Trep � TE) ⇥ (Trfp|TF )⌅)
Tr1fp Tr1
ep
Tr2ep
Tr3ep
{ }}}
{ } TETrfp|TF
} Trep � TE
ep = TrTrainEntityTrfp
Luis Pedro January 23, 2009 40
Luis Pedro January 23, 2009
CoPsy
40
Luis Pedro January 23, 2009
CoPsy
Compositional Platform for Domain Specific Modelling Languages Prototyping
40
Luis Pedro January 23, 2009 42
Luis Pedro January 23, 2009
ModularIncremental
Re-use of Concepts
DSML Development
42
Luis Pedro January 23, 2009
ModularIncremental
Re-use of Concepts
Fast Prototyping
DSML Development
DSML Validation
Animation
42
Luis Pedro January 23, 2009
ModularIncremental
DSML Semantics
Re-use of Concepts
Fast Prototyping
DSML Development
DSML Validation
Animation
42
Luis Pedro January 23, 2009 43
Luis Pedro January 23, 2009 43
Luis Pedro January 23, 2009
Properties Check
43
Luis Pedro January 23, 2009
Properties Check
Semantics Preservation
43
Luis Pedro January 23, 2009
Versioning and Traceability
Properties Check
Semantics Preservation
43
Luis Pedro January 23, 2009
Versioning and Traceability
Properties Check
Semantics Preservation
Graphical Extensions
43
Luis Pedro January 23, 2009
Versioning and Traceability
Properties Check
Semantics Preservation
Graphical Extensions
Integration with other DSML environments
43
Luis Pedro January 23, 2009
f(x)
�a� b
���
�
1�i�n
(S�i , S�i)
⇥�
1�i�n
�{true, false} :� Bool
⇥
�v, si⇥
44
Luis Pedro January 23, 2009
f(x)
�a� b
���
�
1�i�n
(S�i , S�i)
⇥�
1�i�n
�{true, false} :� Bool
⇥
�v, si⇥
44
45
45
(Pedro, Risoldi, Amaral, Barroca, & Buchs, 2009) Composing Visual Syntax for Domain Specific Languages Prototyping, Human-Computer Interaction 2009
(Pedro, Amaral, & Buchs, 2008) Foundations for a Domain Specific Modeling Language Prototyping Environment: A compositional approach, in Proceedings of the 8th OOPSLA ACM-SIGPLAN Workshop on Domain-Specific Modeling (DSM), October 2008;
(Pedro, Lucio, & Buchs, 2007) System Prototype and Verification Using Metamodel-Based Transformations, in IEEE Distributed Systems Online, 2007;
(Pedro, Buchs, & Lucio, 2007) Model and Metamodel Semantics Enrichment Using Transformations and Domain Composition, in Rapid Integration of Software Engineering techniques 2007 (to be published);
(Pedro, Lucio, & Buchs, 2006a) Principles for System Prototype and Verification Using Metamodel Based Transformations, in Proceedings of IEEE International Workshop on Rapid System Prototyping, 2006;
(A. Chen, Buchs, Lucio, Pedro, & Risoldi, 2006) Modeling Distributed Systems using Concurrent Object Oriented Petri Nets, in Proceedings of the Fourth International Workshop on Modelling of Objects, Components and Agents, 2006
(Pedro, Lucio, & Buchs, 2006b) Prototyping Domain Specific Languages With CO-OPN, in Proceedings of Springer-Verlag Rapid Integration of Software Engineering techniques, 2005;
(Pedro, 2008) Metamodeling with Eclipse, Centre Universitaire D’Informatique, Universitè de Genève, 2008;
Technical Reports
Articles
(Pedro, 2006) UML2 to CO-OPN transformation: State Machines and Class Diagrams, Centre Universitaire D’Informatique, Universitè de Genève, 2006;
46