Dynamic Metamodel and Statecharts - PowerPoint PPT Presentation

1 / 47
About This Presentation
Title:

Dynamic Metamodel and Statecharts

Description:

Classes and attributes are the only instantiable objects. ... association between attribute and slot is a specialization of the one between ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 48
Provided by: ise2
Category:

less

Transcript and Presenter's Notes

Title: Dynamic Metamodel and Statecharts


1
Dynamic Metamodel and Statecharts
  • Contents of
  • A Proposal of a Dynamic Core for UML
    Metamodelling with MML by G. Reggio and E.
    Astesiano
  • Metamodelling Behavioral Aspects the Case of the
    UML State Machines by G. Reggio
  • Available at ftp.disi.unige.it/persons/ReggioG

2
Differences from Other Proposals
  • Influenced by work from labeled transition
    systems.
  • Has influenced the work of Warmer-Kleppe
    metamodel.
  • Builds on a (hacked) version of the pUML
    metamodel.
  • More closer to standard logical descriptions.

3
  • All objects have identities
  • Expressions
  • not instances (as in MML).
  • a separate package.
  • not necessarily constraints
  • Two new packages
  • Local Actions
  • To model messages
  • Labeled Tran. Diagrams
  • to model Statecharts and use cases
  • no sequence diagrams

4
  • Makes a difference between virtual objects and
    instantiable objects
  • Classes and attributes are the only instantiable
    objects.
  • Attribute is a specialization of container, but
    not classifier

5
(No Transcript)
6
Semantics Well-formedness
  • Two object values are different if their names
    are different
  • All states of a life must be from the same object
  • All instances of StaticObjectState must be lives
    of objects of the same class.

7
core.semantics Package
  • Use state instead of instance (only a naming
    difference)
  • Object state is a mapping of attributes to slots,
    and slots have value, a virtual entity.
  • Authors claim that instance of an attribute is
    not clear.
  • StaticObjectMeaning
  • all possible lives of some object
  • a single life is an ordered sequence
  • Hence
  • meaning of an object collection of all possible
    lives
  • Next diagram show how an object can go from any
    state to any other state without further
    constraints.

8
(No Transcript)
9
(No Transcript)
10
Semantics
  • Stereotype ltltinductivegtgt means
  • association between attribute and slot is a
    specialization of the one between classifier and
    meaning
  • Associations are commutative. I.e.
  • c.attributes.semantics c.semantics.attributes
  • Methods
  • attribute gives all methods of a class

11
(No Transcript)
12
(No Transcript)
13
Differences
  • DataValue is a refinement of Value, instead of
    instance
  • Admits bags, sets and sequences
  • Sets and bags must be constructed from the same
    type of objects.
  • Have an expression package to evaluate (MML/OCL)
    expressions.

14
(No Transcript)
15
Notes on Expressions
  • Every expression is evaluated in a context
  • ltltmonotonicgtgt requires that the context of every
    sub-expression is the same as an expression
  • Why association has multiplicity 1 at the
    classifier end.
  • Have well-formedness rules to ensure type
    correctness

16
(No Transcript)
17
(No Transcript)
18
Differences
  • Semantic interpretations of expression associates
    bindings of free variables with values
  • Calc is evaluating the value of the expression
    taking
  • ltbinding, states, valuegt
  • Calc is a refinement of meaning and not a
    refinement of instance.

19
The Dynamic Core Package
  • Earlier stuff were changes made to the Static
    Core so that Dynamic Core can be defined

20
(No Transcript)
21
(No Transcript)
22
Semantic Domains
  • Active object one that has a unique thread
  • The meaning of an active object is a labeled
    transition system (LTS)
  • LTS is characterized by
  • States (states of active objects)
  • Labels (not further specified)
  • Transitions
  • (source state, label, target state)

23
dynamic.core.semantics
24
Issues
  • Generalization of LTSs are problematic
  • Minimally can
  • refine state
  • add labels
  • Add transitions
  • Refine attributes
  • Add communication
  • Constraints on active classes
  • Liveliness properties are problematic

25
Local Actions Package
26
Local Action Domains
27
(No Transcript)
28
Labeled Transition Diagrams (LTD)
  • Used in semantics of active classes
  • A specialization of the meta-class
    BehaviorDescription
  • An arrow describes as labeled transition as
  • Starting state whose control part is source and
    attributes satisfy the guard
  • Reaching states whose control part is the target
    and attributes values modified as described in
    intra part
  • Labeled by the evaluation of the inter part, that
    is an interaction.
  • Interaction is an abstract class refined whenever
    LTD is used.

29
(No Transcript)
30
(No Transcript)
31
LTD.semantics Package
32
LTD
  • Transitions can be non-deterministic
  • Semantics of LTDs are labeled trans. systems
  • Semantics of arrows are transition calculations
    (TransCal)
  • Semantics of interactions are interaction
    calculations (InterCal) whose values are labels.
  • State is not interpreted.

33
Example LTD-an active class-
34
Example LTD-Its LTD-
35
Extreme Metamodelling GML
  • Simplified meta modeling language with
  • Classes
  • Operations
  • (characterized by pre and post conditions)
  • Associations
  • Subtype assertions
  • Constraints
  • Predefined types

36
GML Meanings I
  • Object set of all its states
  • State characterized by
  • Identity
  • Type
  • Value of all attributes
  • Values returned by operations
  • Class meanings of all its instantiations
  • Association pairs of object identities
    participating in the association

37
GML Meanings II
  • Subtype pairs of types satisfying the subtype
    assumption
  • Model set of objects (OIDs) and associations
    defined by it.
  • Data type standard
  • Constraints sets of objects /associations
    satisfying them

38
GML Extensibility Macros
  • To extend GML need to
  • Abstract syntax
  • Static correctness conditions
  • Visual representation
  • Provide a translation of any model fragment of
    any instance of a new construct into a model
    fragment of GML

39
(No Transcript)
40
Labeled Transition Systems (LTS)
41
Labeled Transition Diagrams (LTD)
  • LTDs provide semantics for LTSs.
  • Oriented arcs in LTDs are decorated with
  • condition 1 Label / condition 2
  • These are GML expressions (like OCL) with
    appropriate type
  • At most one free variable of type State may be
    Condition 1 and Label, but only two in Condition 2

42
LTD
  • LTDs enrich LTSs with control information
    enough to formally specify execution of states
    diagrams.
  • Add contexts as a string

43
Metamodels for Statecharts
  • Add run-to-completion semantics to formalize
    Statechart executions.
  • Every object has an event queue and look for
    events in own queue, take one and execute

44
Machinery Needed
45
Machinery Needed II
46
Machinery Needed II
47
Event Execution Machine
Write a Comment
User Comments (0)
About PowerShow.com