The Unified Modelling Language. Example Diagrams. Notation vs. Methodology. UML and Meta Modelling

Similar documents
Outline. A little history. Outline. The Unified Modeling Language Opportunities and Challenges for Formal Methods

Modelling in Enterprise Architecture. MSc Business Information Systems

UML Modeling I. Instructor: Yongjie Zheng September 3, CS 490MT/5555 Software Methods and Tools

BLU AGE 2009 Edition Agile Model Transformation

Model Driven Architecture - The Vision

Computation Independent Model (CIM): Platform Independent Model (PIM): Platform Specific Model (PSM): Implementation Specific Model (ISM):

Ingegneria del Software Corso di Laurea in Informatica per il Management. Introduction to UML

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

Model Driven Development Unified Modeling Language (UML)

Model driven Engineering & Model driven Architecture

!MDA$based*Teaching*and* Research*in*Software*Engineering*!

Improving Military Information Technology Through Common Conceptual Models

Index. business modeling syntax 181 business process modeling 57 business rule 40

Model Driven Engineering (MDE)

Automation of Semantic Web based Digital Library using Unified Modeling Language Minal Bhise 1 1

Introduction to MDE and Model Transformation

Goals of the Lecture Constraints

METADATA INTERCHANGE IN SERVICE BASED ARCHITECTURE

Model Driven Architecture

Supporting and Applying the UML Conceptual Framework

The Model-Driven Semantic Web Emerging Standards & Technologies

Metamodeling with Metamodels. Using. UML/MOF including OCL

UML 2.0 State Machines

All you need are models Anneke Kleppe, Klasse Objecten

Comparative analysis of MDA tools

Methods for the Development

3rd Lecture Languages for information modeling

Model Driven Architecture and Rhapsody

MDSE PRINCIPLES. Chapter #2

Object Management Group Model Driven Architecture (MDA) MDA Guide rev. 2.0 OMG Document ormsc/

SCOS-2000 Technical Note

Overview of lectures today and Wednesday

CWM: Model Driven Architecture

MDA and Integration of Legacy Systems: An Industrial Case Study

Object Security. Model Driven Security. Ulrich Lang, Rudolf Schreiner. Protection of Resources in Complex Distributed Systems

An introduction to MOF MetaObject Facility.

An Introduction to MDE

ADT: Eclipse development tools for ATL

OMG Specifications for Enterprise Interoperability

Modeling XML Vocabularies with UML: Part I

Reusable Object-Oriented Model

From Object Composition to Model Transformation with the MDA

Modellierung operationaler Aspekte von Systemarchitekturen. Master Thesis presentation. October 2005 March Mirko Bleyh - Medieninformatik

How to Harvest Reusable Components in Existing Software. Nikolai Mansurov Chief Scientist & Architect

Spemmet - A Tool for Modeling Software Processes with SPEM

Model Driven Architecture

UNIT II. Syllabus. a. An Overview of the UML: Visualizing, Specifying, Constructing, Documenting

Introduction to Software Engineering. 5. Modeling Objects and Classes

Sequence Diagram Generation with Model Transformation Technology

Reengineering of Distributed Middleware Systems To a Model Driven Architecture (MDA)

Semantic Web Domain Knowledge Representation Using Software Engineering Modeling Technique

OO Analysis and Design with UML 2 and UP

Model Driven Architecture Targets Middleware Interoperability Challenges

Orthographic Software Modeling A Practical Approach to View Based Development

Raising the Level of Development: Models, Architectures, Programs

OCL Support in MOF Repositories

Towards a Data Consistency Modeling and Testing Framework for MOF Defined Languages

ITBIS393 Web-Based Information Systems

INF5120 Model-Based System Development

Dresden OCL2 in MOFLON

MDSE USE CASES. Chapter #3

bahmanzamani.com Computer Engineering i Dept. University of Isfahan

MDA & Semantic Web Services Integrating SWSF & OWL with ODM

Construction of Complex UML Profiles

Introduction to Dependable Systems: Meta-modeling and modeldriven

CHAPTER 1. Topic: UML Overview. CHAPTER 1: Topic 1. Topic: UML Overview

UML big picture. Perdita Stevens. School of Informatics University of Edinburgh

Formal Methods for Software Engineers

Chapter 1: Principles of Programming and Software Engineering

