190 likes | 309 Views
UML Profile. By raef mousheimish. Background. Model is a description of system or part of a system using well-defined language . Software models provide abstraction of systems which help deal with large and complex application .
E N D
UML Profile By raef mousheimish
Background • Model is a description of system or part of a system using well-defined language. • Software models provide abstraction of systems which help deal with large and complex application. • UML(Unified Modeling Language) is the most widely used modeling language. • UML is a general-purpose language which can be applied in all application domain and implementation platform.
4 layered Conceptual Architecture. Example Scenario • M0: • M1: • M2: • M3:
Motivation • A general-purpose language(UML) cannot describe applications of specific domain. • Two possible solutions: • Introduction of new language, e.g. CWM • Extension of the existing UML syntax and semantics, e.g. UML PROFILE • But.. New modeling language can not be supported by the commercial UML tools.
UML Profile • UML profile package defines a set of UML artifacts that allow the specifications of an MOF model • These artifacts deal with the specific concepts and notations for particular application domain and implementation platform. • Profiles do not extend the UML meta-model. They are also called the UML light-weight extension mechanism • UML profiles have three basic mechanisms: • Stereotypes • Constraints • Tagged value
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
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 • A constraint defines a relationship between model elements that must be true
Two tagged values {author = “Bob”, Version = 2.5} Employee name address Tagged Values • Many stereotyped model elements have properties that cannot be represented graphically • These can be 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})
So, What is the benefit of using UML Profiles • A Profile conforms to the meta-model of the UML • Because it 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. • UML Profile is highly important in the MDE process, precisely in the transformation from a model to another one. Standard UML Semantics MetaModel Profile
Why 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
How to build a UML Profile • Profiles available in CASE tools such as Poseidon, ArgoUML, Rational Rose.
Scope of UML Profiles «profile» Java «import» «profile» EJB «profile» CORBA «profile» EAI «profile» SPEM «profile» Real-Time «profile» Telecom
JAVA’s EJB Profile profile Abstract stereotype Extension link stereotype Metaclass reference constraint Attribute = Tagged value
Profile’s position within the UML2/MOF2 architecture Superstructure Infrastructure
An Example of a Profile • We would like to create a UML profile for representing basic GUI components • We suppose that our GUI contains the following components: • Forms (which can also be dialog boxes) • Buttons • Constraints: • A form can invoke a dialog box • A form as well as a dialog box can contain buttons
The GUI Profile Package Class and Association are part of UML meta-model GUI Profile Class Association <<stereotype>> Form <<stereotype>> Button <<stereotype>> Invokes <<stereotype>> Contains <<stereotype>> DialogBox
<<Form>> MainView 1 <<Invokes>> 1 <<DialogBox>> OpenDialogBox 1 1 <<Contains>> <<Contains>> 1 1 <<Button>> OkButton <<Button>> CancelButton Instance Diagram of the GUI Profile
Thank You By raef mousheimish