UML Meta Models II Unification of Static and Dynamic Semantics - PowerPoint PPT Presentation

1 / 54
About This Presentation
Title:

UML Meta Models II Unification of Static and Dynamic Semantics

Description:

The meaning of a model written in UML must be expressed to be understood by users. ... a Model Element that defines a set of definitions (or rules) according to which ... – PowerPoint PPT presentation

Number of Views:109
Avg rating:3.0/5.0
Slides: 55
Provided by: ise2
Category:

less

Transcript and Presenter's Notes

Title: UML Meta Models II Unification of Static and Dynamic Semantics


1
UML Meta Models II-Unification of Static and
Dynamic Semantics
  • A Study in redefining the Semantics of the UML
    using the pUML OO Meta Modeling Approach
  • Anneke Kleppe and Jos Warmer
  • Klasse Objecten
  • http//www.klasse.nl

2
Objectives
  • The static and dynamic viewpoints on the system
    can not be separated.
  • The meaning of a model written in UML must be
    expressed to be understood by users.

3
Same Semantics for Different Views
4
4 Layered Meta Model Again!
5
KernelPackage
6
(No Transcript)
7
Core.model.concepts Package I
  • Model Element
  • a part of a specification or model in UML
  • Container
  • a Model Element that is able to contain other
    Model Elements.
  • Classifier
  • a Model Element that defines a set of definitions
    (or rules) according to which Values can be
    classified.

8
Core.model.concepts Package II
  • Definition
  • a definition of an aspect of a Value.
  • Synonyms Rule, Property, Feature.
  • Immutable Type
  • a definition of Values that are immutable.
  • Role
  • a classifier, therefore a set of rules, including
    an instance of this type is mutable, and an
    instance of this type may have references to
    other instances

9
Core.model.concepts Package III
  • Name
  • a reference. (Needs to be instantiated in order
    to pick one UML variant.Usually it takes the form
    of a string type.) SynonymVariable.

10
Well-Formedness Rules
  • Uniqueness of names
  • No circular inheritance
  • A generalizable element must confirm to its
    paprents

11
(No Transcript)
12
Definitions in core.instance Package
  • Domain Element
  • an element that can be reasoned about (specified,
    modeled) using the UML.
  • Local Snap shot
  • a collection of Name Value Bindings for a certain
    Mutable Value at a certain point in time.
  • Name Value Binding
  • a combination of a Name (reference) and a Value

13
(No Transcript)
14
Definitions of core.instance II
  • Value
  • a Domain Element that represent some of the
    elements of the world that can be modeled in UML
  • Mutable Value
  • a Value that has slots of which the value may
    change.
  • Immutable Value
  • a Value that cannot change, or be changed.

15
Definitions of core.instance III
  • Null Value
  • a Value that represents void (null, nil).
  • Object
  • a Mutable Value that has a state, represented in
    a Local Snapshot, and is able to change that
    state thereby creating a new Local Snapshot.

16
Well Formedness Rules
  • A name value binding contains name and value
  • A mutable value contains its snapshots
  • History of an object is ordered.
  • Slot values of a local snapshot of a mutable
    value may not contain the local snapshot self
  • Additional Operations
  • allPredecessors( )
  • The collection of all previous snapshots

17
Core Semantics Package
18
Core.semantics Package
  • Class a mutable value that represents a role
  • confirmsTo() is as in pUML metamodel.

19
(No Transcript)
20
The Features Package
  • StructFeatureDef a definition of a feature that
    will not execute and/or change state.
  • DynFeatureDef a definition of a feature that may
    execute and may change state.
  • InvariantDef a definition of a rule, mostly
    based on structural features.
  • ParamDef a definition with a Parameter Direction
    Kind, that can be actualized by an actual
    parameter.
  • ParameterDirectionKinda definition of an
    enumeration that denotes if the parameter is used
    for supplying an argument and/or for returning a
    value.

21
TheImmutablesPackage
22
Definitions in Immutables
  • CollectionType
  • a type that defines values that can hold other
    values.
  • DataType
  • a classifier, therefore a set of rules,
    including, an instance of this type is immutable,
    and an instance of this type has no references to
    other instances
  • EnumerationType
  • a type that defines a limited set of values.

23
(No Transcript)
24
immutables.semantics
25
The Associations Package
26
Why only Unary ?
27
Why Only Unary ? - Explanation
  • A one way association to be a restriction of a
    two way association where one is the inverse of
    the other.
  • Consider the previous diagram. The definition is
    recursive. Hence defining inverse is difficult