Introduction to UML. (Unified Modeling Language)

Metamodeling. 16. April 2012 Real-Time Systems Lab Prof. Dr. Andy Schürr Dr. Gergely Varró 1

A UML 2 Profile for Variability Models and their Dependency to Business Processes

Principles of Software Construction: Objects, Design and Concurrency. Just enough UML. toad

AADL Graphical Editor Design

CSSE 490 Model-Based Software Engineering: Introduction to Domain Engineering

Chapter 8 The Enhanced Entity- Relationship (EER) Model

Applying UML to System Engineering Some Lessons Learned Murray Cantor Principal Consultant

11 Model-Driven Architecture

Software Engineering from a

Modeling Databases Using UML

Current trends and frameworks for modeldriven approaches to software development

Model-Driven Architecture

Defining Domain-Specific Modeling Languages

Towards 2D Traceability

Executive Summary. Round Trip Engineering of Space Systems. Change Log. Executive Summary. Visas

An Ontological Analysis of Metamodeling Languages

ROLE OF OCL AND ITS SUPPORTING TOOLS IN REQUIREMENT SPECIFICATION

Small is Beautiful Building a flexible software factory using small DSLs and Small Models

An Open Modeling Infrastructure. Olaf Kath Marc Born

UMLexe UML virtual machine

Chapter 8: Enhanced ER Model

Unified Modeling Language (UML)

SUMMARY: MODEL DRIVEN SECURITY

MDD with OMG Standards MOF, OCL, QVT & Graph Transformations

UML PROFILING AND DSL

WHY WE NEED AN XML STANDARD FOR REPRESENTING BUSINESS RULES. Introduction. Production rules. Christian de Sainte Marie ILOG

Model-Driven QoS Provisioning Techniques for CCM DRE Systems

Tools to Develop New Linux Applications

Introduction to Software Engineering 10. Software Architecture

A COMPARATIVE ANALYSIS TO VALIDATE THE BENIFITS OF FORMAL VERSUS INFORMAL SOFTWARE MODEL TRANSFORMATION

Transcription:

UML and Meta ling Topics: UML as an example visual notation The UML meta model and the concept of meta modelling Driven Architecture and model engineering The AndroMDA open source project Applying cognitive dimensions to assist in designing a UML tool How to mitigate some of the problems inherent in UML The Unified ling Language Notation(s) for describing object oriented models can be used for describing implementations, designs, and analyses incorporates and extends elements from several earlier modelling notations early development primarily by Rational Software Inc (now owned by IBM), but now developed by OMG (UML 2.0 in process of release) Has a variety of diagram types expressing both static and dynamic aspects class diagrams package diagrams use cases sequence and collaboration (now called communication) diagrams state & activity diagrams etc (12 diagram types in all) Plus Object Constraint Language (OCL) for expressing more complex constraints Sources: UML Distilled, Martin Fowler, Addison Wesley UML specifications from http://www.uml.org/ COMPSCI 732 4. UML and Meta ling 1 COMPSCI 732 4. UML and Meta ling 2 Notation vs. Methodology UML is a set of notations Used to model OO systems Define a set of overlapping models using the various diagrams each expressing a different view or viewpoint on the system modelled Described by a meta-model ie a model to describe a model Example Diagrams But also need to know how to go about constructing a model i.e. a methodology for using the notation Eg RUP Rational Unified Process Will primarily look at UML notation, rather than modelling methodologies, but will touch on Driven Architecture approach Source; http://www.sparxsystems.com.au/uml_tutorial.htm COMPSCI 732 4. UML and Meta ling 3 COMPSCI 732 4. UML and Meta ling 4

