1 Devon M. Simmonds The UML Metamodel SLIDES include some from tvarious sources including: (1)

Slides:



Advertisements
Similar presentations
Language Specification using Metamodelling Joachim Fischer Humboldt University Berlin LAB Workshop Geneva
Advertisements

Profiles Construction Eclipse ECESIS Project Construction of Complex UML Profiles UPM ETSI Telecomunicación Ciudad Universitaria s/n Madrid 28040,
UML an overview.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML, Part 4 UML 2 Metamodel.
SEG4110 – Advanced Software Design and Reengineering TOPIC D Metamodelling.
Automated Test Design ™ © 2011 Conformiq, Inc. CONFORMIQ DESIGNER On ES v1.2.1 Stephan Schulz MBT Working Meeting/MTS#56, Göttingen.
Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Train Control Language Teaching Computers Interlocking By: J. Endresen, E. Carlson, T. Moen1, K. J. Alme, Haugen, G. K. Olsen & A. Svendsen Synthesizing.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
Introduction to UML Visual modeling Models and its importance
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
Common Mechanisms in UML
Developed by Reneta Barneva, SUNY Fredonia Component Level Design.
® Eurostep.ESUKPC v0.1©Copyright Eurostep Limited An Introduction to ISO STEP Part 25 David Price.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
SEG4110 – Advanced Software Design and Reengineering
Faculty of Informatics and Information Technologies Slovak University of Technology Peter Kajsa and Ľubomír Majtás Design.
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer Mappings, Use of MOF for Language Families Joachim Fischer Workshop on.
Slide 1 Wolfram Höpken RMSIG Reference Model Special Interest Group Second RMSIG Workshop Methodology and Process Wolfram Höpken.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
9/14/2012ISC329 Isabelle Bichindaritz1 Database System Life Cycle.
Introduction to MDA (Model Driven Architecture) CYT.
Assessing the Suitability of UML for Modeling Software Architectures Nenad Medvidovic Computer Science Department University of Southern California Los.
What is MOF? The Meta Object Facility (MOF) specification provides a set of CORBA interfaces that can be used to define and manipulate a set of interoperable.
Specializing and extending the UML
UML Profiles Eclipse ECESIS Project The UML Profile technology SOFTEAM 144 Ave des Champs Elysées Paris, France
1 Devon M. Simmonds Metadata & The UML Metamodel SLIDES include some from tvarious sources including: (1)
ISO/IEC CD and WD : Core Model and Model Mapping ISO/IEC JTC1/SC32/WG September 2005, Toronto SC32/WG2 Japan (Kanrikogaku Ltd) Masaharu.
SaveUML System design. System overview Possible...
Uml is made similar by the presence of four common mechanisms that apply consistently throughout the language. After constructing or developing the architecture.
Methodology - Conceptual Database Design. 2 Design Methodology u Structured approach that uses procedures, techniques, tools, and documentation aids to.
Methodology - Conceptual Database Design
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
UML Use Case Diagramming Guidelines. What is UML? The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing,
1 Advanced Software Architecture Muhammad Bilal Bashir PhD Scholar (Computer Science) Mohammad Ali Jinnah University.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
An Introduction to the Unified Modeling Language
Dr. Darius Silingas | No Magic, Inc. Domain-Specific Profiles for Your UML Tool Building DSL Environments with MagicDraw UML.
Lecture 1: UML Class Diagram September 12, UML Class Diagrams2 What is a Class Diagram? A class diagram describes the types of objects in the system.
Week III  Recap from Last Week Review Classes Review Domain Model for EU-Bid & EU-Lease Aggregation Example (Reservation) Attribute Properties.
Design Model Lecture p6 T120B pavasario sem.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
1 Class Diagrams. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are for visualizing, specifying and documenting.
CIM LAB MEETING Presentation on UML Rakesh Mopidevi Kwangyeol Ryu.
® A Proposed UML Profile For EXPRESS David Price Seattle ISO STEP Meeting October 2004.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Chapter 16 UML Class Diagrams 1CS6359 Fall 2012 John Cole.
XASTRO-2 Presentation CCSDS SAWG th November 2004.
CSCI 3428: Software Engineering Tami Meredith UML Unified Modeling Language.
UML Profile BY RAEF MOUSHEIMISH. Background Model is a description of system or part of a system using well- defined language. Model is a description.
Class Diagrams. Terms and Concepts A class diagram is a diagram that shows a set of classes, interfaces, and collaborations and their relationships.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: UML 2 Metamodel Note to Instructor: The material in this.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
A UML-Based Pattern Specification Technique Presented by Chin-Yi Tsai IEEE TRANSACTION ON SOFTWARE ENGINEERING, VOL. 30, NO. 3, MARCH 2004 Robert B. France,
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
Sheet 1MDAFA2004 Linköping, June 2004 A Language for Model Transformations in the MOF Architecture Ivan Kurtev, Klaas van den Berg University of Twente,
Defects of UML Yang Yichuan. For the Presentation Something you know Instead of lots of new stuff. Cases Instead of Concepts. Methodology instead of the.
UNIT-IV Designing Classes – Access Layer ‐ Object Storage ‐ Object Interoperability.
Business System Development
SysML 2.0 Formalism: Requirement Benefits, Use Cases, and Potential Language Architectures Formalism WG December 6, 2016.
SysML v2 Formalism: Requirements & Benefits
Chapter 2, Modeling with UML, Part 4 UML 2 Metamodel
UML Class Diagram.
Introduction to UML.
Copyright 2007 Oxford Consulting, Ltd
Software Architecture & Design
Presentation transcript:

