Specializing and extending the UML

Slides:



Advertisements
Similar presentations
Profiles Construction Eclipse ECESIS Project Construction of Complex UML Profiles UPM ETSI Telecomunicación Ciudad Universitaria s/n Madrid 28040,
Advertisements

1 CIS224 Software Projects: Software Engineering and Research Methods Lecture 11 Brief introduction to the UML Specification (Based on UML Superstructure.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML, Part 4 UML 2 Metamodel.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Modeling Notations.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
UML – Class Diagrams.
Detail Design Extending UML and Object Design. Object Design.
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.
Component and Deployment Diagrams
Creating Architectural Descriptions. Outline Standardizing architectural descriptions: The IEEE has published, “Recommended Practice for Architectural.
Common Mechanisms in UML
Classes Chapter 4. Terms and Concepts A class is a description of a set of objects that share the same attributes, operations, relationships, and semantics.
Developed by Reneta Barneva, SUNY Fredonia Component Level Design.
International Telecommunication Union ITU-T Study Group 17, Moscow, 30 March – 8 April 2005 New Recommendations on ODP Arve Meisingset Rapporteur Q15.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Unified Modeling Language User Guide Section 2—Basic Structural Modeling Chapter 4—Classes.
OOPSLA 2003 DSM Workshop Diagram Definition Facilities Based on Metamodel Mappings Edgars Celms, Audris Kalnins, Lelde Lace University of Latvia, IMCS,
SEG4110 – Advanced Software Design and Reengineering
Faculty of Informatics and Information Technologies Slovak University of Technology Peter Kajsa and Ľubomír Majtás Design.
Metadata Tools and Methods Chris Nelson Metanet Conference 2 April 2001.
MDA and QVT  Tom Gullion, Director of Product Management, Together Products.
Introduction to MDA (Model Driven Architecture) CYT.
UML Profiles Eclipse ECESIS Project The UML Profile technology SOFTEAM 144 Ave des Champs Elysées Paris, France
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.
UML Class Diagrams and Caché CAMTA Meeting – 1 st December 2011 John Murray Senior Product Engineer.
RTAS 2003 Workshop on Model-Driven Embedded Systems Washington, D.C., May 27-30, 2003 Juan Pablo Zamora Zapata Francis Bordeleau Defining UML Profiles.
111 Protocols CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 8) Meyer, B., Applying design by contract,
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
Dr. Darius Silingas | No Magic, Inc. Domain-Specific Profiles for Your UML Tool Building DSL Environments with MagicDraw UML.
R R R CSE870: UML Component Diagrams Implementation Diagrams.
Week III  Recap from Last Week Review Classes Review Domain Model for EU-Bid & EU-Lease Aggregation Example (Reservation) Attribute Properties.
Copyright © IBM Corp., | March | Creating Robust Scalable DSLs with UML Tutorial (172) James Bruck, Christian Damus IBM Rational Software.
1Mr.Mohammed Abu Roqyah. Database System Concepts and Architecture 2Mr.Mohammed Abu Roqyah.
The Unified Modeling Language (UML)
1 Class Diagrams. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are for visualizing, specifying and documenting.
Ch- 8. Class Diagrams Class diagrams are the most common diagram found in modeling object- oriented systems. Class diagrams are important not only for.
® 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.
Modeling the ODP Computational Viewpoint with UML 2.0: The Templeman Library Example José Raúl Romero, Antonio Vallecillo Universidad de Málaga, Spain.
Identifying classes, Packages and drawing class Diagrams, Object Diagrams and composite structure diagrams Week 07 1.
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.
UML Course Instructor: Rizwana Noor. Overview  Modeling  What is UML?  Why UML?  UML Diagrams  Use Case  Components  Relationships  Notations.
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
Class Diagrams. Terms and Concepts A class diagram is a diagram that shows a set of classes, interfaces, and collaborations and their relationships.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 2, Modeling with UML: UML 2 Metamodel Note to Instructor: The material in this.
 XML derives its strength from a variety of supporting technologies.  Structure and data types: When using XML to exchange data among clients, partners,
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Model Driven Performance Analysis University College London James Skene –
R R R CSE870: UML Component Diagrams Implementation Diagrams.
UML Review: State Machines. Sept. 17, 2003Lecture 5: CS660 Fall Overview States Transitions Activities Modeling object lifeline Creating well-structured.
SysML v2 Formalism Requirements Formalism WG September 15, 2016.
Data Modeling Using the Entity- Relationship (ER) Model
Interface Concepts Modeling Core Team
UNIT-IV Designing Classes – Access Layer ‐ Object Storage ‐ Object Interoperability.
IBM Rational Rhapsody Advanced Systems Training v7.5
Object Management Group Information Management Metamodel
SysML 2.0 Formalism Requirements and Potential Language Architectures
Course Outcomes of Object Oriented Modeling Design (17630,C604)
SysML 2.0 Formalism: Requirement Benefits, Use Cases, and Potential Language Architectures Formalism WG December 6, 2016.
SysML v2 Formalism: Requirements & Benefits
Introduction to Unified Modeling Language (UML)
Business Process Measures
Chapter 2, Modeling with UML, Part 4 UML 2 Metamodel
UML profiles.
Constructing MDA-based Application Using Rational XDE for .NET
Class Diagrams.
Presentation transcript:

