Sie sind auf Seite 1von 21

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 System


+name
and their relationships thanks to a
class diagram.
1
* *
A meta-model only defines *
+super 0..*
structure (no semantic). Actor +participate Use Case
*
0..1 +name +name +extend
A model is an instance of a meta- *

model if it respects the structure * +include


defined by the meta-model.
The UML meta-model defines the
structure that all UML models
PetStore
must have.
Add Order

Client Buy
Another Example:
UML metamodel in the 4 Layer
Points to Ponder
Can we create a new version of UML, in
consideration of the following?
Meta-metamodeling
abstract language MOF standard
specific paradig m M3 (OO paradigm)
(e.g., OO) MetaClass, MetaAttribute, MetaOperation
application independent

Metamodeling
abstract language USPM UML
specific paradig m (e.g., OO) M2 (RUP) metamodel Class, Attribute, Operation, Component
application specific metamodel standard
process or notation
modeling, etc.

Modeling
StockShare, owner, askPrice
concrete language RUP UML
M1
specific paradig m (e.g., OO) model standard
specific model
describes the data needed

Information
hacsSoftwareCoShare99, smartie, 11.18
Project Project
applied in "real world"
M0 X X

specific paradig m (e.g., OO)
Process Artifacts
specific project
standa
rd
Metamodeling Examples
Architecture
Meta-meta-model

MOF defines the language Attribute


+name

for defining meta-models +multiplicity


1

MOF concepts are meta- Parameter


*

class, meta-attribute, meta- +direction +type Type

association, etc. *1
*

Operation
MOF concepts and their -name
1

relationships can be defined Package *


1
Class DataType

by a class diagram. This +import


+name
1 *
+name
0..1

* +super
diagram is also a meta- * 1 -type * 1

model (called the meta- String Integer Boolean

meta-model) *
*

AssociationEnd
Association
The meta-meta-model is +name
1 2
+name
+multiplicity

self defined.
Meta-layers Capitalization

Mn+1 defines the MOF


Meta-meta-model
structure of Mn
Mn+1 is not an
UML
UML
abstraction of Mn UML
Meta-model
Meta-layer relationships
are similar to grammar-
Modle
Modle
layer relationships Modle Model
(BNF, or XML Schema)
Infrastructure: Consolidation of
Concepts

Namespace PackagableElement RedefinableElement

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

0..1 0..*
Classifier Behavior

Class UseCase Component ... Action Activity Interaction Statemachine


Classifier & Class
Common component paradigm
cd component

enumeration
ComponentKind

+ COMPOUND:
+ ELEMENTARY:
+ REPETITIVE:

+owner Component Port


+owner +port
Encapsulation
1 - kind: ComponentKind = COMPOUND
1 *

+type 1
+owner 1

+connector * +part * +multiplicity 0..1

Vector
Connector Part
+multiplicity factorization::
Multiplicity Repetition of
0..1 structural
elements

Assembling Composing
UML2.0 Component Class

Interface +/provided Component +abstraction +realization Realization

* 1 *

* +/required *

Classifer NamedElement
1 +realizingClassifier

Classifier

+/node
ConnectableElement

* :BackOrder
*

StructuredClassifier +ownedAttributs
Property
0..1 *

0..1 0..1
+/part * :ShopingCart :Order :Customer

+ownedConnector Connector

ConnectableElement StructuralFeature :Service :Organization


StructuredClassifier

:Product

+/required
EncapsulatedClassifier +ownedPort Port Interface

* *
0..1 *

* +/provided *
Object Constraint Language Capitalization

ModelElement Constraint

OCL defines the structure of * *


*
1

models expressing constraints Expression

Invariant, Pre-post conditions


OCL is a meta-model instance Class
of the MOF ExpressionInOcl OclExpression

OCL is highly coupled with * *

UML
The OCL semantic is defined BankAccount
{context BankAccount
with models (operation without +balance inv: balance > -1000
}
side effect )
PropertyCallExp
OCL defined a concrete syntax >

ModelPropertyCall Literal
amount -1000
Action Semantics Capitalization

AS defines the structure of


models expressing CreateObjectAction WriteStructuralAction CallOperationAction

sequences of actions
Pin

AS was a meta-model and


is now completely
integrated in UML2.0
100 10

AS has no concrete syntax


(UML diagram) cb

The semantic of AS is not


formally defined (an RFP is
BankAccount
published) +balance
+credit()
Template Productivity

Model transformation is a template written in


a dedicated language

UML EJB
UML2EJB
Template

PetStore Template PetStore


Interpretor EJB
Collaboration
Models & Traceability

A model is an abstraction of a system, specifying the system from a certain


viewpoint and at a certain level of abstraction
Model & System Hierarchy

Models and subsystems can be combined in


a hierarchy:
Stereotype Notation

Das könnte Ihnen auch gefallen