Download presentation
Presentation is loading. Please wait.
Published byPhilip Mosley Modified over 8 years ago
1
The UML Family Steve Cook Distinguished Engineer IBM Global Services «UML 2000»
2
Agenda UML : a family of languages UML definition UML variants UML architecture
3
In the industry, UML is used for many different purposes Direct mapping to language implementations (Java, C++, Smalltalk, CORBA IDL and so on) “round-trip engineering” “software through pictures” Directly executable notation (eg xUML) Language-independent software specification Architecture description Process engineering Website structures Workflow specification Business modelling
4
The different uses of UML can be semantically different and inconsistent Extension by new elements tags, stereotypes Class diagrams meaning of aggregation, special symbols Statecharts what to attach statecharts to, error treatment, relationship of guards to preconditions, inheritance Inheritance allowed forms, repeated inheritance, redefition rules Framing rules what does it mean not to specify something? Model of time causes of transitions, timeouts, deadlocks, concurrency Connecting OCL to diagrams valid places to write expressions, context of expressions Programming-language specifics C++, Java, Smalltalk,... Communication paradigms Buffered, synchronous, asynchronous, reliability, security Persistence mechanisms Mappings to databases, logging, undo, error recovery
5
A “preface” would be a set of packaged definitions to pin down these differences "Defining UML Family Members using Prefaces", Cook S, Kleppe A, Mitchell R, Rumpe B, Warmer J & Wills A, TOOLS Pacific 99 conference proceedings, published by IEEE.
6
Unfortunately the current UML definition does not lend itself to preface definition Incomplete Not inter-operable; diagrams are excluded; notation- concept mapping is unclear Unclear about level of abstraction Abstract (abstract collaborations) vs concrete (statecharts) Confused notions: “instance” and role, model and package, type/class/interface Inflexible Lack of modelling building-blocks and first-class extension mechanisms Hard to understand Big, vague, ambiguous, and uncheckable Not MOF-compliant Meta-model uses non-MOF constructs
7
Agenda UML : a family of languages UML definition and use UML variants UML architecture
8
Unified Modeling Language UML is “a language for visualizing, specifying, constructing and documenting the artifacts of software systems”. It describes: concepts and their relationships (abstract syntax using meta-model, “semantics” in natural language) diagrams and notation for concepts interchange format (XMI) constraint language (OCL) repository interface (IDL)
9
The UML definition is deeply confused about the meaning of “semantics” The Semantics section is mostly about abstract syntax The Semantics section contains subsections called Semantics The Notation section contains paragraphs called Semantics Each of these sections deals, in natural language, with a variety of things: statements about the dynamic behaviour of UML models statements about the well-formedness of models statements about different modelling approaches
10
Here’s a traditional (denotational) view of the Semantics of textual languages (3 + 2) * 7 times(plus(3,2),7) 35 Concrete syntax Abstract syntax Semantics String ExpTree Number parse “Semantic function” E: ExpTree -> Number E (plus (e1, e2)) = E (e1) + E (e2) E (times (e1, e2)) = E (e1) * E (e2) E (3) = 3, etc “Semantic domain”
11
How can we apply this approach to UML? Class, Association, Class ?? Concrete syntax Abstract syntax Semantics Diagrams XMI IDL Metamodel instances ??? map What is the semantic domain of UML? map
12
Object Constraint Language (OCL) is a central component of UML OCL is an expression language for object modeling, used for: constraints / invariants well-formedness rules in UML definition pre- and post-conditions expressing access paths
13
A simple OCL example Person age: Integer Company employersemployees 0..* Company self.employees.forAll(Person p | p.age >= 18 and p.age <= 65)
14
OCL is used extensively in the UML 1.n standard to specify well-formedness rules CompositeState [1] A composite state can have at most one initial vertex self.subState->select (v | v.oclType = Pseudostate)-> select(p : Pseudostate | p.kind = #initial)-> size <= 1 [2] A composite state can have at most one deep history vertex self.subState->select (v | v.oclType = Pseudostate)-> select(p : Pseudostate | p.kind = #deepHistory)-> size <= 1 [3] A composite state can have at most one shallow history vertex self.subState->select(v | v.oclType = Pseudostate)-> select(p : Pseudostate | p.kind = #shallowHistory)-> size <= 1 [4] There have to be at least two composite substates in a concurrent composite state (self.isConcurrent) implies (self.subState->select (v|v.oclIsKindOf(CompositeState))-> size <= 2)
15
XMI (XML Metadata Interchange) is the standard format for interchanging UML Uses W3C eXtensible Markup Language (XML) for the transfer syntax and interchange format Specify XML Document Type Definitions (DTD) to enable transfer and verification of UML based models (mymodel.xml, uml.dtd) MOF based metamodels (uml.xml, mof.dtd) Specifies a precise MOF to XML mapping MOF = Meta-Object Facility Allows interchange of any MOF-based metamodel Also enables automatic generation of DTDs
16
Agenda UML : a family of languages UML definition UML variants UML architecture
17
The OMG concept of “profile” recognises the need for UML variants A UML Profile (according to the Profiles Green Paper OMG ad/99-12-32) :- Consistently specialises the UML metamodel Uses only UML extension mechanisms stereotypes, tagged values, constraints Is interchangeable using existing (XMI) mechanisms Defines a subset of UML metaclasses References domain-specific libraries Can be specialised and composed Can be associated with UML packages Formalises the notion of “tagged value”
18
Example profile: UML for CORBA
19
UML Profiles are only one of the UML variant mechanisms currently in use UML Profiles are limited No additional classes in meta-model, only stereotypes (labels) No associations between stereotypes Only iconic modification of notation thus can be supported easily by tools A different approach has been used for the OMG Common Warehouse Metadata standard Define, using MOF directly, full subclasses of UML metamodel classes, and MOF associations between those subclasses Mapping to notation is formally undefined
20
Agenda UML : a family of languages UML definition UML variants UML architecture
21
The UML 2.0 Infrastructure RFP calls for: Architectural alignment and restructuring strict alignment with 4-layer model make MOF a subset of UML restructure the metamodel in order to separate concerns identify “semantic variation points” backwards compatible with XMI 1.x Extensibility specify profiles specify “first class extensions”
22
IBM has funded a feasibility study by pUML (precise UML group) See www.puml.org for the document “A Feasibility Study in Rearchitecting UML as a Family of Languages using a Precise OO Meta-Modeling Approach”, (Clark, Evans, Kent, Brodsky, Cook) and associated tools The study proposes a new meta-modelling facility (MMF) containing: Meta-Modelling Language (MML) Meta-Modelling Tools (MMT): a satisfaction checker - does instance X satisfy constraint C from model M? check that a model satisfies its metamodel check that a metamodel satisfies the MML rules check that MML satisfies the MML rules
23
The structure of MML
24
The internal structure of the staticCore package
25
The staticCore.model.concepts package
26
The staticCore.instance.concepts package
27
The staticCore.semantics package Concepts (abstract syntax)Semantic domain
28
OCL constraints are used to specify semantic mappings context uml.staticCore.semantics.Instance inv: satisfies(c : Classifier) : Boolean if self.of = c then of.allContents() -> forall(e1 | elements -> exists(e2 | e2.name = e1.name and e2.satisfies(e1))) else false endif
29
The structure of MML defines a systematic method for extending MML 1. determine whether the model element is a subclass of Classifier, i.e. exhibits the properties of a generalisable container; 2. if so, subclass the model element from Classifier in the model.concepts package; 3. constrain the model element’s contents to be those of the attribute ‘elements’; 4. in the instance.concepts package, identify or add a new instance subclass which is an instance of the classifier; 5. in the semantics package, link them by subclassing the ‘of/instances’ association; 6. for each element of the new model element repeat steps 4-5; 7. determine any dependencies between instances and their elements, and specify these using appropriate constraints.
30
MML includes a model of OCL - concepts, instances and semantics
31
UML is positioned in the OMG’s “4-layer architecture” M3 M2 M1 M0 Meta-Object Facility UML, CWM, SPE My model What I’m modelling Metametamodel Metamodel Model User objects
32
But the current architecture of UML / MOF is not well-organised UML 1.x (concepts) UML core UML 1.x “physical meta-model” MOF CWM maps extends (M2) OCL instantiates uses XMI, IDL defines Profile(X) extends(M1)
33
We’re working on a possible new architecture for UML / MOF UML 2 (concepts, syntax, semantics) MML MOF’ CWM 2 extends (M2) OCL XMI, IDL defines extends (M1) Profile(X) instantiates
34
Would this answer the RFP? Architectural alignment and restructuring strict alignment with 4-layer model Yes, if MML redefines M3 make MOF a subset of UML Yes, with some changes restructure the metamodel in order to separate concerns Yes, especially by improving / clarifying “package extension” semantics identify “semantic variation points” Every MML class is a SVP subject to constraints backwards compatible with XMI MML formalises syntax, it can define mappings to any version of XMI Extensibility specify profiles Profiles apply simple MML extensions encoded at M1 specify “first class extensions” MML is specifically designed to do this, including semantics
35
Conclusions UML is a family of languages, not a single language The architecture of the UML family needs improvement: a clear approach to semantics a clear approach to UML variants simplification and separation of concerns UML 2.0 is a major opportunity to introduce such improvements
36
UML activities Three UML 2.0 Request for Proposals were issued in September 2000: UML 2.0 Infrastructure UML 2.0 Superstructure UML 2.0 OCL (later: UML 2.0 Diagram Interchange) OMG UML Revision Task Forces: UML 1.4, UML Profiles Working Group, MOF 1.4 OMG UML-profile RFPs: CORBA, EDOC, EAI, Scheduling, SPE Other OMG UML-related RFPs: Action Semantics
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.