1 / 17

Mappings , maps and tables : Towards formal semantics for associations in UML 2

Mappings , maps and tables : Towards formal semantics for associations in UML 2. Zinovy Diskin and Juergen Dingel Queen’s University Kingston, Ontario, Canada. The speaker. The UML 2.0 Semantics Project. Why Associations:.

sereno
Download Presentation

Mappings , maps and tables : Towards formal semantics for associations in UML 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mappings, maps and tables: Towards formal semantics for associations in UML 2 Zinovy Diskin and Juergen Dingel Queen’s University Kingston, Ontario, Canada The speaker The UML 2.0 Semantics Project

  2. Why Associations: • Any UML model of practical interest is built upon the structural base specified by class diagrams. The latter are graphs of classes (nodes) and associations (edges). • “Associations are glue that integrate classes into a system” (Jim Rambaugh). • Metamodeling is based on class diagrams, thence, on asociations. • Hence, semantics of the association construct should be clear and precise. Does UML2 specification meet these requirements?

  3. UML2 Spec defines associations in sect.7.3.3. • The 1st sentence of sect. 7.3.3:An association describes a set of tuples whose values refer to typed instances. An instance of an association is called a link. • Description section.An association specifies a semantic relationship that can occur between typed instances. It has at least two ends represented by properties, each of which is connected to the type of the end. More than one end of the association may have the same type. An end property of an association that is owned by an end class or that is a navigable owned end of the association indicates that the association is navigable from the opposite ends, otherwise the association is not navigable from the opposite ends. • Semantics section. For an association with N ends, choose any N-1 ends and associate specific instances with those ends. Then the collection of links of the association that refer to these specific instances will identify a collection of instances at the other end. The multiplicity of the association end constrains the size of this collection.

  4. UML metamodel of Associations

  5. UML2 metamodel of Association, processed There are some things so serious you have to laugh at them. -- Niels Bohr {subsets memberEnd} {subsets ownedEnd}

  6. A model of the Association Problem… 2 1 3

  7. …and a model of solution: Consider an appropriate model and different views to it Three views of the model Net surface (Cylinder 1) Side surface (Cylinder 2) 3D-space (Cylinder 3)

  8. Our plan The goal is • to build a formal framework where the complex notion of association can be disassembled into elementary blocks; • compose from these blocks a few constructs that can formally model different aspects of associations as described and used in the Spec; • check the UML metamodel of association against our formal framework (Does it fit in? And if not, then fix it by either pressing it through, or expanding it over, or both :)

  9. Three views of association Extension is explicit! DB & UML PL & UML UML

  10. Lewis Carroll about UML Associations: 'When I use a word,' Humpty Dumpty said, in a rather scornful tone,' it means just what I choose it to mean, neither more nor less.' 'The question is,' said Alice, 'whether you can make words mean so many different things.' 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.' <….> 'When I make a word do a lot of work like that,' said Humpty Dumpty, 'I always pay it extra.' The question is how much extra do UML committees pay to the terms “association” and “association end”? 

  11. Adding navigation to tables  *

  12. Operational view Extensional view Structural view Ownership and navigability f2 is navigable /f2 f2 { inverse} f1 0..2 1..3 f2 is not navigable ?   x ?

  13. Meanings of the terms “association” and “association end“in function of the ownership context Association A owns an end E “A” owns all its ends “A” owns not all its ends “E” is navigable “A” is a table and E is a column name “E” is not navigable “A” is a set of mappings between classifiers, which have a common extension [[A]]. End E is a mapping, which is not stored yet can be derived from [[A]] “A” is a mappings between classifiers, and E is a placeholder for the corresponding part of the multiplicity constraints to this mapping

  14. Metamodel of our formal semantics: Playing LEGO with associations Property’s context! Qualifier!

  15. UML2 metamodel of Association, processed {subsets memberEnd} {subsets ownedEnd}

  16. Results and discussion General conclusion: Semantics of the association construct can be uncovered in a few Semanticsand Descriptionsections of the Spec, and is presented there in a sufficiently consistent way. However, the part of this semantics formally captured in the UML metamodel is much poorer and that is why the latter is ambiguous (recall our Cylinder model). Particular technical problems of the UML metamodel of associations: -- meta-association context is missing, which makes the fundamental metaclass Property underspecified (in fact, undefined); -- meta-association qualifier is improperly defined: its target must be the metaclass Role rather then Property; -- a few important constraints are missing (see the paper). Deeper conceptual problems: -- fundamental dichotomy associations-as-mappings vs. associations-as-tables is not specified; -- fundamental dichotomy basic-derived element of association is not specified. A these red problems really so bad?

  17. Results and discussion (with Carroll and Wittgenstein) Would you tell me, please, which way I ought to go from here?' asked Alice. `That depends a good deal on where you want to get to,' said the Cat. `I don't much care where‘ said Alice. `Then it doesn't matter which way you go,' said the Cat. UML is a language, and understanding UML is a linguistic activity UML as a specification language must be clear, precise and unambiguous. Formal semantics can really help here. UML as a communication language does not ought anything besides being convenient and usable (like other natural languages). As for multiple meanings of its terms, recall Wittgenstein’s Thesis: The meaning of a word is determined by its use. • Is it possible to reconcile these two UMLs (and a few ones in-between) ? • Language = Syntax + Semantics, • the latter is changeable and determined by the context. Hence, annotate UML diagrams with their intended meaning (to specify, to suggest, to inspire :) • Introduce into UML special constructs for under-specification

More Related