Specializing and extending the UML

Extending the UML Stereotype Profiles (Specializing) Constraint Tagged value

Stereotypes A class that defines how an existing metaclass (or other stereotype) may be extended, and enables the use of platform or domain specific terminology or notation in addition to the ones used for the extended metaclass. Certain stereotypes are predefined in the UML, others may be user defined.

Stereotypes Stereotypes are one of the extensibility mechanisms in UML. Example <<include>> <<extend>> distinguish dependencies in use case diagrams. A stereotype may be associated with a Class or Association (or other model element) in the definition of a profile. The main aspects in which a stereotype can modify the metaclass definition are:

Stereotypes 1) Presentation such as, first character of stereotype in lower case in front of elements name enclosed in guillmets; icon or display 2) Additional properties for classes and attributes. The most important properties for an attribute (in addition to the name) are Type, Default Value, Multiplicity, and Unique.

Stereotypes 2) Additional constraints: In a profile only stereotypes can own constraints. The constraint can be named. In the CASE tool Rational Rose the constraints can be written in Java or OCL syntax. 3) Stereotypes can specialize or generalize other stereotypes.

Stereotypes Stereotypes can be text or a graphic icon The icon can replace the normal class box

What is a UML profile? A UML Profile is a predefined set of Stereotypes, Tagged Values, Constraints, and notation icons that collectively specialize and tailor the UML for a specific domain or process (e.g. Unified Process profile). A profile does not extend UML by adding any new basic concepts. Instead, it provides conventions for applying and specializing standard UML to a particular environment or domain.

What is a UML profile? The UML profile was designed to structure and group together standard (extension) specialization to the UML model. The UML profile is at the heart of a strategic plan to formalize and handle the application development process using UML. This is called the Model Driven Architecture (MDA). A UML package is analogous to a folder used to organize a large diagram into several smaller ones. Packages are used to construct profiles.

What is a UML profile? The purpose of a UML profile is to allow the construction and interchange of UML models that require semantic specifications that express semantic detail beyond what can be expressed with standard UML.

What is a UML profile? Specializing UML for technology implementations (“language mappings”) Every technical target, such as programming language, or middleware or library or database is a natural candidate for defining a dedicated UML profile. UML profile for CORBA UML profile for EJB (Enterprise Java Beans) UML profiles for C++, or for Java, UML profiles for specific RDB such as “ORACLE”. UML for GIS see hand out and http://www.isima.fr/~kang/pinet/kang.pdf

What is a UML profile? Specializing UML for specific application domains : Domain specialists in e.g. the finance or manufacturing domains have to use profiles cautiously. Very often, application domains only require predefined model libraries or template libraries. Using profiles in this context might be overkill. However, there are some needs for specializing UML which originate in “horizontal” application domains. For example, geographic applications need to express a specific way of defining geographic constraints between elements, that do not exist in other development areas.

Part of a GIS profile from Kang et al. http://www.isima.fr/~kang/pinet/kang.pdf

UML Extensions UML has the following extension mechanisms. Stereotypes Tagged Values Constraint A stereotype defines how an existing metaclass may be extended, and enables the use of platform or domain specific terminology or notation in place of or in addition to the ones used for the extended metaclass.

What is a UML profile? Profiles generically extend the UML through the use of stereotypes that are most often language-specific, provide a common graphical notation and vocabulary, and define a subset of the UML metamodel (MOF).

What is a UML profile? Profiles available in CASE tools such a Poseidon, ArgoUML, Rational Rose.

What is a UML profile? A profile is an extension to the core UML that keeps the UML metamodel intact, in other word it obeys the rules of UML. A UML profile is a subset of UML that is necessary and sufficient for a given development effort (e.g. Testing, WAP, or GIS). For example, UML Testing Profile defines a language for designing, visualizing, specifying, analyzing, constructing and documenting the artifacts of test systems. UML profiles are defined in the UML infrastructure volume of UML 2.0. Profiles are packages that are linked to other packages in a model by using the <<apply>> dependency. Model elements in the model package can then use the features that are in the profile, typically stereotypes.