1 Devon M. Simmonds The UML Metamodel SLIDES include some from tvarious sources including: (1) (2) Object Modeling with OMG UML Tutorial Series -

2 Outline Introduction UML metamodel Class diagram metamodel Interaction diagram metamodel Benefits of metamodels UML extension mechanisms

UML The UML specification consists of two interrelated parts: UML Semantics. A metamodel that specifies the abstract syntax and semantics of UML object modeling concepts. UML Notation. A graphic notation for the visual representation of the UML semantics. 3

UML The abstract syntax for the UML Semantics is expressed using a small subset of the UML Notation. The UML Notation describes the mapping of the graphic notation to the underlying semantics. 4

UML The UML metamodel is described in a semi- formal manner using three views: Abstract syntax Well-formedness rules Semantics The abstract syntax is provided as a model described in a subset of UML, consisting of a UML class diagram and a supporting natural language description. 5

UML The well-formedness rules are provided using a formal language (Object Constraint Language) and natural language (English). The semantics are described primarily in natural language, but may include some additional notation. 6

Advanced Modeling with UML7 Meta-Models Models that describe other modelsClassClassAssociationAssociationObjects Model Meta-Model(M0)(M1) (M2) CustomerOrderCustomerOrderitemquantityitemquantityCustomerCustomeridid b:CustomerOrder b:CustomerOrder Mike:Customer Id= Mike:Customer c:CustomerOrderItem=batter Quantity= Quantity= c:CustomerOrderItem=batter

Advanced Modeling with UML8 The UML Meta-Model A UML Model that describes UML GeneralizableElementGeneralizableElement isRoot : Boolean isLeaf : Boolean isAbstract : Boolean isRoot : Boolean isLeaf : Boolean isAbstract : Boolean ClassClass isActive : Boolean ClassifierClassifier FeatureFeature visibility : {public, private, protected} protected} * not self.isAbstract implies self.allOperations->forAll(op | self.allMethods->exists(m | m.specification includes (op))) Well-formedness constraint (OCL) Meta-ClassMeta-Class

9 Four Layered Architecture LayerDescriptionExample Meta-metamodelDefines metamodelmetaClass, metaAttribute, metaOperation MetamodelAn instance of meta- Metamodel. Defines model Class, attribute operation, component modelLanguage for describing information domain. Defines a set of related objects that represent a concept. Employee, User objectAn instance of the model. An example information domain sally

OMG Modeling Infrastructure 10 M3 M2 M1 M0 Meta-Object Facility (MOF) UML Metamodel Modeling concepts User Data Instance_of

