Skip to content

xtUML CPP Transformation

Ákos Horváth edited this page Jun 1, 2015 · 9 revisions

Assumptions

Components

  1. Components cannot have dynamic behavior (state machines).

Initial transition

  1. There is a single transition from the InitialPoint to the initial state and it has no triggers or guard

Transitions

  1. Transitions with the same source and target vertex have at least unique name
  2. Transitions without triggers are allowed
  3. Transitions have at most one trigger
  4. Multiple transitions for the same source vertex with exactly the same triggering event are allowed

Associations

  1. An association can have maximum two AssociationEnds
  2. Both AssociationEnds are contained in the Association itself

List of required mapping rules

  1. Only state machine, assume CPPClass for XtClass is available
  • State: create CPPState under CPPClass
  • Transition: create CPPTranstion under CPPClass
  • XtEvent (Transition.triggers.signal): create CPPEvent under CPPClass

Transition evaluation order in generated code

  1. Transition evaluation is ordered based on the position in the CompositeState .transitions EList when multiple transitions have the same triggers
  • Note that this order may not be the same as the order in UML (due to the nature of incremental transformation)
  1. Transitions without triggers are not evaluated when processing an event
  • These should be executed when a different method is called that will be used for as-long-as-possible execution
Clone this wiki locally