UML example GIS profile The following is part of a description of a car sharing system: Each member of the car sharing pool has an address that consists of neighborhood and a region. It is required to construct a class for the car sharer, the address, the neighborhood, and the region. In order to handle location information it has been decided to attach a Geographical Information System (GIS) system to the car sharing system. The GIS has been modeled as a UML profile called GIS. The UML profile mechanism was used to construct the profile in the next slide. This profile extends Class with Point and Region stereotypes. It also extends the UML association with an association stereotype called LocatedIn which associates Point with Region.

UML example GIS profile The UML profile mechanism was used to construct the profile above. This profile extends Class with Point and Region stereotypes. It also extends the UML association with an association stereotype called LocatedIn which associates Point with Region. Draw a UML diagram that applies the GIS profile to the car sharing package.

Profile WML Example The Wireless Markup Language (WML) is used to describe content for wireless applications. The Wireless Access Protocol (WAP) is a standard used to deliver Internet content to wireless devices such as mobile phones and Personal Digital Assistants (PDAs). WML uses the metaphor of decks of cards. Assume that a WAP/WML application consists of a single deck. Each deck contains a number of cards; each card displays a screen-full of information on a mobile device. When cards from a deck are transferred to a mobile device, the user can move between cards using a simple next and previous command. The UML profile on the next slide represents WAP/WML functionality.

Part of UML’s core MOF Part of the application domain

Profile WML Example We will describe the roles of the stereotypes used in the WAP package tab, the Application class, and in the Next association. We will also describe the relevant UML extension mechanism.

Profile WML Example The <<profile>> stereotype in the package tab indicates that the package is a profile and package name is WAP. Black arrows indicate that a new class extends the UML metaclasses Class and Association. We do not describe details of higher order UML or MOF. The figure indicates the following stereotypes for classes have been created <<application>>, <<deck>> , <<card>> and the following stereotypes for association have been created <<delivers>> , <<next>> , <<previous>> .

Profile WML Example The next slide shows part of a car sharing system. The semantics of the diagram are as follows. The CarMatchDatabase class represents the complete car sharing database. The CarMatchInformation represents a result set from a database query. Each result set consists of one or more CarMatch objects representing actual car sharing records. CarMatch objects are linked together with two associations called previous and next.

Profile WML Example

Profile WML Example We will draw a diagram showing the application of the WAP profile to the CarSharer package using the following mappings.

Application Profile Mapping CarSharer package WAP profile CarMatchDatabase Application CarMatchInformation Deck CarMatch Card next Next previous Previous delivers Delivers consistsOf ConsistsOf

Profile WML Example Description: Each new stereotype in the WAP profile is applied as appropriate to each class or association in the CarSharer package, as per mapping. The <<apply>> dependency is used to indicate the application of the profile to the package.

Profile Example

Profile Example The extension mechanism extends the metaclass definition of one or more metaclasses Class and Accociation (the original metaclass definitions are still available for normal use). Then when the profile is applied new classes with the new stereotype have the newly defined features. Hence, the CarMatch class has whatever was defined in Card. The stereotypes Application, Deck, and Card are all extensions of the metaclass Class. The stereotypes Delivers, Next and Previous are all extensions to the metaclass Association. The application allows the UML user to avail of previously defined specifications (usually domain specific).

Constraints Constraints are a semantic condition or restriction. They are standard UML feature. They can be expressed in natural language text, mathematically (FOPL + SETS) formal notation, or in a machine-readable language e.g. OCL for the purpose of declaring some of the semantics of a model element. They are used in combination with tagged definitions to define the characteristic of stereotypes in profiles. A constraint defines a relationship between model elements that must be true {subset} { xor} (multiplicity not enough for xor). Constraints can be on attributes, derived attributes, associations and classes.

Tagged values Many stereotyped model elements have properties that cannot be represented graphically. These can defined in the profile as tagged definitions and are shown in the model as tagged values. Tagged values consist of a tag or name and an associated value (e.g. {CoordSystem = LatLong} or Boolean tagged value {abstract} {isPropertyName}). Tagged definitions are the attributes of the stereotypes in the profile and are typically shown in comments attached to the stereotyped model elements.

Tagged values Persistence is shown using a tagged value

Constraints as a tagged Boolean assertion This constraints is represented as a togged Boolean assertions attached to a model element. they are attached to one or more model element this shows a note containing a class constraint