Upload
steffen-zschaler
View
189
Download
2
Tags:
Embed Size (px)
Citation preview
Reusable Specification ofNon-functional Properties
in DSLsFrancisco Durán, Steffen Zschaler, and Javier Troya
28 September, 2012
Context
• Model-driven Engineering (MDE)
– Domain-Specific Languages defined through
• Metamodels (abstract syntax)
• Graphics (concrete syntax)
• Language Semantics
– Models are token models
– Semantics is given through rewriting
• Specified using in-place model transformations
28/09/2012 (c) Durán, Zschaler, Troya 2
Example: A Production Line
28/09/2012 (c) Durán, Zschaler, Troya 3
Example: A Production Line
28/09/2012 (c) Durán, Zschaler, Troya 3
Example: A Production Line
28/09/2012 (c) Durán, Zschaler, Troya 3
Example: A Production Line
28/09/2012 (c) Durán, Zschaler, Troya 3
Non-functional Properties
28/09/2012 (c) Durán, Zschaler, Troya 4
Non-functional Properties
28/09/2012 (c) Durán, Zschaler, Troya 4
Non-functional Properties
28/09/2012 (c) Durán, Zschaler, Troya 4
Analysis Opportunities
DSL modelsDefined by the user
+Behavioral
Model
StructuralModel
Ecore (MOF)
José E. Rivera, Francisco Durán and Antonio Vallecillo: On the Behavioral Semantics of Real-Time Domain Specific Visual Languages. In Rewriting Logic and Its Applications, LNCS 6381, pp. 174–190
28/09/2012
Analysis Opportunities
DSL modelsDefined by the user
+Behavioral
Model
StructuralModel
Ecore (MOF)
Rewriting LogicSemantic DomainTransparent to the user
Semantic MappingsTransparent to the user
(Real-Time) MaudeSimulation, reachability analysis, model checking
José E. Rivera, Francisco Durán and Antonio Vallecillo: On the Behavioral Semantics of Real-Time Domain Specific Visual Languages. In Rewriting Logic and Its Applications, LNCS 6381, pp. 174–190
28/09/2012
Analysis Opportunities
DSL modelsDefined by the user
+Behavioral
Model
StructuralModel
Ecore (MOF)
Rewriting LogicSemantic DomainTransparent to the user
Semantic MappingsTransparent to the user
(Real-Time) MaudeSimulation, reachability analysis, model checking
José E. Rivera, Francisco Durán and Antonio Vallecillo: On the Behavioral Semantics of Real-Time Domain Specific Visual Languages. In Rewriting Logic and Its Applications, LNCS 6381, pp. 174–190
28/09/2012
•Observer values after simulation give predictions,• (Probabilistic) Model checking can be used toverify satisfaction of NFPs
28/09/2012 (c) Durán, Zschaler, Troya 6
A Different Example
28/09/2012 (c) Durán, Zschaler, Troya 6
A Different Example
28/09/2012 (c) Durán, Zschaler, Troya 6
A Different Example
28/09/2012 (c) Durán, Zschaler, Troya 6
A Different Example
28/09/2012 (c) Durán, Zschaler, Troya 6
A Different Example
28/09/2012 (c) Durán, Zschaler, Troya 6
A Different Example
28/09/2012 (c) Durán, Zschaler, Troya 6
A Different Example
Problem: Complete redefinition of response time.
Better:
Extract definition of response time into a separate
DSL and weave it in.
Modularised Response Time Observer
28/09/2012 (c) Durán, Zschaler, Troya 7
MMResponseTime Server, Queue,
Request
Modularised Response Time Observer
28/09/2012 (c) Durán, Zschaler, Troya 7
MMResponseTime Server, Queue,
Request
Weaving Languages
28/09/2012 (c) Durán, Zschaler, Troya 8
Weaving Languages
28/09/2012 (c) Durán, Zschaler, Troya 8
Weaving Languages
28/09/2012 (c) Durán, Zschaler, Troya 8
Weaving Languages
28/09/2012 (c) Durán, Zschaler, Troya 8
Weaving Languages
28/09/2012 (c) Durán, Zschaler, Troya 9
Weaving Languages (2)
28/09/2012 (c) Durán, Zschaler, Troya 10
Weaving Languages (2)
28/09/2012 (c) Durán, Zschaler, Troya 10
Weaving Languages (2)
28/09/2012 (c) Durán, Zschaler, Troya 10
Weaving Languages (2)
28/09/2012 (c) Durán, Zschaler, Troya 10
Weaving Languages (2)
28/09/2012 (c) Durán, Zschaler, Troya 11
Sanity Conditions
• Need to ensure that adding observers
does not change behavioursTransformation step possible for model expressed in DSL
Step still possible in the same model expressed in DSL +
Observers (possibly including appropriate observer objects)
• For any legal model and transformation
sequence
28/09/2012 (c) Durán, Zschaler, Troya 12
DSLMMDSL MDSL
M
Sanity Conditions
• Need to ensure that adding observers
does not change behavioursTransformation step possible for model expressed in DSL
Step still possible in the same model expressed in DSL +
Observers (possibly including appropriate observer objects)
• For any legal model and transformation
sequence
28/09/2012 (c) Durán, Zschaler, Troya 12
DSLMMDSL MDSL
M
This condition can only be checked once the merge has
been performed.
We provide conditions to be checked of the observer
model and the binding that imply the condition below.
Conclusions
• We show composition of language semantics
– For DSLs based on in-place transformation
– For conservative extensions
• Two checkable conditions to verify consistency of
such extensions
– One can be checked of observer language independent of
composition
• Currently working to weaken some of the
assumptions made on base language and binding,
etc.
28/09/2012 (c) Durán, Zschaler, Troya 13
QUESTIONS?
28/09/2012 (c) Durán, Zschaler, Troya 14