Diagram Perspectives Diagrams are used for multiple purposes with different semantics When interpreting them you need to know the perspective being used Eg Class diagrams Conceptual diagram represents concepts in domain may or may not relate to implementation classes typically used in analysis Specification software interfaces, i.e. types rather than classes typically used in design and documentation Implementation laying bare implementation details only occasionally used for detailed understanding COMPSCI 732 4. UML and Meta ling 5 Constraints Much of UML is about specifying constraints: eg relationship between things, multiplicity of associations, exclusivity of subclasses A variety of keyword based constraints are included in UML subtypes: {complete} {incomplete} {disjoint} {overlapping} association ends or attributes: {ordered} {unordered} {sorted} {changeable} {addonly} {frozen} timing of messages (standard functions) starttime stoptime executiontime Additional textual constraints can be specified informally using notes But more formal constraints can be specified using the Object Constraint Language (OCL) COMPSCI 732 4. UML and Meta ling 6 OCL A formal language Pure expn language - uses a declarative style specifies constraint, not what to do if violated side effect free strongly typed Used to specify, eg, pre and post conditions on operations and invariants, eg: context Company inv enoughemployees : self.numberofemployees > 50 context Company::setCreditLimit(limit: int) pre: limit >= 0 post: creditlimit >= 0 constraints on navigation of associations Also used to specify UML meta-model semantics (see later) UML meta-model Need a formal specification of UML s syntax and semantics to allow: uniform understanding of what models mean tool makers to design UML tools that implement semantics consistent with those of other tools interchange of models between tools (by specifying interchange formats) Such a formal specification is a meta-model as it describes the form that its instances (individual UML models) can take But how do we specify the meta-model? Answer (simple): Use UML to define itself Answer (complex): Define the UML meta-model using a metamodelling language. COMPSCI 732 4. UML and Meta ling 7 COMPSCI 732 4. UML and Meta ling 8

UML specification The formal UML specification is at http://www.uml.org/ Core Backbone This does not specify the exact surface syntax for UML (ie exact icons etc), rather it specifies UML in an abstract syntax-like form The specification makes extensive use of UML diagrams (particularly class diagrams) supplemented by OCL for more detailed semantics. The definition is in terms of packages defining common and more specialised diagram components/concepts (the following is UML 1.5 these have changed in UML2.0) eg Core Backbone package defines fundamental concepts eg Core Classifiers package defines entity-like things (eg classes, interfaces) eg State Machines package defines extensions to cover state diagrams COMPSCI 732 4. UML and Meta ling 9 COMPSCI 732 4. UML and Meta ling 10 Core Classifiers Meta-meta-modelling Although it appears as if UML defines itself, this is not actually the case. The specification actually uses a meta-modelling language this is itself object oriented and has many concepts in common with UML called Meta Object Facility (MOF) common with OMG CORBA IDL specification work also used for the Common Warehouse Metamodel (CWM) But how is this meta-modelling language specified? Answer: using itself (defining a meta-meta-model) COMPSCI 732 4. UML and Meta ling 11 COMPSCI 732 4. UML and Meta ling 12

4 Layer 4 layer model This approach leads to a four layer approach to the modelling meta-meta-model (M3): defines the MOF notation meta-model (M2): defines UML notation using MOF user model (M1): a UML model of a particular problem domain data (M0): typical objects instantiating the UML model Note: could use M3 instead to define M2 for ER modelling; M1 a typical ER model; M0, typical ER data. Typical examples of elements at each level: M3: MOF MetaClass M2: UML Class, instance of MOF Class; very similar to MOF concept of a Class M1: Person, a typical instance of UML Class M0: President:Person, a typical instance of Class Person From C. Atkinson, Supporting and applying the UML conceptual framework. MetaClass issingleton : Boolean isvisible() isactive : Class Person Boolean name : String birth_date: Integer address : String age() : Integer President:Person name = "Bill Clinton" birth_date = 1952 address = "White COMPSCI 732 4. UML and Meta ling 13 COMPSCI 732 4. UML and Meta ling 14 Advantages of meta modelling Consistency of interpretation using more formal semantics Although MOF approach not nearly as unambiguous as other specification approaches Possibility of interchange standards based on meta model specification Can interchange models between tools XMI is the defined interchange standard based on MOF Essentially MOF in XML (makes for verbose interchange files) Can use meta models as schema for semantic data to be stored in a repository Can define extensions that reuse parts of the existing model Eg did this with our DPML work (see later) Can use meta models to specify tools If have appropriate tool building tools can generate the tool from the meta model (this is what we do with our JComposer and Pounamu tools) or a system from a model (MDA approach) See www.metamodel.com COMPSCI 732 4. UML and Meta ling 15 Driven Architecture (MDA) Generate systems from models (see http://www.omg.org/mda/) Start with Platform Independent (UML) (PIM) Generate a Platform Specific (UML) from PIM Generate implementation from PSM Platform- Independent CORBA CORBA Java/EJB XML/SOAP Java/EJB XML/SOAP Other Map a PIM to Many Middleware Technologies via OMG Standard Mappings Other Map PSM to application interfaces, code, GUI descriptors, SQL queries, etc. COMPSCI 732 4. UML and Meta ling 16