28
The Associations Package
  • Unary Association
  • a structural feature that can be used to
    reference another mutable value
  • Hence, type can only be a role, or a collection
    type
  • Multiplicity Kind
  • An indication of the number of elements in the
    collection of the unary association.

29
Well-formedness Conditions
  • When the multiplicity is zero or one
  • the type of a unary association is equal to its
    associated classifier.
  • When the multiplicity is zero to many, or one to
    many,
  • The type of a unary association is equal to the
    pre-defined type set, and this set has as element
    type the role of the unary association.

30
(No Transcript)
31
The Action Package - I
  • Action Expression
  • a model element with indicating a value, or an
    action.
  • Feature Ref
  • a reference or a call to a definition
  • Primitive Action
  • an action that specifies a change of the snapshot
    of the mutable value that executes the action

32
The Action Package - II
  • Data Value Exp
  • an expression of data values and operations.
  • Create Object Action
  • an expression specifying a change of the snapshot
    of a class so that the slot new contains a new
    object- an instance of that class.
  • Read Action
  • an expression that specifies a certain value.
  • Write Action
  • an action that specifies a change of the value.

33
(No Transcript)
34
(No Transcript)
35
Compound Actions Package
  • Idea Add
  • Loops, Conditional actions, Group actions
  • All sub-actions of a compound action are executed
    by the same object.
  • Form the Paper
  • Making UML Activity Diagrams Object-Oriented
    Tools Europe 2000

36
(No Transcript)
37
(No Transcript)
38
(No Transcript)
39
The Messaging Package
  • Every object is extended with an input and an
    output queue,
  • both of which may contain signals.
  • Two new subclasses of Primitive Action
  • SendAction
  • puts a signal in the output queuea
  • ProcessSignalAction.
  • takes a signal out of the input queue.

40
(No Transcript)
41
message.instance.concepts Package
  • Bus
  • a transport mechanism that transports signals
    from output queue to input queues.
  • Signal Instance
  • an occurrence of a signal.
  • SendSignalExec
  • Execution of the sending of a signal, i.e.
    putting a signal with its content in the out-put
    queue
  • ProcessSignalExec
  • Execution of the receipt of a signal, i.e.
    taking a signal with its content from the input
    queue

42
(No Transcript)
43
message.signal.semantics Package
44
(No Transcript)
45
Self Description and OCL-some known problems-
  • Predefined OCL operations (oclIsTypeOf, includes,
    etc.) are not defined in this meta model, but
    will be fixed in OCL 2.0
  • Some symbols are overloaded, such as
  • roles use the class symbol
  • Inheritance symbol for parent-child relationship
  • Association symbol for associations between roles
    etc.

46
State Machines
  • For statechart diagrams
  • This view point is not compatible with the
    thinking
  • the object has a state machine, OR
  • the objects state machine does
  • Two options
  • Either the state machine is an attribute of the
    primary object.
  • it is equal to the primary object This option is
    taken

47
State Machines
48
Well Formedness Rules
  • The test of a Transition is an AND combination of
    its guard, and its from-State.
  • The result-type of the state must be of Boolean
    type.
  • Only roles may have states.
  • The to and from states of a transition must
    belong to the same class as the transition.

49
State Machine Instance Package
50
State Machine Instance Package
  • The test of a Transition-Exec checks whether the
    signal-Instance is in the input queue of its self
    object.
  • The sub-action of a Transition-Exec is a
    Conditional-Action-Exec.
  • A Transition-Exec may only be executed by a
    mutable value that has a role that has states for
    which transitions are defined.

51
(No Transcript)
52
More on Statecharts
  • The stateMachine package could have been defined
    without introducing the concepts State and
    Transition.
  • How?
  • rewriting of the well-formedness rules to apply
    to the parent concepts
  • Invariant-Def AND
  • Conditional-Action.

53
Sequence and Collaboration Diagrams
  • Interaction diagrams show messaging, form the two
    syntaxes for the messaging package.
  • Both of the interaction diagrams show items on
    the instance level.
  • Only a collaboration diagram may also be used as
    a model diagram, when it is used for role
    modeling.

54
Sequence and Collaboration Diagrams
  • Need to establish a relation between
  • messaging package AND
  • Graph-Symbols package on two levels
  • Why two levels?
  • Once, for the role modeling of collaboration
    diagram,
  • To the model sub-package of messaging
  • At the level of the Instance Sub-package for
  • Sequence diagrams
  • Collaboration diagrams
Write a Comment
User Comments (0)
About PowerShow.com