MetaModelsSWE UML Metamodel Features UML metamodel is managed by organizing it into packages. Each package groups related metaclasses

Advanced Modeling with UML 12 «metamodel» UML “Structural Elements” “Behavioral Elements” dependency package UML Metamodel Overview

Advanced Modeling with UML 13 “Structural Elements” Composite Structures Classes UML Overview ComponentsDeployments >

14

15

16

17

18

19 Slots are shown using similar notation to that of the corresponding structural features. Where a feature would be shown textually in a compartment, a slot for that feature can be shown textually as a feature name followed by an equal sign (‘=’) and a value specification. Other properties of the feature, such as its type, can optionally be shown.

Slots 20 A slot specifies that an entity modeled by an instance specification has a value or values for a specific structural feature. Slots are shown using similar notation to that of the corresponding structural features. Where a feature would be shown textually in a compartment, a slot for that feature can be shown textually as a feature name followed by an equal sign (‘=’) and a value specification. Other properties of the feature, such as its type, can optionally be shown.

21 A classifier is a classification of instances, it describes a set of instances that have features in common.

22

23

24

25 Example 1 PERSON CAR [0..1] [0..*] owns Model Layer Entity Association End 1 [0..*] [2..*]1 Cardinality range Rolename Name Meta Model Layer A meta-model is a conceptual model of a modeling technique !

26 Example 2 Association Property Class RelationshipClassifier 2..* 0..1 Owned end member end * Syntactically valid ?

27

28

29

30

The Java Metamodel 31

Advanced Modeling with UML32 Behavioral Elements of UML Metamodel

Interaction Diagram Metamodel (see handout) Can you derive the relationship between a message end and a lifeline? 2. Can you derive the relationship between a message and an operation? 2. Can you derive the relationship between a class and a lifeline?

34 Navigating the “MetaMuddle” Can you derive the relationship between a message end and a lifeline? ?

Benefits of Metamodels Meta-models should enable the following benefits: Share system information across applications & tools during its life cycle Enable a multi-user integrated tools environment Enhance information sharing and communication Consolidate and eliminate redundant specifications Increase systems integrity Simplify systems maintenance/modification Enable combining tools from multiple vendors Simplify migrations and conversions... 35

Benefits of Metamodels Provide a platform for integration of tools Make sure that tools can work together on the same software project - tool inter-operability. Provide a means to manage software components in a shared application development environment. Make sure that people can work together on the same software project – Basis for Software Configuration Management 36

Benefits of Metamodels Provide a “standard” documentation format for describing methods and techniques for software development. Define the semantics of a notation Compare methods and techniques on a uniform basis Provide a platform for software reuse Reuse software by populating the meta-model Provide a basis for knowledge sharing in Data Warehouses Make sure that people (may) give the same meaning to shared data elements 37

38 Metamodel Users? TOOL vendor The meta-model describes the capabilities of the tool... Tool vendors often extend standard metamodels or implement only a subset! Systems Integrator A systems integrator may have to integrate multiple modeling and other tools in a way that they appear like one tool. The meta-model determines how the tools can “speak” to each other... Modeler In evaluating modeling tools functionality is important (“this one does code generation”), but the supported concepts are even more important, which is essentially evaluating the meta- model Repository vendor A meta-model is a conceptual model for repositories, the inte- grating technology for tools

39 Metamodel Efforts Multi-vendor The UML Meta-model (Object Management Group OMG) The MOF specification (OMG) XMI (XML-based Interoperability of tools, OMG) … Single vendor The Microsoft OPEN Information The PTECH meta-model The CAYENNE meta-model …

Architecture metamodel

Extending UML? 41 Why is there a need to extend UML?

Advanced Modeling with UML, Selic et al.42 Extensibility Mechanisms Allow Modelers to refine the semantics of UML for a specific domain Extensions cannot violate the standard UML semantics Enforces a consistent core of concepts and semantics for every variation Prevents meta-model explosion (Using UML to model everything and anything)