Example MDA system AndroMDA http://www.andromda.org/ open source code generation framework follows the Driven Architecture (MDA) paradigm. takes PIm model(s) from CASE-tool(s) and generates fully deployable applications and other components. Currently limited to J2EE PSMs Uses concept of a cartridge which defines the PIM->PSM translation for a given PSM MDA Critique Example of model engineering : treats software development as a set of transformations between successive models MDA specializes model engineering by using MOF and associated UML models. Relies on UML Profiles which are specified using MOF PSMs are likely to be very difficult to construct hard enough to program in J2EE or.net by hand Problem of debugging generated code Domain oriented programming where you generate systems from domain specific languages is more likely to provide real advantage See Pounamu and other meta tools shortly From D.Thomas, MDA: Revenge of the ers or UML Utopia, IEEE Software May-June 2004 COMPSCI 732 4. UML and Meta ling 17 COMPSCI 732 4. UML and Meta ling 18 Towards UML Evaluation How would we go about evaluating UML? As a notation or set of notations? As an adjunct to a methodology such as RUP? Could conduct experiments with user populations Eg survey based approach Need careful experimental design with hypotheses to test Eg people do not use notational element X because of Y Could use cognitive dimensions to evaluate notation But needs to be done in the context of a particular environment (ie a UML tool such as Rational Rose) Also difficulties as really a set of notations Could turn problem around and look at requirements for a UML tool based on Cognitive Dimension framework (6.1 of CD paper) Requirements for a UML tool Abstraction gradient Will always be high for UML as it is a very rich collection of notations Could minimise by offering subset of notation to novice users Hidden Dependencies & Visibility Multiple diagrams with multiple notations Strong need for consistency between diagrams, but this leads to many hidden dependencies Could offset by navigation tools to move rapidly between elements that are being kept consistent (partial remedy see CD paper) Viscosity Key issue here is insertion and deletion of new elements and how this affects consistency management Also automatic layout considerations, direct versus dialog box editing etc Many of these issues are UI related rather than notational COMPSCI 732 4. UML and Meta ling 19 COMPSCI 732 4. UML and Meta ling 20

Requirements for a UML tool Closeness to mapping Appears to be good for class and interaction diagrams and poss package diagrams Other types of diagram are typically less used by programmers. Poss this is due to difficulty in mapping to eventual implementation in programmer s mind Depends critically on designer s background Support for refinement from conceptual->implmn Progressive evaluation UML is not executed in the same way as other VLs Issues here with code generation (of stub classes) Regeneration after user additions to stub classes Simulation of sequence diagrams? Support for refinement from conceptual->implmn Requirements for a UML tool Premature Commitment Many issues here Eg need for a class before adding a method or association (dangling association) Support for refinement from conceptual->specn->implmn Layout having to decide a generalisation is likely to occur and allow space for it to avoid re-laying diagram out Error proneness A likely problem here is the overloaded use of the notations for conceptual, specification, & implementation Could minimise by appropriate diagram annotation to indicate perspective (not done in any of the tools that I am aware of, but could be considered part of MDA initiative) COMPSCI 732 4. UML and Meta ling 21 COMPSCI 732 4. UML and Meta ling 22 Requirements for a UML tool Consistency Some difficulties due to multiple notations Strong attempt made to reuse elements in multiple diagrams (eg class, object notation in sequence and interaction diagrams) However areas where notations is strongly different (eg operations in class diagrams versus seq diagrams, state diagrams) Crossing to completely dissimilar notations (eg state or activity diagrams) creates a significant consistency hurdle Some difficulties also due to multiple perspectives Summary UML is a big and general purpose set of visual notations Causes difficulties that need mitigation in tool design It has wide adoption as the lingua franca for software design Hence reduces closeness of mapping issues software designers brought up with UML Introduced the concept of meta modelling For defining semantics of UML As a more general purpose approach to high level modelling As the basis of tool generators As the basis for model driven design Next lecture introduce the Pounamu meta tool COMPSCI 732 4. UML and Meta ling 23 COMPSCI 732 4. UML and Meta ling 24