35
Reusable Specification of Non-functional Properties in DSLs Francisco Durán, Steffen Zschaler, and Javier Troya 28 September, 2012

Reusable Specification of Non-functional Properties in DSLs

Embed Size (px)

Citation preview

Page 1: Reusable Specification of Non-functional Properties in DSLs

Reusable Specification ofNon-functional Properties

in DSLsFrancisco Durán, Steffen Zschaler, and Javier Troya

28 September, 2012

Page 2: Reusable Specification of Non-functional Properties in DSLs

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

Page 3: Reusable Specification of Non-functional Properties in DSLs

Example: A Production Line

28/09/2012 (c) Durán, Zschaler, Troya 3

Page 4: Reusable Specification of Non-functional Properties in DSLs

Example: A Production Line

28/09/2012 (c) Durán, Zschaler, Troya 3

Page 5: Reusable Specification of Non-functional Properties in DSLs

Example: A Production Line

28/09/2012 (c) Durán, Zschaler, Troya 3

Page 6: Reusable Specification of Non-functional Properties in DSLs

Example: A Production Line

28/09/2012 (c) Durán, Zschaler, Troya 3

Page 7: Reusable Specification of Non-functional Properties in DSLs

Non-functional Properties

28/09/2012 (c) Durán, Zschaler, Troya 4

Page 8: Reusable Specification of Non-functional Properties in DSLs

Non-functional Properties

28/09/2012 (c) Durán, Zschaler, Troya 4

Page 9: Reusable Specification of Non-functional Properties in DSLs

Non-functional Properties

28/09/2012 (c) Durán, Zschaler, Troya 4

Page 10: Reusable Specification of Non-functional Properties in DSLs

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

Page 11: Reusable Specification of Non-functional Properties in DSLs

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

Page 12: Reusable Specification of Non-functional Properties in DSLs

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

Page 13: Reusable Specification of Non-functional Properties in DSLs

28/09/2012 (c) Durán, Zschaler, Troya 6

A Different Example

Page 14: Reusable Specification of Non-functional Properties in DSLs

28/09/2012 (c) Durán, Zschaler, Troya 6

A Different Example

Page 15: Reusable Specification of Non-functional Properties in DSLs

28/09/2012 (c) Durán, Zschaler, Troya 6

A Different Example

Page 16: Reusable Specification of Non-functional Properties in DSLs

28/09/2012 (c) Durán, Zschaler, Troya 6

A Different Example

Page 17: Reusable Specification of Non-functional Properties in DSLs

28/09/2012 (c) Durán, Zschaler, Troya 6

A Different Example

Page 18: Reusable Specification of Non-functional Properties in DSLs

28/09/2012 (c) Durán, Zschaler, Troya 6

A Different Example

Page 19: Reusable Specification of Non-functional Properties in DSLs

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.

Page 20: Reusable Specification of Non-functional Properties in DSLs

Modularised Response Time Observer

28/09/2012 (c) Durán, Zschaler, Troya 7

MMResponseTime Server, Queue,

Request

Page 21: Reusable Specification of Non-functional Properties in DSLs

Modularised Response Time Observer

28/09/2012 (c) Durán, Zschaler, Troya 7

MMResponseTime Server, Queue,

Request

Page 22: Reusable Specification of Non-functional Properties in DSLs

Weaving Languages

28/09/2012 (c) Durán, Zschaler, Troya 8

Page 23: Reusable Specification of Non-functional Properties in DSLs

Weaving Languages

28/09/2012 (c) Durán, Zschaler, Troya 8

Page 24: Reusable Specification of Non-functional Properties in DSLs

Weaving Languages

28/09/2012 (c) Durán, Zschaler, Troya 8

Page 25: Reusable Specification of Non-functional Properties in DSLs

Weaving Languages

28/09/2012 (c) Durán, Zschaler, Troya 8

Page 26: Reusable Specification of Non-functional Properties in DSLs

Weaving Languages

28/09/2012 (c) Durán, Zschaler, Troya 9

Page 27: Reusable Specification of Non-functional Properties in DSLs

Weaving Languages (2)

28/09/2012 (c) Durán, Zschaler, Troya 10

Page 28: Reusable Specification of Non-functional Properties in DSLs

Weaving Languages (2)

28/09/2012 (c) Durán, Zschaler, Troya 10

Page 29: Reusable Specification of Non-functional Properties in DSLs

Weaving Languages (2)

28/09/2012 (c) Durán, Zschaler, Troya 10

Page 30: Reusable Specification of Non-functional Properties in DSLs

Weaving Languages (2)

28/09/2012 (c) Durán, Zschaler, Troya 10

Page 31: Reusable Specification of Non-functional Properties in DSLs

Weaving Languages (2)

28/09/2012 (c) Durán, Zschaler, Troya 11

Page 32: Reusable Specification of Non-functional Properties in DSLs

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

Page 33: Reusable Specification of Non-functional Properties in DSLs

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.

Page 34: Reusable Specification of Non-functional Properties in DSLs

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

Page 35: Reusable Specification of Non-functional Properties in DSLs

QUESTIONS?

28/09/2012 (c) Durán, Zschaler, Troya 14