43 How UML Extensibility Works The standard UML semantics can be viewed as defining a space of possible interpretations Standard UML semantics refined semantics (valid) (valid) different semantics (NOT valid) different semantics (NOT valid) Advanced Modeling with UML, Selic et al.

44 The Basic Extensibility Mechanisms Stereotypes used to refine meta-classes (or other stereotypes) by defining supplemental semantics Constraints predicates (e.g., OCL expressions) that reduce semantic variation can be attached to any meta-class or stereotype Tagged Values individual modifiers with user-defined semantics can be attached to any meta-class or stereotype Advanced Modeling with UML, Selic et al.

45 Stereotypes Used to define specialized model elements based on a core UML model element Defined by: Base metaclasses (or stereotype) What element is specialized? Constraints: What is special about this stereotype? required tags (0..*) What values does this stereotype need to know? icon How should I appear in a model? A model element can be stereotyped in multiple different ways 1.4 Advanced Modeling with UML, Selic et al.

46 Example Capsule: A special type of concurrent object used in modeling certain real-time systems By definition, all classes of this type: are active (concurrent) have only features (attributes and operations) with protected visibility have a special “language” characteristic used for code generation purposes In essence, a constrained form of the general UML Class concept Advanced Modeling with UML, Selic et al.

47 Example: Stereotype Definition Using a tabular form: StereotypeBase ClassTagsConstraints «capsule»Classlanguage isActive = true; self.feature->select(f | f.oclIsKindOf(Operation))-> forAll(o | o.elementOwnership.visibility = #protected) TagStereotypeTypeMultiplicity language«capsule»String Advanced Modeling with UML, Selic et al.

48 Stereotype Notation Several choices«capsule»aCapsuleClass«capsule»aCapsuleClass aCapsuleClassaCapsuleClass Stereotype icon (a) with guillemets (“gwee-mays”) (b) with icon (c) iconified form Advanced Modeling with UML, Selic et al.

49 Extensibility Method Refinements are specified at the Model (M1) level but apply to the Meta-Model level (M2) avoids need for “meta-modeling” CASE tools can be exchanged with models «Capsule»«Capsule» (M1) (M2)ClassClassAssociationAssociationCustomerOrderCustomerOrderitemquantityitemquantityCustomerCustomeridid «capsule»aCapsuleClass«capsule»aCapsuleClass Advanced Modeling with UML, Selic et al.

50 Graphical Definition Alternative to the tabular form defined in a user (M1) model «metaclass» Class «stereotype» capsule Tags language : String «stereotype» 1.4 Advanced Modeling with UML, Selic et al.

51 Heuristic: Combining Stereotypes Through multiple inheritance: «stereotype» capsule Tags language : String Tags «metaclass»Package«metaclass»Package «stereotype» PackageCapsule «stereotype» 1.4 Advanced Modeling with UML, Selic et al.

52 When to Use Stereotypes? Why not use normal subclassing instead? Use stereotypes when: additional semantic constraints cannot be specified through standard M1-level modeling facilities e.g. “all features have protected visibility” the additional semantics have significance outside the scope of UML e.g. instructions to a code generator “debugOn = true” Advanced Modeling with UML, Selic et al.

53 Tagged Values Consist of a tag and value pair Typed with a standard data type or M1 class name Typically used to model stereotype attributes Additional information that is useful/required to implement/use the model May also be used independently of stereotypes e.g., project management data (“status = unit_tested”) 1.4 Advanced Modeling with UML, Selic et al.

54 Constrains Constraints formal or informal expressions must not contradict inherited base semantics ATM_WithdrawalATM_Withdrawal customer : id amount : Money {amount is multiple of $20} customer : id amount : Money {amount is multiple of $20} AccountAccount customer : id balance : Money customer : id balance : Money «constraint» {ATM_Withdrawal.customer = Account.customer} Account.customer}«constraint» {ATM_Withdrawal.customer = Account.customer} Account.customer} Advanced Modeling with UML, Selic et al.

TheEnd CSC550, Devon M. Simmonds, Computer Science Department, University of North Carolina Wilmington ??????????????? …CSC550 … Q u e s t i o n s ?