Top Banner
Metamodel Global view
21

Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Dec 17, 2015

Download

Documents

Ronald Tate
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Metamodel

Global view

Page 2: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Some sources

Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000

Page 3: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.
Page 4: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Meta-model Capitalization

A meta-model defines concepts and their relationships thanks to a class diagram.

A meta-model only defines structure (no semantic).

A model is an instance of a meta-model if it respects the structure defined by the meta-model.

The UML meta-model defines the structure that all UML models must have.

+name

Use Case

+name

Actor

+name

System

1

*

+participate

*

*

+super

0..1

+include*

*

*

+extend

0..*

Client

Add Order

PetStore

Buy

Page 5: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Another Example:UML metamodel in the 4

Layer

Page 6: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Points to Ponder Can we create a new version of UML, in

consideration of the following?

M3

M2

M1

M0

Meta-metamodeling abstract language specific paradigm

(e.g., OO) application independent

Metamodeling abstract language specific paradigm (e.g., OO) application specific

process or notation modeling, etc.

Modeling concrete language specific paradigm (e.g., OO) specific model

describes the data needed

Information applied in "real world" specific paradigm (e.g., OO) specific project

MetamodelingArchitecture

Examples

USPM(RUP)

metamodel

MOF standard(OO paradigm)

RUPmodel

UMLstandard

ProjectX

Process

standard

ProjectX

Artifacts

UMLmetamodelstandard

MetaClass, MetaAttribute, MetaOperation

Class, Attribute, Operation, Component

StockShare, owner, askPrice

hacsSoftwareCoShare99, smartie, 11.18

Page 7: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Meta-meta-model

MOF defines the language for defining meta-models

MOF concepts are meta-class, meta-attribute, meta-association, etc.

MOF concepts and their relationships can be defined by a class diagram. This diagram is also a meta-model (called the meta-meta-model)

The meta-meta-model is self defined.

+name

Class

+name

Package

+name+multiplicity

Attribute

Type

1 *

1

*

*

+import

*

*

+super

0..1

1

+type

*

DataType

String Integer Boolean

+name

Association+name+multiplicity

AssociationEnd

1 2

1

* *

-type 1

-name

Operation

+direction

Parameter

1*

1*

Page 8: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Meta-layers Capitalization

MOF

UML

ModèleModèleModèle

Meta-meta-model

UMLUMLMeta-model

Model

Mn+1 defines the structure of Mn

Mn+1 is not an abstraction of Mn

Meta-layer relationships are similar to grammar-layer relationships (BNF, or XML Schema)

Page 9: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Infrastructure: Consolidation of Concepts

NamespaceNamespaceNamespaceNamespace PackagableElementPackagableElementPackagableElementPackagableElement RedefinableElementRedefinableElementRedefinableElementRedefinableElement

ClassifierClassifierClassifierClassifier FeatureFeatureFeatureFeature

Page 10: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Infrastructure: Behavior Harmonization Common semantic base for all behaviors Choice of behavioral formalism driven by application

needs

ClassifierClassifier

. . .. . .ClassClassClassClass UseCaseUseCaseUseCaseUseCase ComponentComponentComponentComponent

BehaviorBehavior0..10..1 0..*0..*

ActionActionActionAction ActivityActivityActivityActivity StatemachineStatemachineStatemachineStatemachineInteractionInteractionInteractionInteraction

Page 11: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Classifier & Class

Page 12: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Common component paradigm

cd component

Component

- kind: ComponentKind = COMPOUND

Port

Part

«enumeration»ComponentKind

+ COMPOUND: + ELEMENTARY: + REPETITIVE:

Vector

factorization::Multiplicity

Connector

*+connector

1

+owner

0..1

+multiplicity

*+part

1+owner

1+type

0..1+multiplicity

*

+port

1

+owner

ComposingAssembling

Encapsulation

Repetition of structural elements

Page 13: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

UML2.0 Component

Interface

Class

Component Realization

Classifier

+/provided

*

+/required* *

+abstraction

1

+realization

*

+realizingClassifier1

Port

StructuredClassifier

EncapsulatedClassifier Interface

ConnectableElement StructuralFeature

0..1

+ownedPort

**

+/required

*

* +/provided *

Classifer

StructuredClassifier

NamedElement

ConnectableElement

Property

Connector

0..1

+/part *0..1

+ownedConnector

*

*

+/node

*

0..1

+ownedAttributs

*

:Order

:Product

:Service

:ShopingCart

:BackOrder

:Organization

:Customer

Page 14: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Object Constraint Language

OCL defines the structure of models expressing constraints Invariant, Pre-post conditions

OCL is a meta-model instance of the MOF

OCL is highly coupled with UML

The OCL semantic is defined with models (operation without side effect )

OCL defined a concrete syntax

Capitalization

PropertyCallExp

>

Literal

-1000ModelPropertyCall

amount

Class

+balance

BankAccount{context BankAccount inv: balance > -1000}

Constraint

Expression

ExpressionInOcl OclExpression

ModelElement

* * 1*

**

Page 15: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Action Semantics

AS defines the structure of models expressing sequences of actions

AS was a meta-model and is now completely integrated in UML2.0

AS has no concrete syntax (UML diagram)

The semantic of AS is not formally defined (an RFP is published)

Capitalization

CreateObjectAction WriteStructuralAction

Pin

CallOperationAction

+credit()

+balance

BankAccount

cb

100 10

Page 16: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Template

Model transformation is a template written in a dedicated language

Productivity

PetStore PetStoreEJB

UML EJB

Template

Interpretor

UML2EJBTemplate

Page 17: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.
Page 18: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Collaboration

Page 19: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Models & Traceability

A model is an abstraction of a system, specifying the system from a certain viewpoint and at a certain level of abstraction

Page 20: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Model & System Hierarchy

Models and subsystems can be combined in a hierarchy:

Page 21: Metamodel Global view. Some sources Object Modeling with UML: Advanced Modeling, Karin Palmkvist, Bran Selic, and Jos Warmer, March 2000.

Stereotype Notation