models and meanings
DESCRIPTION
Why do we model? Apart from to generating code, models can *have (and should have) many different usages in the realm of* Software Engineering including, e.g., understanding and reasoning *about the system under study, simulating it, or analyzing its* properties before the system is built. For these tasks we need to be *able to make questions about the model, and therefore count on* languages for expressing both the models and the questions, at the *right level of abstraction, and using the appropriate notations.* This talk discusses the need to count on different models to* describe a system, using different languages, and how semantics can *be assigned to them using model transformations. Such semantics *define the "meanings" of models, making them amenable to *interpretation and analysis.TRANSCRIPT
Assigning Meanings to Models (Using Model Transformations)
Antonio Vallecillo[Francisco Durán, José E. Rivera, J. Troya]
Atenea Research Group
Málaga, 2011
Assigning meanings to Models
… When we consider MDE with this unified vision, many well-known situations may be integrated into a more general consideration. To take one additional example, the seminal work of R. Floyd ("Assigning meanings to programs", [12]) that founded the research field of programming axiomatics may be viewed as "decorating" a flowchart model with an axioms model. This may lead us first to consider decorations as models, then to understand the nature of the binding between the flowchart model and the axioms model, this binding being itself some kind of correspondence model. Finally, these considerations may lead us to generalize R. Floyd’s approach and to add on the research agenda a new item on "Assigning meaning to models". Model weaving and model transformation will be essential to the study of this subject.
[Jean Bézivin, “On the Unification Power of Models”, 2005]
A. Vallecillo: "Assigning Meaning to Models" 2
A. Vallecillo: "Assigning Meaning to Models" 3
Models
A. Vallecillo: "Assigning Meaning to Models" 4
Model
“A description or specification of a system and its environment for some certain purpose. A model is often presented as a combination of drawings and text. The text may be in a modeling language or in a natural language.“ [MDA guide (V1 and 2, ab/2003-01-03, 23 January, 2003)]"A model represents some concrete or abstract thing of interest, and does so with a specific purpose. A model is related to the thing it represents by explicit or implicit correspondences between the elements of that model and the parts of that thing. This correspondence enables understanding the intended meaning of that model.” [MDA Guide (V3, ormsc/05-11-03, 30 November 2005)]"A model captures a view of a physical system. It is an abstraction of the physical system, with a certain purpose. This purpose determines what is to be included in the model and what is irrelevant. Thus the model completely describes those aspects of the physical system that are relevant to the purpose of the model, at the appropriate level of detail." [UML Superstructure 2.1.1 (formal/2007-02-05)]"A description of (part of) a system written in a well-defined language." (NOTE: Equivalent to specification.) [Kleppe, 2003]"A representation of a part of the function, structure and/or behavior of a system” [Model Driven Architecture (MDA) ormsc/2001-07-01]"A set of statements about the system.“ (Statement: expression about the system that can be true or false.) [Seidewitz, 2003] "M is a model of S if M can be used to answer questions about S" [D.T. Ross and M. Minsky, 1960]
A. Vallecillo: "Assigning Meaning to Models" 5
Model ~ Description
Model
1: obsolete : a set of plans for a building2: dialect British : copy, image3: structural design <a home on the model of an old farmhouse>4: a usually miniature representation of something ; also : a pattern of something to be made5: an example for imitation or emulation6: a person or thing that serves as a pattern for an artist ; especially : one who poses for an artist7: archetype8: an organism whose appearance a mimic imitates9: one who is employed to display clothes or other merchandise10 a: a type or design of clothing b: a type or design of product (as a car)
11: a description or analogy used to help visualize something (as an atom) that cannot be directly observed
12: a system of postulates, data, and inferences presented as a mathematical description of an entity or state of affairs; also: a computer simulation based on such a system <climate models>
13: version14: animal model
A. Vallecillo: "Assigning Meaning to Models" 6
http://www.merriam-webster.com/dictionary/model
Some definitions
Model (of a <X>): A representation or specification of a <X> from a given point of view and with a particular purpose
Prototype model: A functional model of a <X>, where the emphasis in on testing – e.g., to verify the design
Domain Specific Model: A model written in a domain specific language
Domain Specific Language: A language which offers concepts and notations closer to the domain experts, at an appropriate level of abstraction, and with a particular purpose
Model Transformation: An algorithmic specification (declarative or operational) of the relationship between models
A. Vallecillo: "Assigning Meaning to Models" 7
Meaning
1 a: the thing one intends to convey especially by language: purport 1 b: the thing that is conveyed especially by language: import
2: something meant or intended: aim <a mischievous meaning was apparent>
3: significant quality; especially: implication of a hidden or special significance <a glance full of meaning>
4 a: the logical connotation of a word or phrase 4 b: the logical denotation or extension of a word or phrase
A. Vallecillo: "Assigning Meaning to Models" 8
http://www.merriam-webster.com/dictionary/meaning
Semantics
1: the study of meanings [Merrian-Webster]a: the historical and psychological study and the classification of changes in the signification of words or forms viewed as factors in linguistic development b (1): semiotic (2): a branch of semiotic dealing with the relations between signs and what they refer to and including theories of denotation, extension, naming, and truth
Formal semanticists are concerned with the modeling of meaning in terms of the semantics of logic. In computer science, where it is considered as an application of mathematical logic, semantics reflects the meaning of programs or functions [wikipedia]
A. Vallecillo: "Assigning Meaning to Models" 9
The Meaning of Models
“ There are only 10 types of people in
the world: Those who understand binary, and those who don't
10A. Vallecillo: "Assigning Meaning to Models"
Sure?
“There are only 10 types of people in
the world: Those who understand binary, and those who don't”
11A. Vallecillo: "Assigning Meaning to Models"
Same model for different concepts
“ There are only 10 types of people in
the world: Those who understand binary, and those who don't
12A. Vallecillo: "Assigning Meaning to Models"
210
Your meaning
goes here…
Different models for the same concept
10 X 1010 0A
13A. Vallecillo: "Assigning Meaning to Models"
10101010
What does this model mean?
A. Vallecillo: "Assigning Meaning to Models" 14
What does this model means?
A. Vallecillo: "Assigning Meaning to Models" 15
[[M]]BPM
N
[[M]]UML
A
C
B
Exclusivesemantics
Inclusivesemantics
A. Vallecillo: "Assigning Meaning to Models" 16
SM
[[M]]
{{S}}
purportimport
Why do I need to assign meanings to models?
What do I need models for?Describe the system
Structure, behaviour, ...Separate concepts at different conceptual levelsCommunicate with stakeholders
Understand the systemIf existing (legacy applications)
Validate the modelDetect errors and omissions in design ASAP
Mistakes are cheaper at this stage
Prototype the system (execution of the model)Formal analysis of system properties
Drive implementationCode skeleton and templates, complete programs (?)
A. Vallecillo: "Assigning Meaning to Models" 17
[Bran Selic, 2003]
Impossible without
precise meanings!
How do we assign meaning?
How do we express the meaning ofStructure?Behavior?Time-dependent functionality?QoS properties?…
Which is the best notation for each of those aspects?It depends on the purpose of the model……and must have a precise meaning
A. Vallecillo: "Assigning Meaning to Models" 18
Domain Specific Modeling Languages
A. Vallecillo: "Assigning Meaning to Models" 20
Domain Specific Modeling Languages (DSML)
Languages for representing different views of a system in terms of models
Higher-level abstraction than general purpose languages
Closer to the problem domain than to the implementation domain
Closer to the domain experts, allowing modelers to perceive themselves as working directly with domain concepts
Domain rules can be included into the language as constraints, disallowing the specification of illegal or incorrect models.
A. Vallecillo: "Assigning Meaning to Models" 21
An example of a DSM
The design for a conference application intended to run on a Symbian/S60 phone.
[Borrowed fromJuha-Pekka Tolvanen,
“Domain-specific Modeling: Making Code Generation Complete”
http://www.devx.com.]
Visual DSMLs
VDSMLs tend to offer substantial gains over conventional textual languages
Formal studies show significant benefits for novicesIncreasing number of VDSMLs being defined
But not a panacea: every notation has advantages and disadvantages
[Not the subject of this talk]
A. Vallecillo: "Assigning Meaning to Models" 22
[Thomas R.G. Green & Marian Petre]
[T. Green, M. Petre “Usability Analysis of Visual Programming Environments: a ‘cognitive dimensions’ framework” JVLC, 1996]
[Kirsten whitley “Visual programming languages and the empirical evidence for and against”, JVLC 1997]
[R. Navarro-Prieto, J. Cañas “Are visual programming languages better? The role of imagery in program comprehension”, IJHCS 2001]
“The impossible equation”
USA (estimates for 2012):
• 90M computer users
• 55M Spreadsheet & DB users
• 13M self-described as programmers
• 2.5M professional programmers[Source:US Bureau of Labour Statistics, 2006]
A. Vallecillo: "Assigning Meaning to Models" 23
[J. Bezivin, Keynote at JISBD 2009]
End-user Programming[Modeling]
Most software creators are not software professionals
End users are participants and developers, not passive consumersThey do not reason about software like professionals[Mary Shaw, The Challenge of Pervasive Software to the Conventional Wisdom of Software Engineering, ESEC-FSE09]
End users are not “casual,” “novice” or “naive” users; they are people such as chemists, librarians, teachers, architects, and accountants, who have computational needs and want to make serious use of computers, but who are not interested in becoming professional programmers.
[Bonnie A. Nardi, A Small Matter of Programming. MIT Press, 1993]
A. Vallecillo: "Assigning Meaning to Models" 24
End-user (Visual) Modeling
A. Vallecillo: "Assigning Meaning to Models" 25
Production systems
A. Vallecillo: "Assigning Meaning to Models" 26
DSMLs are starting to proliferate
They allow users to model their systems at an appropriate level of abstraction
Some of them allow more than “documentation”Code generationAnimationSimulation…
Very few allow specification and analysis of the Quality Properties (NFPs) of modeled systems
QoS usage and management constraints: performance, reliability, resource consumption and allocation, etc.
A. Vallecillo: "Assigning Meaning to Models" 27
Requirements for PA of DSM
Notations for describing systems must be: Simple and intuitive Close to the problem domainClose to the domain experts’ language
Models must be: Abstract, yet preciseExecutable (to, at least, prototype systems)
QoS notations must be:Simple and precise, yet expressive
Analysis results and feedback must be:Understandable and easy to manage
A. Vallecillo: "Assigning Meaning to Models" 28
“Being abstract is something profoundly different from being vague... The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise.”
Edsger Dijkstra
A. Vallecillo: "Assigning Meaning to Models" 29
Notations for describing systems must be normally are: Simple and intuitive Complex Close to the problem domainClose to the solution domainClose to the domain experts’ language General purpose
Models must be normally are: Abstract, yet precise Too detailed, impreciseExecutable Non-executable
QoS notations must be normally are: Simple and precise, yet expressive Too complex and low level (more than needed for most end-user DSMLs)
Analysis results and feedback must be normally are: Understandable and easy to manage Tough to deal with!
Current notations for DSMs
A. Vallecillo: "Assigning Meaning to Models" 31
“Close to the problem domain”
Once upon a time, there was a team leader that was going on holidays. Before leaving, she made the last recommendation to her small team of three young engineers: “For the ongoing project, do not start coding in Java before the UML model is completely finished and you all agree on the model.”
On the Monday morning, as soon as she left, one of the engineers told the others about a wonderful discovery he made while twittering in the weekend: a very powerful tool that generates UML diagrams from code. The decision was rapidly taken and all three started coding the problem in Java.
Some days before the end of the leader’s holidays, all the Java code was used to generate UML diagrams and both the code and the UML diagrams were handled to the group leader.
She was quite impressed about the level of detail of the UML model and the narrow correspondence between the code and the model.
A. Vallecillo: "Assigning Meaning to Models" 32
[Borrowed from J. Bezivin]
33A. Vallecillo: "Assigning Meaning to Models"
The resulting model
Each notation is more apt for a task
34A. Vallecillo: "Assigning Meaning to Models"
MCMLXVII+ DLXXIX ???
1.967+ 579
Each notation is more apt for a task
35A. Vallecillo: "Assigning Meaning to Models"
MCMLXVII+ DLXXIX ???
1.967+ 579 2.546
Each notation is more apt for a task
36A. Vallecillo: "Assigning Meaning to Models"
MCMLXVII+ DLXXIX MMDXLVI
1.967+ 579 2.546
How do you solve this problem?
A 40-years-old man has a daughter and a son. If the difference of age between the kids is 4 years, and the sum of their ages is half of the age of the father, how old are they?
A. Vallecillo: "Assigning Meaning to Models" 37
x – y = 4x + y = 20
x = 12y = 8
Solution: the older is 12 and the younger is 8
2x = 24
+
Problems, Notations, Solutions
An invariant through the history of mature disciplines is the search for notations that allow formulating problems in a language that allows their easy solution
http://en.wikipedia.org/wiki/History_of_mathematical_notation http://en.wikipedia.org/wiki/Temporal_logic
38A. Vallecillo: "Assigning Meaning to Models"
Our current software modeling notations
A. Vallecillo: "Assigning Meaning to Models" 39
The UML way…
Sauron’s approach to metamodeling(e.g., OMG’s UML metamodel)
The lord of the Metamodels (obviously, adapted)
Three notations for the Structure modelers under the sky,Seven for the Behavior modelers in their halls of stone,
Tree for mortal Packagers doomed to die,One for the Designer of the Whole system on his dark
throneIn the Land of Mof where the shadows lie.
One Metamodel to rule them all, One Metamodel to find them,
One Metamodel to bring them all and in the darkness bind them
In the Land of Mof where the shadows lie.
A. Vallecillo: "Assigning Meaning to Models" 41
No general purpose language can express all different semantics without becoming a monster
Especially under the presence of antagonist semantics (Discrete & continuous; synchronous & asynchronous;...)
A. Vallecillo: "Assigning Meaning to Models" 42
“More general does not mean Better. Heterogeneity may be better than generality. ...Useful semantics imply constraints on designers.” Edward A. Lee
How can we specify DSMs?
How do we express in a precise and abstract manner:
StructureBehaviorTime-dependent functionalityQuality properties (QoS,…)
Which is the best notation for each of those aspects?It depends on the purpose of the model……must have a precise meaning…and must allow the analysis of the models
A. Vallecillo: "Assigning Meaning to Models" 43
Visual DSMLs
44A. Vallecillo: "Assigning Meaning to Models"
Anatomy of a DSML (I)
45A. Vallecillo: "Assigning Meaning to Models"
Anatomy of a DSML (I)
46A. Vallecillo: "Assigning Meaning to Models"
Anatomy of a DSML (I)
47A. Vallecillo: "Assigning Meaning to Models"
We need more than syntax…
Describe meaningful modelsAt the appropriate level of abstractionIn a correct, complete and accurate mannerUsing a notation natural to the target domain engineer
Animate models Explicitly define behavioral semantics of DSLs so that models can be understood, manipulated and maintained by both users and machinesAdd Non-Functional Properties (Time, QoS,…) to DSLsMake models amenable to simulation
Analyse modelsConnect DSLs to Analysis tools
48A. Vallecillo: "Assigning Meaning to Models"
Anatomy of a DSML (II)
49A. Vallecillo: "Assigning Meaning to Models"
Anatomy of a DSML (II)
50A. Vallecillo: "Assigning Meaning to Models"
The village metaphor
51A. Vallecillo: "Assigning Meaning to Models"
Semantic (or “Meaningful”) Domains
The meaning of a model M is defined by its interpretation in a meaningful semantic domain D.
Each Semantic Domain has
Precise semanticsA set of (equivalent) notationsA set of analysis toolsUnderlying logic
Semantic Bridges connect Semantic Domains
52A. Vallecillo: "Assigning Meaning to Models"
The Prolog villageThe QNM villageThe Petri Net villageThe Coq villageThe Process Alg villageThe Maude villageThe Z villageThe Modellica villageThe B village…
(vs. “meaningless” Models)
Expressing semantic bridges
As Model Transformations
Possible if correspondences can be expressed as functionsPairwise consistency can be formally studied
One form of consistency involves a set of correspondence rules to steer a transformation from one language to another. Thus given a specification S1 in viewpoint language L1 and specification S2 in viewpoint language L2, a transformation T can be applied to S1 resulting in a new specification T(S1) in viewpoint language L2 which can be compared directly to S2 to check, for example, for behavioral compatibility between allegedly equivalent objects or configurations of objects [RM-ODP, Part 3]
As Weaving ModelsPossible if correspondences are just mappings
53A. Vallecillo: "Assigning Meaning to Models"
Semantic Mappings as Model Transformations
TypesDomesticHorizontalVerticalAbstractingRefiningPruningForgetful…
54A. Vallecillo: "Assigning Meaning to Models"
The relationship between domains D and D’ is defined by a model transformation T:D->D’.
[[M]]D’ := [[T(M)]]D’
How do we analyse models?
Crossing the bridges!!!
55A. Vallecillo: "Assigning Meaning to Models"
Models to connect (analysis) tools!
Material Model ABB:
Continuum ABBs:
E
One D LinearElastic Model
T
G
e
t
material model
polar moment of inertia, J
radius, r
undeformed length, Lo
twist,
theta start, 1
theta end, 2
r1
12
r3
0L
r
J
rTr
torque, Tr
x
TT
G, r, , ,J
Lo
y
material model
temperature, T
reference temperature, To
force, F
area, A
undeformed length, Lo
total elongation,L
length, L
start, x1
end, x2
E
One D LinearElastic Model
(no shear)
T
e
t
r1
12 xxL
r2
oLLL
r4
A
F
edb.r1
oTTT
r3
L
L
x
FF
E, A,
LLo
T, ,
yL
Torsional Rod
Extensional Rod
temperature change,T
cte,
youngs modulus, E
stress,
shear modulus, G
poissons ratio,
shear stress, shear strain,
thermal strain, t
elastic strain, e
strain,
r2
r1)1(2
EG
r3
r4Tt
Ee
r5
G
te
1D Linear Elastic Model
material
effective length, Leff
linear elastic model
Lo
Extensional Rod(isothermal)
F
L
A
L
E
x2
x1
youngs modulus, E
cross section area, A
al1
al3
al2
linkage
mode: shaft tension
condition reaction
allowable stress
stress mos model
Margin of Safety(> case)
allowable
actual
MS
Analysis Templatesof Diverse Behavior & Fidelity
(CBAMs)MCAD Tools
Materials LibrariesIn-House, ...
FEAAnsys
Abaqus*
CATIA Elfini*
MSC Nastran*
MSC Patran*
NX Nastran*
...
General MathMathematica
Matlab*
MathCAD*
...
Analyzable Product Model(APM)
Extension
Torsion
1D
1D
Analysis Building Blocks(ABBs)
CATIA, NX,Pro/E*, ...
Analysis Solvers(via SMMs)
Design Tools
2D
flap_link
critical_section
critical_simple
t2f
wf
tw
hw
t1f
area
effective_length
critical_detailed
stress_strain_model linear_elastic
E
cte area
wf
tw
hw
tf
sleeve_1
b
h
t
b
h
t
sleeve_2
shaft
rib_1
material
rib_2
w
t
r
x
name
t2f
wf
tw
t1f
cross_section
w
t
r
x
R3
R2
R1
R8
R9
R10
6R
R7
R12
11R
1R
2
3
4
5
R
R
R
R
name
linear_elastic_model
wf
tw
tf
inter_axis_length
sleeve_2
shaft
material
linkage
sleeve_1
w
t
r
E
cross_section:basic
w
t
rL
ws1
ts1
rs2
ws2
ts2
rs2
wf
tw
tf
E
deformation model
x,max
ParameterizedFEA Model
stress mos model
Margin of Safety(> case)
allowable
actual
MS
ux mos model
Margin of Safety(> case)
allowable
actual
MS
mode: tensionux,max
Fcondition reaction
allowable inter axis length change
allowable stress
ts1
B
sleeve1
B ts2
ds2
ds1
sleeve2
L
shaft
Leff
s
rib1 rib2
material
effective length, Leff
deformation model
linear elastic model
Lo
Torsional Rod
G
J
r
2
1
shear modulus, G
cross section:effective ring polar moment of inertia, J
al1
al3
al2a
linkage
mode: shaft torsion
condition reactionT
outer radius, ro al2b
stress mos model
allowable stress
twist mos model
Margin of Safety(> case)
allowable
actual
MS
Margin of Safety(> case)
allowable
actual
MS
allowabletwist
Linkage Extensional Model
Linkage Plane Stress Model
Linkage Torsional Model* = Item not yet available in toolkit—all others have working examples 2007-04
Parts LibrariesIn-House*, ...
LegendTool AssociativityObject Re-use
[Borrowed from Russell Peak presentation at OMG, 2007]
56A. Vallecillo: "Assigning Meaning to Models"
Multiple views and coordinated DSLs
Each view is expressed in a given domain languageVocabularies of different corporations are differentHowever they allow talking about a common building
A. Vallecillo: "Assigning Meaning to Models" 57
Assigning Meanings to Models
(Using model transformations)
Our proposal
Describe the structure of Models/Metamodels with usual modeling notation and tools (Ecore, EMF, GMF, …)Describe the behavior of models using visual languages (including Time and QoS aspects) Specify the structure of models and metamodels using a formal system, i.e., a precise Semantic Domain (e.g., Maude)Specify the behavior of models using a formal system, i.e., in a Formal Semantic Domain (e.g., Maude)Define mappings between the visual and formal notations (the latter provides the meaning for the former)Make use of the analysis tools in the target domain to reason about the visual models
A. Vallecillo: "Assigning Meaning to Models" 59
A Production System Example
A. Vallecillo: "Assigning Meaning to Models" 60
Specifying dynamic behavior
Use of In-place Transformation Rules (e.g., graph transformations)Abstract and concrete syntaxes: Independent from the underlying semantic framework (e.g., Maude)
l:[NAC] x LHS → RHS
61A. Vallecillo: "Assigning Meaning to Models"
Adding time to behavioral specifications
Part of the e-Motions modeling notationRule durationPeriodicity, soft schedulingOngoing rulesAccess to the Global Time Elapse
Time stamps, scheduled actions
A. Vallecillo: "Assigning Meaning to Models" 62
Carry [5]
c t
p
c t
p xPos = t.xPosyPos = t.yPos
l:[NAC] x LHS → RHSt
Adding action executions
Specification of action properties Withouth the need of unnaturally modifying the metamodel
A. Vallecillo: "Assigning Meaning to Models" 63
Precise Semantics
Defined by a Semantic Mapping to Real-Time Maude
This makes models amenable to simulation and to formal analysis using the Real-Time toolkit!
Implementable (by a set of ATL model transformations)
64A. Vallecillo: "Assigning Meaning to Models"
(65)
ProductionSystem {< 'p : Plant | els : 'heg 'hag 'c1 'c2 't1 'a 'c3 't2 'u >< 'hag : HandleGen | in : null, out : 'c2, xPos : 1, yPos : 1 >< 'heg : HeadGen | in : null, out : 'c1, xPos : 1, yPos : 3 >< 'c1 : Conveyor | outParts : nil, out : 't1, xPos : 2, yPos : 3 >< 'c2 : Conveyor | outParts : nil, out : 't1, xPos : 2, yPos : 1 >< 't1 : Tray | parts : nil, capacity : 4, xPos : 3, yPos : 2 >< 'a : Assembler | in : 't1, out : 'c3, xPos : 4, yPos : 2 >< 'c3 : Conveyor | outParts : nil, out : 't2, xPos : 5, yPos : 2 >< 't2 : Tray | parts : nil, capacity : 4, xPos : 6, yPos : 2 >< 'u : User | parts : nil, xPos : 6, yPos : 3 >}
Representing Models with Maude
A. Vallecillo: "Assigning Meaning to Models"
(66)
op ProductionSystem : -> @Metamodel .
op PS : -> @Package .
sort PositionedEl .subsort PositionedEl < @Class .op PositionedEl : -> PositionedEl . op xPos : -> @Attribute . op yPos : -> @Attribue .
sort Container .subsort Container < PositionedEl .op Container : -> Container . op parts : -> @Reference .
sort Machine .subsort Machine < PositionedEl .op Machine : -> Machine . op in : -> @Reference . op out : -> @Reference .
…
Representing Metamodels with Maude
eq isAbstract(Machine) = true ....eq type(in) = Tray .eq lowerBound(in) = 0 .eq upperBound(in) = 1 ....eq type(out) = Conveyor .eq opposite(out) = null .eq lowerBound(out) = 1 .eq upperBound(out) = 1 .
A. Vallecillo: "Assigning Meaning to Models"
(67)
Representing Behavior with Maude
rl [Transfer] : ProductionSystem { < p : P:Part | xPos : XPOS, yPos : YPOS, SFS > < c : Conveyor | OutParts : (p PARTS), out : t, SFS’ > < t : Tray | xPos : XPOS’, yPos : YPOS’, parts : PARTS’, SFS’’ > OBJSET }=> ProductionSystem{ < p : P:Part | xPos : XPOS’, yPos : YPOS’,SFS > < c : Conveyor | outParts : PARTS, out : t, SFS’ > < t : Tray | xPos : XPOS’, yPos : YPOS’, parts : (p PARTS’), SFS’’ > OBJSET }.
A. Vallecillo: "Assigning Meaning to Models"
e-Motions
A. Vallecillo: "Assigning Meaning to Models" 68
http://atenea.lcc.uma.es/e-Motions
(69)
Model Simulation and Analysis
Simulation/Execution of specifications
Reachability AnalysisDeadlock
Invariants
Others
LTL Model checkingLiveness properties
search [10] initModel =>! ProductionSystem { < ’t2 : Tray | parts : empty, SFS > OBJSET } .
(trew initModel in time <= 20 .)
reduce modelCheck(initModel, [](exist(’he10) -> ~exist(’he10)) .
search initModel =>* ProductionSystem { < O : Tray | capacity : CAP, parts : PARTS, SFS > OBJSET }such that | PARTS | > CAP .
(mc {initModel} |=t [](ensembled(’he10.ha10) -> collected(’he10.ha10)) in time <= 100 .)
(find earliest {initModel} =>* {ProductionSystem {< T : ActionExec | rule : "Collect", value : null, SFS@T > OBJSET }} .)
A. Vallecillo: "Assigning Meaning to Models"
[Simulation 2009]
Adding NFPs to DSMLs
A. Vallecillo: "Assigning Meaning to Models" 70
Use of “observers”
Adding NFPs to DSMLs
A. Vallecillo: "Assigning Meaning to Models" 71
Adding NFPs to DSMLs
Observers capture the state of the NFPs and monitor their progress
A. Vallecillo: "Assigning Meaning to Models" 72
Making use of the Observers
The system can self-adapt under certain conditions
73A. Vallecillo: "Assigning Meaning to Models"
Making use of the Observers
With the new configuration, the system transmits sounds in a faster way
74A. Vallecillo: "Assigning Meaning to Models"
A more complex example
A. Vallecillo: "Assigning Meaning to Models" 75
[TAP 2011, http://atenea.lcc.uma.es/e-Motions]
A more complex example
A. Vallecillo: "Assigning Meaning to Models" 76
[TAP 2011, http://atenea.lcc.uma.es/e-Motions]
A. Vallecillo: "Assigning Meaning to Models" 77
Analysing the results
A. Vallecillo: "Assigning Meaning to Models" 78
http://atenea.lcc.uma.es/index.php/Main_Page/Resources/E-motions/PacketSwitchingExample/Results
Pros and Cons
AdvantagesAddition of observers independently of the systemSimple modelling of QoS propertiesAbility to monitor QoS propertiesResults obtained in easy-to-manipulate formatMore expressive than other notations (SPA, SPN, QNM,…)(generalized distributions, OCL expressiveness, dynamic topologies, action executions as 1st class citizens,…)
LimitationsEfficiency of simulationsDifficult to debugNot for every problem or domainMore expressive than other notations (SPA, SPN, QNM,…)(Difficulties for defining semantic bridges due to large gaps/chasms)
A. Vallecillo: "Assigning Meaning to Models" 79
We are not alone…
A. Vallecillo: "Assigning Meaning to Models" 80
[Pamela Zave, keynote talk at MODELS 2010]
Recap
One challenge for software engineers now is to provide end-users with Modeling Languages (and associated tools) that allow them to model their systems in a cheap, quick and useful way, and to analyse them using push-button approaches.
Current widely-used general-purpose modeling notations (especially behavioural and QoS) do not seem to be really up to the job
Integrating heterogeneous notations and their associated tools using model transformations seems to be one promising way to go
A. Vallecillo: "Assigning Meaning to Models" 81
Challenges
Definition of new languages for behaviouraldescriptions, which allow easy specificationof Quality Properties and their analysis
Improved languages for QoS specification
Semantic bridges to other domainsBetter connection with analysis tools
Improved traceability mechanisms Improve understandability of results
Better feedback to usersE.g., Performance anti-patterns (!)
A. Vallecillo: "Assigning Meaning to Models" 82