Software Disclaimer

Class UML 2.4.1::Region

Description:

A region is an orthogonal part of either a composite state or a state machine. It contains states and transitions.

Direct Superclasses: RedefinableElement, Namespace

Direct Subclasses:

Class Precedence List: Region, RedefinableElement, Namespace, NamedElement, Element

Properties:

extendedRegion : Region (0 1); -- source Region
redefinitionContext : Classifier (1 1); -- source Region
state : State (0 1); -- source Region
stateMachine : StateMachine (0 1); -- source Region
subvertex : Vertex (0 *); -- source Region
transition : Transition (0 *); -- source Region
isLeaf : Boolean (1 1); -- source RedefinableElement
redefinedElement : RedefinableElement (0 *); -- source RedefinableElement
elementImport : ElementImport (0 *); -- source Namespace
importedMember : PackageableElement (0 *); -- source Namespace
member : NamedElement (0 *); -- source Namespace
ownedMember : NamedElement (0 *); -- source Namespace
ownedRule : Constraint (0 *); -- source Namespace
packageImport : PackageImport (0 *); -- source Namespace
clientDependency : Dependency (0 *); -- source NamedElement
name : String (0 1); -- source NamedElement
nameExpression : StringExpression (0 1); -- source NamedElement
namespace : Namespace (0 1); -- source NamedElement
qualifiedName : String (0 1); -- source NamedElement
visibility : VisibilityKind (0 1); -- source NamedElement
ownedComment : Comment (0 *); -- source Element
ownedElement : Element (0 *); -- source Element
owner : Element (0 1); -- source Element

Constraints:

Signature: shallow_history_vertex() : Boolean;
Description: A region can have at most one shallow history vertex
Expression: self.subvertex->select(v | v.oclIsKindOf(Pseudostate))-> select(p : Pseudostate | p.kind = #shallowHistory)->size() <= 1

Signature: owned() : Boolean;
Description: If a Region is owned by a StateMachine, then it cannot also be owned by a State and vice versa.
Expression: (stateMachine->notEmpty() implies state->isEmpty()) and (state->notEmpty() implies stateMachine->isEmpty())

Signature: initial_vertex() : Boolean;
Description: A region can have at most one initial vertex
Expression: self.subvertex->select (v | v.oclIsKindOf(Pseudostate))-> select(p : Pseudostate | p.kind = #initial)->size() <= 1

Signature: deep_history_vertex() : Boolean;
Description: A region can have at most one deep history vertex
Expression: self.subvertex->select (v | v.oclIsKindOf(Pseudostate))-> select(p : Pseudostate | p.kind = #deepHistory)->size() <= 1

Operations:

Signature: redefinitionContext.1() : Classifier;
Description: The redefinition context of a region is the nearest containing statemachine
Expression: result = let sm = containingStateMachine() in if sm.context->isEmpty() or sm.general->notEmpty() then sm else sm.context endif

Signature: isRedefinitionContextValid(redefined : Region; ) : Boolean;
Description: The query isRedefinitionContextValid() specifies whether the redefinition contexts of a region are properly related to the redefinition contexts of the specified region to allow this element to redefine the other. The containing statemachine/state of a redefining region must redefine the containing statemachine/state of the redefined region.
Expression: result = true

Signature: isConsistentWith(redefinee : RedefinableElement; ) : Boolean;
Description: The query isConsistentWith() specifies that a redefining region is consistent with a redefined region provided that the redefining region is an extension of the redefined region, i.e. it adds vertices and transitions and it redefines states and transitions of the redefined region.
Expression: result = true

Signature: containingStateMachine() : StateMachine;
Description: The operation containingStateMachine() returns the sate machine in which this Region is defined
Expression: result = if stateMachine->isEmpty() then state.containingStateMachine() else stateMachine endif

Signature: belongsToPSM() : Boolean;
Description: The operation belongsToPSM () checks if the region belongs to a protocol state machine
The OCL used here is not normative.
Editor's notes: missing endif endif
Expression: result = if not stateMachine->isEmpty() then oclIsTypeOf(ProtocolStateMachine) else if not state->isEmpty() then state.container.belongsToPSM () else false endif endif
Original: result = if not stateMachine->isEmpty() then oclIsTypeOf(ProtocolStateMachine) else if not state->isEmpty() then state.container.belongsToPSM () else false



Send questions or comments to [email protected].