SlideShare a Scribd company logo
1 of 81
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 viewof 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 building 2: dialect British : copy, image 3: 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 made 5: an example for imitation or emulation 6: a person or thing that serves as a pattern for an artist ; especially : one who poses for an artist 7: archetype 8: an organism whose appearance a mimic imitates 9: one who is employed to display clothes or other merchandise 10 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: version 14: 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 DomainSpecificModel: A model written in a domain specific language DomainSpecificLanguage: 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 10 A. 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” 11 A. 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 12 A. Vallecillo:   "Assigning Meaning to Models" 2 10 Yourmeaninggoeshere…
Different models for the same concept 	10			X		1010 		0A 13 A. Vallecillo:   "Assigning Meaning to Models" 10 10 10 10
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]]BPMN [[M]]UML  A B Exclusive semantics Inclusive semantics C
A. Vallecillo:   "Assigning Meaning to Models" 16 [[M]] {{S}}  purport import S M
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 levels Communicate with stakeholders Understand the system If existing (legacy applications) Validate the model Detect errors and omissions in design ASAP   Mistakes are cheaper at this stage Prototype the system (execution of the model) Formal analysis of system properties Driveimplementation Code skeleton and templates, complete programs (?) A. Vallecillo:   "Assigning Meaning to Models" 17 Impossiblewithout precise meanings! [Bran Selic, 2003]
How do we assign meaning? How do we express the meaning of Structure? Behavior? Time-dependent functionality? QoS properties? … Which is the best notation for each of those aspects? It depends on the purposeof 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 viewsof 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 rulescan be included into the languageas constraints, disallowing the specification of illegal or incorrect models.
A. Vallecillo:   "Assigning Meaning to Models" 21 Anexample of a DSM The design for a conference application intended to run on a Symbian/S60 phone. [Borrowed from Juha-PekkaTolvanen, “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 novices Increasing 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 [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] [Thomas R.G. Green & Marian Petre]
“The impossible equation” USA (estimates for 2012): ,[object Object]
55M Spreadsheet & DB users
13M self-described as programmers
2.5M professional programmers[Source:US Bureau of LabourStatistics, 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 consumers They 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 generation Animation Simulation … 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 domain Close to the domain experts’ language Models must be:  Abstract, yet precise Executable (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.”    EdsgerDijkstra A. Vallecillo:   "Assigning Meaning to Models" 29
Current notations for modeling… A. Vallecillo:   "Assigning Meaning to Models" 30
Notations for describing systems must be normally are:  Simple and intuitiveComplex Close to the problem domainClose to the solution domain Close to the domain experts’ languageGeneral purpose Models must benormally are:  Abstract, yet preciseToo detailed, imprecise ExecutableNon-executable QoS notations must benormally are:  Simple and precise, yet expressiveToo complex and low level (more than needed for most end-user DSMLs)  Analysis results and feedback must benormally are: Understandable and easy to manageTough 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]
33 A. Vallecillo:   "Assigning Meaning to Models" Theresultingmodel
Each notation is more apt for a task 34 A. Vallecillo:   "Assigning Meaning to Models"     MCMLXVII +      DLXXIX     	       ???    1.967 +    579
Each notation is more apt for a task 35 A. Vallecillo:   "Assigning Meaning to Models"     MCMLXVII +      DLXXIX                ???    1.967 +    579    2.546
Each notation is more apt for a task 36 A. 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 = 12 y =   8 +  2x     = 24 x – y  = 4 x + y = 20 Solution: theolderis 12 and theyoungeris 8
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 38 A. 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 throne In 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: Structure Behavior Time-dependent functionality Quality properties (QoS,…) Which is the best notation for each of those aspects? It depends on the purposeof the model… …must have a precise meaning …and must allow the analysis of the models A. Vallecillo:   "Assigning Meaning to Models" 43
Visual DSMLs 44 A. Vallecillo:   "Assigning Meaning to Models"
Anatomy of a DSML (I) 45 A. Vallecillo:   "Assigning Meaning to Models"
Anatomy of a DSML (I) 46 A. Vallecillo:   "Assigning Meaning to Models"
Anatomy of a DSML (I) 47 A. Vallecillo:   "Assigning Meaning to Models"
We need more than syntax… Describe meaningful models At the appropriate level of abstraction In a correct, complete and accurate manner Using a notationnatural 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 machines Add Non-Functional Properties (Time, QoS,…) to DSLs Make models amenable to simulation Analyse models Connect DSLs to Analysis tools 48 A. Vallecillo:   "Assigning Meaning to Models"
Anatomy of a DSML (II)  49 A. Vallecillo:   "Assigning Meaning to Models"
Anatomy of a DSML (II)  50 A. Vallecillo:   "Assigning Meaning to Models"
The village metaphor 51 A. 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 semantics A set of (equivalent) notations A set of analysis tools Underlying logic Semantic Bridges connect Semantic Domains 52 A. Vallecillo:   "Assigning Meaning to Models" (vs. “meaningless” Models) The Prolog village The QNM village The Petri Net village The Coq village The Process Alg village The Maude village The Z village The Modellica village The B village …
Expressing semantic bridges As Model Transformations Possible if correspondences can be expressed as functions Pairwise 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 Models Possible if correspondences are just mappings 53 A. Vallecillo:   "Assigning Meaning to Models"
Semantic Mappings as Model Transformations Types Domestic Horizontal Vertical Abstracting Refining Pruning Forgetful … 54 A. 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!!! 55 A. Vallecillo:   "Assigning Meaning to Models"
Models to connect (analysis) tools! [Borrowedfrom Russell Peakpresentation at OMG, 2007] 56 A. Vallecillo:   "Assigning Meaning to Models"
Multipleviews and coordinatedDSLs Each view is expressed in a given domain language Vocabularies of different corporations are different However they allow talking about a common building A. Vallecillo:   "Assigning Meaning to Models" 57
AssigningMeaningstoModels (Usingmodeltransformations)
Ourproposal Describe thestructure of Models/Metamodelswithusualmodelingnotation and tools (Ecore, EMF, GMF, …) Describe thebehavior of modelsusingvisuallanguages (including Time and QoSaspects) Specifythestructure of models and metamodelsusing a formalsystem, i.e., a precise SemanticDomain (e.g., Maude) Specifythebehavior of modelsusing a formalsystem, i.e., in a Formal SemanticDomain (e.g., Maude) Define mappingsbetweenthevisual and formalnotations (thelatterprovidesthemeaningfortheformer) Make use of theanalysistoolsin the target domaintoreasonaboutthe 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 61 A. Vallecillo:   "Assigning Meaning to Models"
Addingtimetobehavioralspecifications Part of the e-Motions modeling notation Rule duration Periodicity, soft scheduling Ongoing rules Access to the Global Time Elapse Time stamps, scheduled actions A. Vallecillo:   "Assigning Meaning to Models" 62 Carry                    [5]   xPos = t.xPos yPos = t.yPos p p c t c t t l:[NAC] x LHS -> RHS
Addingactionexecutions 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) 64 A. 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 eqisAbstract(Machine) = true . ... eqtype(in) = Tray . eqlowerBound(in) = 0 . equpperBound(in) = 1 . ... eqtype(out) = Conveyor . eqopposite(out) = null . eqlowerBound(out) = 1 . equpperBound(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 Analysis Deadlock Invariants Others LTL Model checking Liveness properties  [Simulation 2009] (trew initModel in time <= 20 .) search [10] initModel =>!   ProductionSystem {     < ’t2 : Tray | parts : empty, SFS >     OBJSET } . search initModel =>*   ProductionSystem {     < O : Tray | capacity : CAP, parts : PARTS, SFS >     OBJSET } such that | PARTS | > CAP . (find earliest {initModel} =>* {ProductionSystem { < T : ActionExec | rule : "Collect", value : null, SFS@T > OBJSET }} .) (mc {initModel} |=t   [](ensembled(’he10.ha10) -> collected(’he10.ha10))  in time <= 100 .) reduce modelCheck(initModel,   [](exist(’he10) -> ~exist(’he10)) . A. Vallecillo:   "Assigning Meaning to Models"
AddingNFPstoDSMLs A. Vallecillo:   "Assigning Meaning to Models" 70
Use of “observers” AddingNFPstoDSMLs A. Vallecillo:   "Assigning Meaning to Models" 71
AddingNFPstoDSMLs Observers capture thestate of theNFPs and monitor theirprogress A. Vallecillo:   "Assigning Meaning to Models" 72
Making use of theObservers The system can self-adapt under certain conditions 73 A. Vallecillo:   "Assigning Meaning to Models"
Making use of the Observers With the new configuration, the system transmits sounds in a faster way 74 A. 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

More Related Content

Similar to Models And Meanings

Introduction to design patterns
Introduction to design patternsIntroduction to design patterns
Introduction to design patternsAmit Kabra
 
Cs 1023 lec 9 design pattern (week 2)
Cs 1023 lec 9 design pattern (week 2)Cs 1023 lec 9 design pattern (week 2)
Cs 1023 lec 9 design pattern (week 2)stanbridge
 
Perfectessay.net research paper sample #6 apa style
Perfectessay.net research paper sample #6 apa stylePerfectessay.net research paper sample #6 apa style
Perfectessay.net research paper sample #6 apa styleDavid Smith
 
Chapter 8 design representations
Chapter 8 design representationsChapter 8 design representations
Chapter 8 design representationsgrainne
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manualPraseela R
 
Introduction to Object orientation , Modeling as a Design Technique Modeling ...
Introduction to Object orientation , Modeling as a Design Technique Modeling ...Introduction to Object orientation , Modeling as a Design Technique Modeling ...
Introduction to Object orientation , Modeling as a Design Technique Modeling ...DhwaniDesai21
 
Model / Framework
 Model / Framework Model / Framework
Model / FrameworkBugs A Talip
 
The relevance of models in communication research
The relevance of models in communication researchThe relevance of models in communication research
The relevance of models in communication researchKenneth James
 
Uml unified-modeling-language-presented by dileep
Uml unified-modeling-language-presented by dileepUml unified-modeling-language-presented by dileep
Uml unified-modeling-language-presented by dileepmekhap
 
Software Engineering: Models
Software Engineering: ModelsSoftware Engineering: Models
Software Engineering: ModelsDavid Millard
 
Key note frame_model
Key note frame_modelKey note frame_model
Key note frame_modelBugs A Talip
 
Chapter 8 design representations
Chapter 8 design representationsChapter 8 design representations
Chapter 8 design representationsGrainne Conole
 
Diagramming the Class Diagram: Toward a Unified Modeling Methodology
Diagramming the Class Diagram: Toward a Unified Modeling Methodology Diagramming the Class Diagram: Toward a Unified Modeling Methodology
Diagramming the Class Diagram: Toward a Unified Modeling Methodology IJCSIS Research Publications
 
Wondeland Of Modelling
Wondeland Of ModellingWondeland Of Modelling
Wondeland Of ModellingKaniska Mandal
 
A NATURAL LANGUAGE REQUIREMENTS ENGINEERING APPROACH FOR MDA
A NATURAL LANGUAGE REQUIREMENTS ENGINEERING APPROACH FOR MDA A NATURAL LANGUAGE REQUIREMENTS ENGINEERING APPROACH FOR MDA
A NATURAL LANGUAGE REQUIREMENTS ENGINEERING APPROACH FOR MDA IJCSEA Journal
 
A Natural Language Requirements Engineering Approach for MDA
A Natural Language Requirements Engineering Approach for MDAA Natural Language Requirements Engineering Approach for MDA
A Natural Language Requirements Engineering Approach for MDAIJCSEA Journal
 

Similar to Models And Meanings (20)

Introduction to design patterns
Introduction to design patternsIntroduction to design patterns
Introduction to design patterns
 
Mca 504 dotnet_unit4
Mca 504 dotnet_unit4Mca 504 dotnet_unit4
Mca 504 dotnet_unit4
 
Cs 1023 lec 9 design pattern (week 2)
Cs 1023 lec 9 design pattern (week 2)Cs 1023 lec 9 design pattern (week 2)
Cs 1023 lec 9 design pattern (week 2)
 
Perfectessay.net research paper sample #6 apa style
Perfectessay.net research paper sample #6 apa stylePerfectessay.net research paper sample #6 apa style
Perfectessay.net research paper sample #6 apa style
 
Chapter 8 design representations
Chapter 8 design representationsChapter 8 design representations
Chapter 8 design representations
 
Sda 7
Sda   7Sda   7
Sda 7
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
 
Introduction to Object orientation , Modeling as a Design Technique Modeling ...
Introduction to Object orientation , Modeling as a Design Technique Modeling ...Introduction to Object orientation , Modeling as a Design Technique Modeling ...
Introduction to Object orientation , Modeling as a Design Technique Modeling ...
 
Model / Framework
 Model / Framework Model / Framework
Model / Framework
 
The relevance of models in communication research
The relevance of models in communication researchThe relevance of models in communication research
The relevance of models in communication research
 
Uml unified-modeling-language-presented by dileep
Uml unified-modeling-language-presented by dileepUml unified-modeling-language-presented by dileep
Uml unified-modeling-language-presented by dileep
 
Software Engineering: Models
Software Engineering: ModelsSoftware Engineering: Models
Software Engineering: Models
 
Key note frame_model
Key note frame_modelKey note frame_model
Key note frame_model
 
Elaboration
ElaborationElaboration
Elaboration
 
Chapter 8 design representations
Chapter 8 design representationsChapter 8 design representations
Chapter 8 design representations
 
Diagramming the Class Diagram: Toward a Unified Modeling Methodology
Diagramming the Class Diagram: Toward a Unified Modeling Methodology Diagramming the Class Diagram: Toward a Unified Modeling Methodology
Diagramming the Class Diagram: Toward a Unified Modeling Methodology
 
Wondeland Of Modelling
Wondeland Of ModellingWondeland Of Modelling
Wondeland Of Modelling
 
Ooa 1 Post
Ooa 1 PostOoa 1 Post
Ooa 1 Post
 
A NATURAL LANGUAGE REQUIREMENTS ENGINEERING APPROACH FOR MDA
A NATURAL LANGUAGE REQUIREMENTS ENGINEERING APPROACH FOR MDA A NATURAL LANGUAGE REQUIREMENTS ENGINEERING APPROACH FOR MDA
A NATURAL LANGUAGE REQUIREMENTS ENGINEERING APPROACH FOR MDA
 
A Natural Language Requirements Engineering Approach for MDA
A Natural Language Requirements Engineering Approach for MDAA Natural Language Requirements Engineering Approach for MDA
A Natural Language Requirements Engineering Approach for MDA
 

More from Antonio Vallecillo

Modeling Objects with Uncertain Behaviors
Modeling Objects with Uncertain BehaviorsModeling Objects with Uncertain Behaviors
Modeling Objects with Uncertain BehaviorsAntonio Vallecillo
 
Introducing Subjective Knowledge Graphs
Introducing Subjective Knowledge GraphsIntroducing Subjective Knowledge Graphs
Introducing Subjective Knowledge GraphsAntonio Vallecillo
 
Using UML and OCL Models to realize High-Level Digital Twins
Using UML and OCL Models to realize High-Level Digital TwinsUsing UML and OCL Models to realize High-Level Digital Twins
Using UML and OCL Models to realize High-Level Digital TwinsAntonio Vallecillo
 
Modeling behavioral deontic constraints using UML and OCL
Modeling behavioral deontic constraints using UML and OCLModeling behavioral deontic constraints using UML and OCL
Modeling behavioral deontic constraints using UML and OCLAntonio Vallecillo
 
Modeling and Evaluating Quality in the Presence of Uncertainty
Modeling and Evaluating Quality in the Presence of UncertaintyModeling and Evaluating Quality in the Presence of Uncertainty
Modeling and Evaluating Quality in the Presence of UncertaintyAntonio Vallecillo
 
Research Evaluation - The current situation in Spain
Research Evaluation - The current situation in SpainResearch Evaluation - The current situation in Spain
Research Evaluation - The current situation in SpainAntonio Vallecillo
 
Belief Uncertainty in Software Models
Belief Uncertainty in Software ModelsBelief Uncertainty in Software Models
Belief Uncertainty in Software ModelsAntonio Vallecillo
 
Adding Random Operations to OCL
Adding Random Operations to OCLAdding Random Operations to OCL
Adding Random Operations to OCLAntonio Vallecillo
 
Extending Complex Event Processing to Graph-structured Information
Extending Complex Event Processing to Graph-structured InformationExtending Complex Event Processing to Graph-structured Information
Extending Complex Event Processing to Graph-structured InformationAntonio Vallecillo
 
Towards a Body of Knowledge for Model-Based Software Engineering
Towards a Body of Knowledge for Model-Based Software EngineeringTowards a Body of Knowledge for Model-Based Software Engineering
Towards a Body of Knowledge for Model-Based Software EngineeringAntonio Vallecillo
 
La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...
La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...
La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...Antonio Vallecillo
 
Improving Naming and Grouping in UML
Improving Naming and Grouping in UMLImproving Naming and Grouping in UML
Improving Naming and Grouping in UMLAntonio Vallecillo
 

More from Antonio Vallecillo (12)

Modeling Objects with Uncertain Behaviors
Modeling Objects with Uncertain BehaviorsModeling Objects with Uncertain Behaviors
Modeling Objects with Uncertain Behaviors
 
Introducing Subjective Knowledge Graphs
Introducing Subjective Knowledge GraphsIntroducing Subjective Knowledge Graphs
Introducing Subjective Knowledge Graphs
 
Using UML and OCL Models to realize High-Level Digital Twins
Using UML and OCL Models to realize High-Level Digital TwinsUsing UML and OCL Models to realize High-Level Digital Twins
Using UML and OCL Models to realize High-Level Digital Twins
 
Modeling behavioral deontic constraints using UML and OCL
Modeling behavioral deontic constraints using UML and OCLModeling behavioral deontic constraints using UML and OCL
Modeling behavioral deontic constraints using UML and OCL
 
Modeling and Evaluating Quality in the Presence of Uncertainty
Modeling and Evaluating Quality in the Presence of UncertaintyModeling and Evaluating Quality in the Presence of Uncertainty
Modeling and Evaluating Quality in the Presence of Uncertainty
 
Research Evaluation - The current situation in Spain
Research Evaluation - The current situation in SpainResearch Evaluation - The current situation in Spain
Research Evaluation - The current situation in Spain
 
Belief Uncertainty in Software Models
Belief Uncertainty in Software ModelsBelief Uncertainty in Software Models
Belief Uncertainty in Software Models
 
Adding Random Operations to OCL
Adding Random Operations to OCLAdding Random Operations to OCL
Adding Random Operations to OCL
 
Extending Complex Event Processing to Graph-structured Information
Extending Complex Event Processing to Graph-structured InformationExtending Complex Event Processing to Graph-structured Information
Extending Complex Event Processing to Graph-structured Information
 
Towards a Body of Knowledge for Model-Based Software Engineering
Towards a Body of Knowledge for Model-Based Software EngineeringTowards a Body of Knowledge for Model-Based Software Engineering
Towards a Body of Knowledge for Model-Based Software Engineering
 
La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...
La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...
La Ingeniería Informática no es una Ciencia -- Reflexiones sobre la Educación...
 
Improving Naming and Grouping in UML
Improving Naming and Grouping in UMLImproving Naming and Grouping in UML
Improving Naming and Grouping in UML
 

Models And Meanings

  • 1. Assigning Meanings to Models (Using Model Transformations) Antonio Vallecillo [Francisco Durán, José E. Rivera, J. Troya] Atenea Research Group Málaga, 2011
  • 2. 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
  • 3. A. Vallecillo: "Assigning Meaning to Models" 3
  • 4. Models A. Vallecillo: "Assigning Meaning to Models" 4
  • 5. 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 viewof 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
  • 6. Model 1: obsolete : a set of plans for a building 2: dialect British : copy, image 3: 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 made 5: an example for imitation or emulation 6: a person or thing that serves as a pattern for an artist ; especially : one who poses for an artist 7: archetype 8: an organism whose appearance a mimic imitates 9: one who is employed to display clothes or other merchandise 10 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: version 14: animal model A. Vallecillo: "Assigning Meaning to Models" 6 http://www.merriam-webster.com/dictionary/model
  • 7. 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 DomainSpecificModel: A model written in a domain specific language DomainSpecificLanguage: 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
  • 8. 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
  • 9. 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
  • 10. The Meaning of Models “ There are only 10 types of people in the world: Those who understand binary, and those who don't 10 A. Vallecillo: "Assigning Meaning to Models"
  • 11. Sure? “There are only 10 types of people in the world: Those who understand binary, and those who don't” 11 A. Vallecillo: "Assigning Meaning to Models"
  • 12. Same model for different concepts “ There are only 10 types of people in the world: Those who understand binary, and those who don't 12 A. Vallecillo: "Assigning Meaning to Models" 2 10 Yourmeaninggoeshere…
  • 13. Different models for the same concept 10 X 1010 0A 13 A. Vallecillo: "Assigning Meaning to Models" 10 10 10 10
  • 14. What does this model mean? A. Vallecillo: "Assigning Meaning to Models" 14
  • 15. What does this model means? A. Vallecillo: "Assigning Meaning to Models" 15 [[M]]BPMN [[M]]UML  A B Exclusive semantics Inclusive semantics C
  • 16. A. Vallecillo: "Assigning Meaning to Models" 16 [[M]] {{S}}  purport import S M
  • 17. 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 levels Communicate with stakeholders Understand the system If existing (legacy applications) Validate the model Detect errors and omissions in design ASAP Mistakes are cheaper at this stage Prototype the system (execution of the model) Formal analysis of system properties Driveimplementation Code skeleton and templates, complete programs (?) A. Vallecillo: "Assigning Meaning to Models" 17 Impossiblewithout precise meanings! [Bran Selic, 2003]
  • 18. How do we assign meaning? How do we express the meaning of Structure? Behavior? Time-dependent functionality? QoS properties? … Which is the best notation for each of those aspects? It depends on the purposeof the model… …and must have a precise meaning A. Vallecillo: "Assigning Meaning to Models" 18
  • 20. A. Vallecillo: "Assigning Meaning to Models" 20 Domain Specific Modeling Languages (DSML) Languages for representing different viewsof 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 rulescan be included into the languageas constraints, disallowing the specification of illegal or incorrect models.
  • 21. A. Vallecillo: "Assigning Meaning to Models" 21 Anexample of a DSM The design for a conference application intended to run on a Symbian/S60 phone. [Borrowed from Juha-PekkaTolvanen, “Domain-specific Modeling: Making Code Generation Complete” http://www.devx.com.]
  • 22. Visual DSMLs VDSMLs tend to offer substantial gains over conventional textual languages Formal studies show significant benefits for novices Increasing 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 [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] [Thomas R.G. Green & Marian Petre]
  • 23.
  • 24. 55M Spreadsheet & DB users
  • 25. 13M self-described as programmers
  • 26. 2.5M professional programmers[Source:US Bureau of LabourStatistics, 2006] A. Vallecillo: "Assigning Meaning to Models" 23 [J. Bezivin, Keynote at JISBD 2009]
  • 27. End-user Programming[Modeling] Most software creators are not software professionals End users are participants and developers, not passive consumers They 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
  • 28. End-user (Visual) Modeling A. Vallecillo: "Assigning Meaning to Models" 25
  • 29. Production systems A. Vallecillo: "Assigning Meaning to Models" 26
  • 30. 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 generation Animation Simulation … 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
  • 31. Requirements for PA of DSM Notations for describing systems must be: Simple and intuitive Close to the problem domain Close to the domain experts’ language Models must be: Abstract, yet precise Executable (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
  • 32. “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.” EdsgerDijkstra A. Vallecillo: "Assigning Meaning to Models" 29
  • 33. Current notations for modeling… A. Vallecillo: "Assigning Meaning to Models" 30
  • 34. Notations for describing systems must be normally are: Simple and intuitiveComplex Close to the problem domainClose to the solution domain Close to the domain experts’ languageGeneral purpose Models must benormally are: Abstract, yet preciseToo detailed, imprecise ExecutableNon-executable QoS notations must benormally are: Simple and precise, yet expressiveToo complex and low level (more than needed for most end-user DSMLs) Analysis results and feedback must benormally are: Understandable and easy to manageTough to deal with! Current notations for DSMs A. Vallecillo: "Assigning Meaning to Models" 31
  • 35. “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]
  • 36. 33 A. Vallecillo: "Assigning Meaning to Models" Theresultingmodel
  • 37. Each notation is more apt for a task 34 A. Vallecillo: "Assigning Meaning to Models" MCMLXVII + DLXXIX ??? 1.967 + 579
  • 38. Each notation is more apt for a task 35 A. Vallecillo: "Assigning Meaning to Models" MCMLXVII + DLXXIX ??? 1.967 + 579 2.546
  • 39. Each notation is more apt for a task 36 A. Vallecillo: "Assigning Meaning to Models" MCMLXVII + DLXXIX MMDXLVI 1.967 + 579 2.546 
  • 40. 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 = 12 y = 8 + 2x = 24 x – y = 4 x + y = 20 Solution: theolderis 12 and theyoungeris 8
  • 41. 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 38 A. Vallecillo: "Assigning Meaning to Models"
  • 42. Our current software modeling notations A. Vallecillo: "Assigning Meaning to Models" 39
  • 44. 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 throne In 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
  • 45. 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
  • 46. How can we specify DSMs? How do we express in a precise and abstract manner: Structure Behavior Time-dependent functionality Quality properties (QoS,…) Which is the best notation for each of those aspects? It depends on the purposeof the model… …must have a precise meaning …and must allow the analysis of the models A. Vallecillo: "Assigning Meaning to Models" 43
  • 47. Visual DSMLs 44 A. Vallecillo: "Assigning Meaning to Models"
  • 48. Anatomy of a DSML (I) 45 A. Vallecillo: "Assigning Meaning to Models"
  • 49. Anatomy of a DSML (I) 46 A. Vallecillo: "Assigning Meaning to Models"
  • 50. Anatomy of a DSML (I) 47 A. Vallecillo: "Assigning Meaning to Models"
  • 51. We need more than syntax… Describe meaningful models At the appropriate level of abstraction In a correct, complete and accurate manner Using a notationnatural 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 machines Add Non-Functional Properties (Time, QoS,…) to DSLs Make models amenable to simulation Analyse models Connect DSLs to Analysis tools 48 A. Vallecillo: "Assigning Meaning to Models"
  • 52. Anatomy of a DSML (II) 49 A. Vallecillo: "Assigning Meaning to Models"
  • 53. Anatomy of a DSML (II) 50 A. Vallecillo: "Assigning Meaning to Models"
  • 54. The village metaphor 51 A. Vallecillo: "Assigning Meaning to Models"
  • 55. 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 semantics A set of (equivalent) notations A set of analysis tools Underlying logic Semantic Bridges connect Semantic Domains 52 A. Vallecillo: "Assigning Meaning to Models" (vs. “meaningless” Models) The Prolog village The QNM village The Petri Net village The Coq village The Process Alg village The Maude village The Z village The Modellica village The B village …
  • 56. Expressing semantic bridges As Model Transformations Possible if correspondences can be expressed as functions Pairwise 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 Models Possible if correspondences are just mappings 53 A. Vallecillo: "Assigning Meaning to Models"
  • 57. Semantic Mappings as Model Transformations Types Domestic Horizontal Vertical Abstracting Refining Pruning Forgetful … 54 A. 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’
  • 58. How do we analyse models? Crossing the bridges!!! 55 A. Vallecillo: "Assigning Meaning to Models"
  • 59. Models to connect (analysis) tools! [Borrowedfrom Russell Peakpresentation at OMG, 2007] 56 A. Vallecillo: "Assigning Meaning to Models"
  • 60. Multipleviews and coordinatedDSLs Each view is expressed in a given domain language Vocabularies of different corporations are different However they allow talking about a common building A. Vallecillo: "Assigning Meaning to Models" 57
  • 62. Ourproposal Describe thestructure of Models/Metamodelswithusualmodelingnotation and tools (Ecore, EMF, GMF, …) Describe thebehavior of modelsusingvisuallanguages (including Time and QoSaspects) Specifythestructure of models and metamodelsusing a formalsystem, i.e., a precise SemanticDomain (e.g., Maude) Specifythebehavior of modelsusing a formalsystem, i.e., in a Formal SemanticDomain (e.g., Maude) Define mappingsbetweenthevisual and formalnotations (thelatterprovidesthemeaningfortheformer) Make use of theanalysistoolsin the target domaintoreasonaboutthe visual models A. Vallecillo: "Assigning Meaning to Models" 59
  • 63. A Production System Example A. Vallecillo: "Assigning Meaning to Models" 60
  • 64. 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 61 A. Vallecillo: "Assigning Meaning to Models"
  • 65. Addingtimetobehavioralspecifications Part of the e-Motions modeling notation Rule duration Periodicity, soft scheduling Ongoing rules Access to the Global Time Elapse Time stamps, scheduled actions A. Vallecillo: "Assigning Meaning to Models" 62 Carry [5] xPos = t.xPos yPos = t.yPos p p c t c t t l:[NAC] x LHS -> RHS
  • 66. Addingactionexecutions Specification of action properties Withouth the need of unnaturally modifying the metamodel A. Vallecillo: "Assigning Meaning to Models" 63
  • 67. 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) 64 A. Vallecillo: "Assigning Meaning to Models"
  • 68. (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"
  • 69. (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 eqisAbstract(Machine) = true . ... eqtype(in) = Tray . eqlowerBound(in) = 0 . equpperBound(in) = 1 . ... eqtype(out) = Conveyor . eqopposite(out) = null . eqlowerBound(out) = 1 . equpperBound(out) = 1 . A. Vallecillo: "Assigning Meaning to Models"
  • 70. (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"
  • 71. e-Motions A. Vallecillo: "Assigning Meaning to Models" 68 http://atenea.lcc.uma.es/e-Motions
  • 72. (69) Model Simulation and Analysis Simulation/Execution of specifications Reachability Analysis Deadlock Invariants Others LTL Model checking Liveness properties [Simulation 2009] (trew initModel in time <= 20 .) search [10] initModel =>! ProductionSystem { < ’t2 : Tray | parts : empty, SFS > OBJSET } . search initModel =>* ProductionSystem { < O : Tray | capacity : CAP, parts : PARTS, SFS > OBJSET } such that | PARTS | > CAP . (find earliest {initModel} =>* {ProductionSystem { < T : ActionExec | rule : "Collect", value : null, SFS@T > OBJSET }} .) (mc {initModel} |=t [](ensembled(’he10.ha10) -> collected(’he10.ha10)) in time <= 100 .) reduce modelCheck(initModel, [](exist(’he10) -> ~exist(’he10)) . A. Vallecillo: "Assigning Meaning to Models"
  • 73. AddingNFPstoDSMLs A. Vallecillo: "Assigning Meaning to Models" 70
  • 74. Use of “observers” AddingNFPstoDSMLs A. Vallecillo: "Assigning Meaning to Models" 71
  • 75. AddingNFPstoDSMLs Observers capture thestate of theNFPs and monitor theirprogress A. Vallecillo: "Assigning Meaning to Models" 72
  • 76. Making use of theObservers The system can self-adapt under certain conditions 73 A. Vallecillo: "Assigning Meaning to Models"
  • 77. Making use of the Observers With the new configuration, the system transmits sounds in a faster way 74 A. Vallecillo: "Assigning Meaning to Models"
  • 78. A more complex example A. Vallecillo: "Assigning Meaning to Models" 75 [TAP 2011, http://atenea.lcc.uma.es/e-Motions]
  • 79. A more complex example A. Vallecillo: "Assigning Meaning to Models" 76 [TAP 2011, http://atenea.lcc.uma.es/e-Motions]
  • 80. A. Vallecillo: "Assigning Meaning to Models" 77
  • 81. Analysing the results A. Vallecillo: "Assigning Meaning to Models" 78 http://atenea.lcc.uma.es/index.php/Main_Page/Resources/E-motions/PacketSwitchingExample/Results
  • 82. Pros and Cons Advantages Addition of observers independently of the system Simple modelling of QoS properties Ability to monitor QoS properties Results obtained in easy-to-manipulate format More expressive than other notations (SPA, SPN, QNM,…)(generalized distributions, OCL expressiveness, dynamic topologies, action executions as 1st class citizens,…) Limitations Efficiency of simulations Difficult to debug Not for every problem or domain More expressive than other notations (SPA, SPN, QNM,…)(Difficulties for defining semantic bridges due to large gaps/chasms) A. Vallecillo: "Assigning Meaning to Models" 79
  • 83. We are not alone… A. Vallecillo: "Assigning Meaning to Models" 80 [Pamela Zave, keynote talk at MODELS 2010]
  • 84. 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
  • 85. 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 domains Better connection with analysis tools Improved traceability mechanisms Improve understandability of results Better feedback to users E.g., Performance anti-patterns (!) A. Vallecillo: "Assigning Meaning to Models" 82