Models And Meanings

479 views

Published on

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.

  • Be the first to comment

  • Be the first to like this

Models And Meanings

  1. 1. Assigning Meanings to Models (Using Model Transformations)<br />Antonio Vallecillo<br />[Francisco Durán, José E. Rivera, J. Troya]<br />Atenea Research Group<br />Málaga, 2011<br />
  2. 2. Assigning meanings to Models<br /> … 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.<br />[Jean Bézivin, “On the Unification Power of Models”, 2005]<br />A. Vallecillo: "Assigning Meaning to Models"<br />2<br />
  3. 3. A. Vallecillo: "Assigning Meaning to Models"<br />3<br />
  4. 4. Models<br />A. Vallecillo: "Assigning Meaning to Models"<br />4<br />
  5. 5. Model<br />“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)]<br />"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)]<br />"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)]<br />"A description of (part of) a system written in a well-defined language."(NOTE: Equivalent to specification.) [Kleppe, 2003]<br />"A representation of a part of the function, structure and/or behavior of a system” [Model Driven Architecture (MDA) ormsc/2001-07-01]<br />"A set of statements about the system.“ (Statement: expression about the system that can be true or false.) [Seidewitz, 2003] <br />"M is a model of S if M can be used to answer questions about S" [D.T. Ross and M. Minsky, 1960]<br />A. Vallecillo: "Assigning Meaning to Models"<br />5<br />Model ~ Description<br />
  6. 6. Model<br />1: obsolete : a set of plans for a building<br />2: dialect British : copy, image<br />3: structural design <a home on the model of an old farmhouse><br />4: a usually miniature representation of something ; also : a pattern of something to be made<br />5: an example for imitation or emulation<br />6: a person or thing that serves as a pattern for an artist ; especially : one who poses for an artist<br />7: archetype<br />8: an organism whose appearance a mimic imitates<br />9: one who is employed to display clothes or other merchandise<br />10 a: a type or design of clothing b: a type or design of product (as a car)<br />11: a description or analogy used to help visualize something (as an atom) that cannot be directly observed<br />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><br />13: version<br />14: animal model <br />A. Vallecillo: "Assigning Meaning to Models"<br />6<br />http://www.merriam-webster.com/dictionary/model<br />
  7. 7. Some definitions<br />Model (of a <X>): A representation or specification of a <X> from a given point of view and with a particular purpose<br />Prototype model: A functional model of a <X>, where the emphasis in on testing – e.g., to verify the design<br />DomainSpecificModel: A model written in a domain specific language<br />DomainSpecificLanguage: A language which offers concepts and notations closer to the domain experts, at an appropriate level of abstraction, and with a particular purpose <br />Model Transformation: An algorithmic specification (declarative or operational) of the relationship between models<br />A. Vallecillo: "Assigning Meaning to Models"<br />7<br />
  8. 8. Meaning<br />1 a: the thing one intends to convey especially by language: purport <br />1 b: the thing that is conveyed especially by language: import<br />2: something meant or intended: aim<a mischievous meaning was apparent><br />3: significant quality; especially: implication of a hidden or special significance <a glance full of meaning><br />4 a: the logical connotation of a word or phrase <br />4 b: the logical denotation or extension of a word or phrase<br />A. Vallecillo: "Assigning Meaning to Models"<br />8<br />http://www.merriam-webster.com/dictionary/meaning<br />
  9. 9. Semantics<br />1: the study of meanings [Merrian-Webster]<br />a: the historical and psychological study and the classification of changes in the signification of words or forms viewed as factors in linguistic development <br /> 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<br />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]<br />A. Vallecillo: "Assigning Meaning to Models"<br />9<br />
  10. 10. The Meaning of Models<br /> “ There are only 10 types of people in the world: Those who understand binary, and those who don't<br />10<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  11. 11. Sure?<br /> “There are only 10 types of people in the world: Those who understand binary, and those who don't”<br />11<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  12. 12. Same model for different concepts<br /> “ There are only 10 types of people in the world: Those who understand binary, and those who don't<br />12<br />A. Vallecillo: "Assigning Meaning to Models"<br />2<br />10<br />Yourmeaninggoeshere…<br />
  13. 13. Different models for the same concept<br /> 10 X 1010 0A<br />13<br />A. Vallecillo: "Assigning Meaning to Models"<br />10<br />10<br />10<br />10<br />
  14. 14. What does this model mean?<br />A. Vallecillo: "Assigning Meaning to Models"<br />14<br />
  15. 15. What does this model means?<br />A. Vallecillo: "Assigning Meaning to Models"<br />15<br />[[M]]BPMN<br />[[M]]UML<br /><br />A<br />B<br />Exclusive<br />semantics<br />Inclusive<br />semantics<br />C<br />
  16. 16. A. Vallecillo: "Assigning Meaning to Models"<br />16<br />[[M]]<br />{{S}}<br /><br />purport<br />import<br />S<br />M <br />
  17. 17. Why do I need to assign meanings to models?<br />What do I need models for?<br />Describe the system<br />Structure, behaviour, ...<br />Separate concepts at different conceptual levels<br />Communicate with stakeholders<br />Understand the system<br />If existing (legacy applications)<br />Validate the model<br />Detect errors and omissions in design ASAP <br />Mistakes are cheaper at this stage<br />Prototype the system (execution of the model)<br />Formal analysis of system properties<br />Driveimplementation<br />Code skeleton and templates, complete programs (?)<br />A. Vallecillo: "Assigning Meaning to Models"<br />17<br />Impossiblewithout<br />precise meanings!<br />[Bran Selic, 2003]<br />
  18. 18. How do we assign meaning?<br />How do we express the meaning of<br />Structure?<br />Behavior?<br />Time-dependent functionality?<br />QoS properties?<br />…<br />Which is the best notation for each of those aspects?<br />It depends on the purposeof the model…<br />…and must have a precise meaning<br />A. Vallecillo: "Assigning Meaning to Models"<br />18<br />
  19. 19. Domain Specific Modeling Languages<br />
  20. 20. A. Vallecillo: "Assigning Meaning to Models"<br />20<br />Domain Specific Modeling Languages (DSML)<br />Languages for representing different viewsof a system in terms of models<br />Higher-level abstraction than general purpose languages<br />Closer to the problem domain than to the implementation domain<br />Closer to the domain experts, allowing modelers to perceive themselves as working directly with domain concepts<br />Domain rulescan be included into the languageas constraints, disallowing the specification of illegal or incorrect models.<br />
  21. 21. A. Vallecillo: "Assigning Meaning to Models"<br />21<br />Anexample of a DSM<br />The design for a conference application intended to run on a Symbian/S60 phone.<br />[Borrowed from<br />Juha-PekkaTolvanen, “Domain-specific Modeling: Making Code Generation Complete”<br />http://www.devx.com.]<br />
  22. 22. Visual DSMLs<br />VDSMLs tend to offer substantial gains over conventional textual languages<br />Formal studies show significant benefits for novices<br />Increasing number of VDSMLs being defined<br />But not a panacea: every notation has advantages and disadvantages <br />[Not the subject of this talk]<br />A. Vallecillo: "Assigning Meaning to Models"<br />22<br />[T. Green, M. Petre “Usability Analysis of Visual Programming Environments: a ‘cognitive dimensions’ framework” JVLC, 1996]<br />[Kirsten whitley “Visual programming languages and the empirical evidence for and against”, JVLC 1997]<br />[R. Navarro-Prieto, J. Cañas “Are visual programming languages better? The role of imagery in program comprehension”, IJHCS 2001]<br />[Thomas R.G. Green & Marian Petre]<br />
  23. 23. “The impossible equation”<br />USA (estimates for 2012):<br /><ul><li>90M computer users
  24. 24. 55M Spreadsheet & DB users
  25. 25. 13M self-described as programmers
  26. 26. 2.5M professional programmers</li></ul>[Source:US Bureau of LabourStatistics, 2006]<br />A. Vallecillo: "Assigning Meaning to Models"<br />23<br />[J. Bezivin, Keynote at JISBD 2009]<br />
  27. 27. End-user Programming[Modeling]<br />Most software creators are not software professionals<br />End users are participants and developers, not passive consumers<br />They do not reason about software like professionals<br />[Mary Shaw, The Challenge of Pervasive Software to the Conventional Wisdom of Software Engineering, ESEC-FSE09]<br />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. <br />[Bonnie A. Nardi, A Small Matter of Programming. MIT Press, 1993]<br />A. Vallecillo: "Assigning Meaning to Models"<br />24<br />
  28. 28. End-user (Visual) Modeling<br />A. Vallecillo: "Assigning Meaning to Models"<br />25<br />
  29. 29. Production systems<br />A. Vallecillo: "Assigning Meaning to Models"<br />26<br />
  30. 30. DSMLs are starting to proliferate<br />They allow users to model their systems at an appropriate level of abstraction<br />Some of them allow more than “documentation”<br />Code generation<br />Animation<br />Simulation<br />…<br />Very few allow specification and analysis of the Quality Properties (NFPs) of modeled systems<br />QoS usage and management constraints: performance, reliability, resource consumption and allocation, etc. <br />A. Vallecillo: "Assigning Meaning to Models"<br />27<br />
  31. 31. Requirements for PA of DSM<br />Notations for describing systems must be: <br />Simple and intuitive <br />Close to the problem domain<br />Close to the domain experts’ language<br />Models must be: <br />Abstract, yet precise<br />Executable (to, at least, prototype systems)<br />QoS notations must be:<br />Simple and precise, yet expressive<br />Analysis results and feedback must be:<br />Understandable and easy to manage<br />A. Vallecillo: "Assigning Meaning to Models"<br />28<br />
  32. 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.” <br />EdsgerDijkstra<br />A. Vallecillo: "Assigning Meaning to Models"<br />29<br />
  33. 33. Current notations for modeling…<br />A. Vallecillo: "Assigning Meaning to Models"<br />30<br />
  34. 34. Notations for describing systems must be normally are: <br />Simple and intuitiveComplex<br />Close to the problem domainClose to the solution domain<br />Close to the domain experts’ languageGeneral purpose<br />Models must benormally are: <br />Abstract, yet preciseToo detailed, imprecise<br />ExecutableNon-executable<br />QoS notations must benormally are: <br />Simple and precise, yet expressiveToo complex and low level (more than needed for most end-user DSMLs) <br />Analysis results and feedback must benormally are:<br />Understandable and easy to manageTough to deal with!<br />Current notations for DSMs<br />A. Vallecillo: "Assigning Meaning to Models"<br />31<br />
  35. 35. “Close to the problem domain”<br />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.”<br />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.<br />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.<br />She was quite impressed about the level of detail of the UML model and the narrow correspondence between the code and the model.<br />A. Vallecillo: "Assigning Meaning to Models"<br />32<br />[Borrowed from J. Bezivin]<br />
  36. 36. 33<br />A. Vallecillo: "Assigning Meaning to Models"<br />Theresultingmodel<br />
  37. 37. Each notation is more apt for a task<br />34<br />A. Vallecillo: "Assigning Meaning to Models"<br /> MCMLXVII<br />+ DLXXIX<br /> ???<br /> 1.967<br />+ 579<br />
  38. 38. Each notation is more apt for a task<br />35<br />A. Vallecillo: "Assigning Meaning to Models"<br /> MCMLXVII<br />+ DLXXIX<br /> ???<br /> 1.967<br />+ 579<br /> 2.546 <br />
  39. 39. Each notation is more apt for a task<br />36<br />A. Vallecillo: "Assigning Meaning to Models"<br /> MCMLXVII<br />+ DLXXIX<br /> MMDXLVI<br /> 1.967<br />+ 579<br /> 2.546 <br /><br />
  40. 40. How do you solve this problem?<br />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?<br />A. Vallecillo: "Assigning Meaning to Models"<br />37<br />x = 12<br />y = 8<br />+ <br />2x = 24<br />x – y = 4<br />x + y = 20<br />Solution: theolderis 12 and theyoungeris 8<br />
  41. 41. Problems, Notations, Solutions<br />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<br />http://en.wikipedia.org/wiki/History_of_mathematical_notation http://en.wikipedia.org/wiki/Temporal_logic<br />38<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  42. 42. Our current software modeling notations<br />A. Vallecillo: "Assigning Meaning to Models"<br />39<br />
  43. 43. The UML way…<br />
  44. 44. Sauron’s approach to metamodeling(e.g., OMG’s UML metamodel)<br />The lord of the Metamodels<br />(obviously, adapted)<br />Three notations for the Structure modelers under the sky,<br />Seven for the Behavior modelers in their halls of stone,<br />Tree for mortal Packagers doomed to die,<br />One for the Designer of the Whole system on his dark throne<br />In the Land of Mof where the shadows lie.<br />One Metamodel to rule them all, One Metamodel to find them,<br />One Metamodel to bring them all and in the darkness bind them<br />In the Land of Mof where the shadows lie.<br />A. Vallecillo: "Assigning Meaning to Models"<br />41<br />
  45. 45. No general purpose language can express all different semantics without becoming a monster<br />Especially under the presence of antagonist semantics (Discrete & continuous; synchronous & asynchronous;...)<br />A. Vallecillo: "Assigning Meaning to Models"<br />42<br />“More general does not mean Better. Heterogeneity may be better than generality.<br /> ...Useful semantics imply constraints on designers.”<br /> Edward A. Lee<br />
  46. 46. How can we specify DSMs?<br />How do we express in a precise and abstract manner:<br />Structure<br />Behavior<br />Time-dependent functionality<br />Quality properties (QoS,…)<br />Which is the best notation for each of those aspects?<br />It depends on the purposeof the model…<br />…must have a precise meaning<br />…and must allow the analysis of the models<br />A. Vallecillo: "Assigning Meaning to Models"<br />43<br />
  47. 47. Visual DSMLs<br />44<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  48. 48. Anatomy of a DSML (I)<br />45<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  49. 49. Anatomy of a DSML (I)<br />46<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  50. 50. Anatomy of a DSML (I)<br />47<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  51. 51. We need more than syntax…<br />Describe meaningful models<br />At the appropriate level of abstraction<br />In a correct, complete and accurate manner<br />Using a notationnatural to the target domain engineer<br />Animate models <br />Explicitly define behavioral semantics of DSLs so that models can be understood, manipulated and maintained by both users and machines<br />Add Non-Functional Properties (Time, QoS,…) to DSLs<br />Make models amenable to simulation<br />Analyse models<br />Connect DSLs to Analysis tools<br />48<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  52. 52. Anatomy of a DSML (II) <br />49<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  53. 53. Anatomy of a DSML (II) <br />50<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  54. 54. The village metaphor<br />51<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  55. 55. Semantic (or “Meaningful”) Domains<br />The meaning of a model M is defined by its interpretation in a meaningful semantic domain D.<br />Each Semantic Domain has<br />Precise semantics<br />A set of (equivalent) notations<br />A set of analysis tools<br />Underlying logic<br />Semantic Bridges connect Semantic Domains<br />52<br />A. Vallecillo: "Assigning Meaning to Models"<br />(vs. “meaningless” Models)<br />The Prolog village<br />The QNM village<br />The Petri Net village<br />The Coq village<br />The Process Alg village<br />The Maude village<br />The Z village<br />The Modellica village<br />The B village<br />…<br />
  56. 56. Expressing semantic bridges<br />As Model Transformations<br />Possible if correspondences can be expressed as functions<br />Pairwise consistency can be formally studied<br />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]<br />As Weaving Models<br />Possible if correspondences are just mappings<br />53<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  57. 57. Semantic Mappings as Model Transformations<br />Types<br />Domestic<br />Horizontal<br />Vertical<br />Abstracting<br />Refining<br />Pruning<br />Forgetful<br />…<br />54<br />A. Vallecillo: "Assigning Meaning to Models"<br />The relationship between domains D and D’is defined by a model transformation T:D->D’.<br />[[M]]D’ := [[T(M)]]D’<br />
  58. 58. How do we analyse models?<br />Crossing the bridges!!!<br />55<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  59. 59. Models to connect (analysis) tools!<br />[Borrowedfrom Russell Peakpresentation at OMG, 2007]<br />56<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  60. 60. Multipleviews and coordinatedDSLs<br />Each view is expressed in a given domain language<br />Vocabularies of different corporations are different<br />However they allow talking about a common building<br />A. Vallecillo: "Assigning Meaning to Models"<br />57<br />
  61. 61. AssigningMeaningstoModels<br />(Usingmodeltransformations)<br />
  62. 62. Ourproposal<br />Describe thestructure of Models/Metamodelswithusualmodelingnotation and tools (Ecore, EMF, GMF, …)<br />Describe thebehavior of modelsusingvisuallanguages (including Time and QoSaspects)<br />Specifythestructure of models and metamodelsusing a formalsystem, i.e., a precise SemanticDomain (e.g., Maude)<br />Specifythebehavior of modelsusing a formalsystem, i.e., in a Formal SemanticDomain (e.g., Maude)<br />Define mappingsbetweenthevisual and formalnotations (thelatterprovidesthemeaningfortheformer)<br />Make use of theanalysistoolsin the target domaintoreasonaboutthe visual models<br />A. Vallecillo: "Assigning Meaning to Models"<br />59<br />
  63. 63. A Production System Example<br />A. Vallecillo: "Assigning Meaning to Models"<br />60<br />
  64. 64. Specifying dynamic behavior<br />Use of In-place Transformation Rules (e.g., graph transformations)<br />Abstract and concrete syntaxes: Independent from the underlying semantic framework (e.g., Maude) <br />l:[NAC] x LHS -> RHS<br />61<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  65. 65. Addingtimetobehavioralspecifications<br />Part of the e-Motions modeling notation<br />Rule duration<br />Periodicity, soft scheduling<br />Ongoing rules<br />Access to the Global Time Elapse<br />Time stamps, scheduled actions<br />A. Vallecillo: "Assigning Meaning to Models"<br />62<br />Carry [5] <br />xPos = t.xPos<br />yPos = t.yPos<br />p<br />p<br />c<br />t<br />c<br />t<br />t<br />l:[NAC] x LHS -> RHS<br />
  66. 66. Addingactionexecutions<br />Specification of action properties <br />Withouth the need of unnaturally modifying the metamodel<br />A. Vallecillo: "Assigning Meaning to Models"<br />63<br />
  67. 67. Precise Semantics<br />Defined by a Semantic Mapping to Real-Time Maude<br />This makes models amenable to simulation and to formal analysis using the Real-Time toolkit!<br />Implementable (by a set of ATL model transformations)<br />64<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  68. 68. (65)<br />ProductionSystem {<br />< 'p : Plant | els : 'heg 'hag 'c1 'c2 't1 'a 'c3 't2 'u ><br />< 'hag : HandleGen | in : null, out : 'c2, xPos : 1, yPos : 1 ><br />< 'heg : HeadGen | in : null, out : 'c1, xPos : 1, yPos : 3 ><br />< 'c1 : Conveyor | outParts: nil, out : 't1, xPos : 2, yPos : 3 ><br />< 'c2 : Conveyor | outParts: nil, out : 't1, xPos : 2, yPos : 1 ><br />< 't1 : Tray | parts : nil, capacity : 4, xPos : 3, yPos : 2 ><br />< 'a : Assembler | in : 't1, out : 'c3, xPos : 4, yPos : 2 ><br />< 'c3 : Conveyor | outParts: nil, out : 't2, xPos : 5, yPos : 2 ><br />< 't2 : Tray | parts : nil, capacity : 4, xPos : 6, yPos : 2 ><br />< 'u : User | parts : nil, xPos : 6, yPos : 3 ><br />}<br />Representing Models with Maude<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  69. 69. (66)<br />op ProductionSystem : -> @Metamodel .<br />op PS : -> @Package .<br />sort PositionedEl .<br />subsort PositionedEl < @Class .<br />op PositionedEl : -> PositionedEl .<br /> op xPos : -> @Attribute .<br /> op yPos : -> @Attribue .<br />sort Container .<br />subsort Container < PositionedEl .<br />op Container : -> Container .<br /> op parts : -> @Reference .<br />sort Machine .<br />subsort Machine < PositionedEl .<br />op Machine : -> Machine .<br /> op in : -> @Reference .<br />op out : -> @Reference .<br />…<br />Representing Metamodels with Maude<br />eqisAbstract(Machine) = true .<br />...<br />eqtype(in) = Tray .<br />eqlowerBound(in) = 0 .<br />equpperBound(in) = 1 .<br />...<br />eqtype(out) = Conveyor .<br />eqopposite(out) = null .<br />eqlowerBound(out) = 1 .<br />equpperBound(out) = 1 .<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  70. 70. (67)<br />Representing Behavior with Maude<br />rl[Transfer] :<br />ProductionSystem {<br /> < p : P:Part | xPos : XPOS, yPos : YPOS, SFS ><br /> < c : Conveyor | OutParts: (p PARTS), out : t, SFS’ ><br /> < t : Tray | xPos : XPOS’, yPos : YPOS’, parts : PARTS’, SFS’’ ><br />OBJSET }<br />=><br />ProductionSystem{<br /> < p : P:Part | xPos : XPOS’, yPos : YPOS’,SFS ><br /> < c : Conveyor | outParts: PARTS, out : t, SFS’ ><br /> < t : Tray | xPos : XPOS’, yPos : YPOS’, parts : (p PARTS’), SFS’’ ><br />OBJSET }<br />.<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  71. 71. e-Motions<br />A. Vallecillo: "Assigning Meaning to Models"<br />68<br />http://atenea.lcc.uma.es/e-Motions<br />
  72. 72. (69)<br />Model Simulation and Analysis<br />Simulation/Execution of specifications<br />Reachability Analysis<br />Deadlock<br />Invariants<br />Others<br />LTL Model checking<br />Liveness properties <br />[Simulation 2009]<br />(trew initModel in time <= 20 .)<br />search [10] initModel =>!<br /> ProductionSystem {<br /> < ’t2 : Tray | parts : empty, SFS ><br /> OBJSET } .<br />search initModel =>*<br /> ProductionSystem {<br /> < O : Tray | capacity : CAP, parts : PARTS, SFS ><br /> OBJSET }<br />such that | PARTS | > CAP .<br />(find earliest {initModel} =>* {ProductionSystem {<br />< T : ActionExec | rule : "Collect", value : null, SFS@T > OBJSET }} .)<br />(mc {initModel} |=t<br /> [](ensembled(’he10.ha10) -> collected(’he10.ha10)) <br />in time <= 100 .)<br />reduce modelCheck(initModel,<br /> [](exist(’he10) -> ~exist(’he10)) .<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  73. 73. AddingNFPstoDSMLs<br />A. Vallecillo: "Assigning Meaning to Models"<br />70<br />
  74. 74. Use of “observers”<br />AddingNFPstoDSMLs<br />A. Vallecillo: "Assigning Meaning to Models"<br />71<br />
  75. 75. AddingNFPstoDSMLs<br />Observers capture thestate of theNFPs and monitor theirprogress<br />A. Vallecillo: "Assigning Meaning to Models"<br />72<br />
  76. 76. Making use of theObservers<br />The system can self-adapt under certain conditions<br />73<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  77. 77. Making use of the Observers<br />With the new configuration, the system transmits sounds in a faster way<br />74<br />A. Vallecillo: "Assigning Meaning to Models"<br />
  78. 78. A more complex example<br />A. Vallecillo: "Assigning Meaning to Models"<br />75<br />[TAP 2011, http://atenea.lcc.uma.es/e-Motions]<br />
  79. 79. A more complex example<br />A. Vallecillo: "Assigning Meaning to Models"<br />76<br />[TAP 2011, http://atenea.lcc.uma.es/e-Motions]<br />
  80. 80. A. Vallecillo: "Assigning Meaning to Models"<br />77<br />
  81. 81. Analysing the results<br />A. Vallecillo: "Assigning Meaning to Models"<br />78<br />http://atenea.lcc.uma.es/index.php/Main_Page/Resources/E-motions/PacketSwitchingExample/Results<br />
  82. 82. Pros and Cons<br />Advantages<br />Addition of observers independently of the system<br />Simple modelling of QoS properties<br />Ability to monitor QoS properties<br />Results obtained in easy-to-manipulate format<br />More expressive than other notations (SPA, SPN, QNM,…)(generalized distributions, OCL expressiveness, dynamic topologies, action executions as 1st class citizens,…)<br />Limitations<br />Efficiency of simulations<br />Difficult to debug<br />Not for every problem or domain<br />More expressive than other notations (SPA, SPN, QNM,…)(Difficulties for defining semantic bridges due to large gaps/chasms)<br />A. Vallecillo: "Assigning Meaning to Models"<br />79<br />
  83. 83. We are not alone…<br />A. Vallecillo: "Assigning Meaning to Models"<br />80<br />[Pamela Zave, keynote talk at MODELS 2010]<br />
  84. 84. Recap<br />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.<br />Current widely-used general-purpose modeling notations (especially behavioural and QoS) do not seem to be really up to the job<br />Integrating heterogeneous notations and their associated tools using model transformations seems to be one promising way to go<br />A. Vallecillo: "Assigning Meaning to Models"<br />81<br />
  85. 85. Challenges<br />Definition of new languages for behaviouraldescriptions, which allow easy specificationof Quality Properties and their analysis<br />Improved languages for QoS specification<br />Semantic bridges to other domains<br />Better connection with analysis tools<br />Improved traceability mechanisms <br />Improve understandability of results<br />Better feedback to users<br />E.g., Performance anti-patterns (!)<br />A. Vallecillo: "Assigning Meaning to Models"<br />82<br />

×