An integer is a primitive type representing integer values. A Boolean type is used for logical expression, consisting of the predefined values true and false. A string is a sequence of characters in some suitable character set used to display information about the model. Character sets may include non-Roman alphabets and characters. An unlimited natural is a primitive type representing unlimited natural values. A comment is a textual annotation that can be attached to a set of elements. Specifies a string that is the comment. References the Element(s) being commented. A directed relationship represents a relationship between a collection of source model elements and a collection of target model elements. Specifies the sources of the DirectedRelationship. Specifies the targets of the DirectedRelationship. A literal specification identifies a literal constant being modeled. A literal integer is a specification of an integer value. The specified Integer value. The query isComputable() is redefined to be true. OCL result = true The query integerValue() gives the value. OCL result = value A literal string is a specification of a string value. The specified String value. The query isComputable() is redefined to be true. OCL result = true The query stringValue() gives the value. OCL result = value A literal Boolean is a specification of a Boolean value. The specified Boolean value. The query isComputable() is redefined to be true. OCL result = true The query booleanValue() gives the value. OCL result = value A literal null specifies the lack of a value. The query isComputable() is redefined to be true. OCL result = true The query isNull() returns true. OCL result = true A constraint is a condition or restriction expressed in natural language text or in a machine readable language for the purpose of declaring some of the semantics of an element. A constraint cannot be applied to itself. OCL not constrainedElement->includes(self) The value specification for a constraint must evaluate to a Boolean value. OCL self.specification().booleanValue().isOclKindOf(Boolean) The value specification for a constraint must evaluate to a Boolean value. OCL true Evaluating the value specification for a constraint must not have side effects. OCL true A constraint cannot be applied to itself. OCL not constrainedElement->includes(self) The ordered set of Elements referenced by this Constraint. A condition that must be true when evaluated in order for the constraint to be satisfied. Specifies the namespace that owns the NamedElement. An element import identifies an element in another package, and allows the element to be referenced using its name without a qualifier. The visibility of an ElementImport is either public or private. OCL self.visibility = #public or self.visibility = #private An importedElement has either public visibility or no visibility at all. OCL self.importedElement.visibility.notEmpty() implies self.importedElement.visibility = #public Specifies the visibility of the imported PackageableElement within the importing Package. The default visibility is the same as that of the imported element. If the imported element does not have a visibility, it is possible to add visibility to the element import. Specifies the name that should be added to the namespace of the importing package in lieu of the name of the imported packagable element. The aliased name must not clash with any other member name in the importing package. By default, no alias is used. Specifies the PackageableElement whose name is to be added to a Namespace. Specifies the Namespace that imports a PackageableElement from another Package. The query getName() returns the name under which the imported PackageableElement will be known in the importing namespace. OCL result = if self.alias->notEmpty() then self.alias else self.importedElement.name endif A typed element is a kind of named element that represents an element with a type. A typed element has a type. This information is derived from the return result for this Operation. The type of the TypedElement. A feature declares a behavioral or structural characteristic of instances of classifiers. Specifies whether this feature characterizes individual instances classified by the classifier (false) or the classifier itself (true). The Classifiers that have this Feature as a feature. A redefinable element is an element that, when defined in the context of a classifier, can be redefined more specifically or differently in the context of another classifier that specializes (directly or indirectly) the context classifier. At least one of the redefinition contexts of the redefining element must be a specialization of at least one of the redefinition contexts for each redefined element. OCL self.redefinedElement->forAll(e | self.isRedefinitionContextValid(e)) A redefining element must be consistent with each redefined element. OCL self.redefinedElement->forAll(re | re.isConsistentWith(self)) Indicates whether it is possible to further specialize a RedefinableElement. If the value is true, then it is not possible to further specialize the RedefinableElement. The redefinable element that is being redefined by this element. References the contexts that this element may be redefined from. The query isConsistentWith() specifies, for any two RedefinableElements in a context in which redefinition is possible, whether redefinition would be logically consistent. By default, this is false; this operation must be overridden for subclasses of RedefinableElement to define the consistency conditions. OCL redefinee.isRedefinitionContextValid(self) OCL result = false The query isRedefinitionContextValid() specifies whether the redefinition contexts of this RedefinableElement are properly related to the redefinition contexts of the specified RedefinableElement to allow this element to redefine the other. By default at least one of the redefinition contexts of this element must be a specialization of at least one of the redefinition contexts of the specified element. OCL result = redefinitionContext->exists(c | c.allParents()->includes(redefined.redefinitionContext))) A structural feature is a typed feature of a classifier that specifies the structure of instances of the classifier. By specializing multiplicity element, it supports a multiplicity that specifies valid cardinalities for the collection of values associated with an instantiation of the structural feature. States whether the feature's value may be modified by a client. An instance specification is a model element that represents an instance in a modeled system. The defining feature of each slot is a structural feature (directly or inherited) of a classifier of the instance specification. OCL slot->forAll(s | classifier->exists (c | c.allFeatures()->includes (s.definingFeature))) One structural feature (including the same feature inherited from multiple classifiers) is the defining feature of at most one slot in an instance specification. OCL classifier->forAll(c | (c.allFeatures()->forAll(f | slot->select(s | s.definingFeature = f)->size() <= 1))) The classifier or classifiers of the represented instance. If multiple classifiers are specified, the instance is classified by all of them. A slot giving the value or values of a structural feature of the instance. An instance specification can have one slot per structural feature of its classifiers, including inherited features. It is not necessary to model a slot for each structural feature, in which case the instance specification is a partial description. A specification of how to compute, derive, or construct the instance. A slot specifies that an entity modeled by an instance specification has a value or values for a specific structural feature. The instance specification that owns this slot. The structural feature that specifies the values that may be held by the slot. The value or values corresponding to the defining feature for the owning instance specification. A package import is a relationship that allows the use of unqualified names to refer to package members from other namespaces. The visibility of a PackageImport is either public or private. OCL self.visibility = #public or self.visibility = #private Specifies the visibility of the imported PackageableElements within the importing Namespace, i.e., whether imported elements will in turn be visible to other packages that use that importingPackage as an importedPackage. If the PackageImport is public, the imported elements will be visible outside the package, while if it is private they will not. Specifies the Namespace that imports the members from a Package. Specifies the Package whose members are imported into a Namespace. A data type is a type whose instances are identified only by their value. A data type may contain attributes to support the modeling of structured data types. The Attributes owned by the DataType. The Operations owned by the DataType. The inherit operation is overridden to exclude redefined properties. OCL result = inhs->excluding(inh | ownedMember->select(oclIsKindOf(RedefinableElement))->select(redefinedElement->includes(inh))) An enumeration is a data type whose values are enumerated in the model as enumeration literals. The ordered set of literals for this Enumeration. An enumeration literal is a user-defined data value for an enumeration. The Enumeration that this EnumerationLiteral is a member of. A primitive type defines a predefined data type, without any relevant substructure (i.e., it has no parts in the context of UML). A primitive datatype may have an algebra and operations defined outside of UML, for example, mathematically. An association describes a set of tuples whose values refer to typed instances. An instance of an association is called a link. An association specializing another association has the same number of ends as the other association. OCL self.parents()->forAll(p | p.memberEnd.size() = self.memberEnd.size()) When an association specializes another association, every end of the specific association corresponds to an end of the general association, and the specific end reaches the same type or a subtype of the more general end. OCL true Only binary associations can be aggregations. OCL self.memberEnd->exists(aggregation <> Aggregation::none) implies self.memberEnd->size() = 2 Association ends of associations with more than two ends must be owned by the association. OCL if memberEnd->size() > 2 then ownedEnd->includesAll(memberEnd) Specifies whether the association is derived from other model elements such as other associations or constraints. The ends that are owned by the association itself. References the classifiers that are used as types of the ends of the association. Each end represents participation of instances of the classifier connected to the end in links of the association. The navigable ends that are owned by the association itself. endType is derived from the types of the member ends. OCL result = self.memberEnd->collect(e | e.type) A value specification is the specification of a (possibly empty) set of instances, including both objects and data values. The query isComputable() determines whether a value specification can be computed in a model. This operation cannot be fully defined in OCL. A conforming implementation is expected to deliver true for this operation for all value specifications that it can compute, and to compute all of those for which the operation is true. A conforming implementation is expected to be able to compute the value of all literals. OCL result = false The query integerValue() gives a single Integer value when one can be computed. OCL result = Set{} The query booleanValue() gives a single Boolean value when one can be computed. OCL result = Set{} The query stringValue() gives a single String value when one can be computed. OCL result = Set{} The query unlimitedValue() gives a single UnlimitedNatural value when one can be computed. OCL result = Set{} The query isNull() returns true when it can be computed that the value is null. OCL result = false Relationship is an abstract concept that specifies some kind of relationship between elements. Specifies the elements related by the Relationship. A package merge defines how the contents of one package are extended by the contents of another package. References the Package that is being extended with the contents of the merged package of the PackageMerge. References the Package that is to be merged with the receiving package of the PackageMerge. An instance value is a value specification that identifies an instance. The instance that is the specified value. A literal unlimited natural is a specification of an unlimited natural number. The specified UnlimitedNatural value. The query isComputable() is redefined to be true. OCL result = true The query unlimitedValue() gives the value. OCL result = value A type is a named element that is used as the type for a typed element. A type can be contained in a package. A type constrains the values represented by a typed element. Specifies the owning package of this classifier, if any. The query conformsTo() gives true for a type that conforms to another. By default, two types do not conform to each other. This query is intended to be redefined for specific conformance situations. OCL result = false An expression is a structured tree of symbols that denotes a (possibly empty) set of values when evaluated in a context. An expression represents a node in an expression tree, which may be non-terminal or terminal. It defines a symbol, and has a possibly empty sequence of operands which are value specifications. The symbol associated with the node in the expression tree. Specifies a sequence of operands. AggregationKind is an enumeration type that specifies the literals for defining the kind of aggregation of a property. Indicates that the property has no aggregation. Indicates that the property has a shared aggregation. Indicates that the property is aggregated compositely, i.e., the composite object has responsibility for the existence and storage of the composed objects (parts). Parameter direction kind is an enumeration type that defines literals used to specify direction of parameters. Indicates that parameter values are passed into the behavioral element by the caller. Indicates that parameter values are passed into a behavioral element by the caller and then back out to the caller from the behavioral element. Indicates that parameter values are passed from a behavioral element out to the caller. Indicates that parameter values are passed as return values from a behavioral element back to the caller. VisibilityKind is an enumeration type that defines literals to determine the visibility of elements in a model. The query bestVisibility() examines a set of VisibilityKinds, and returns public as the preferred visibility. OCL pre: not vis->includes(#protected) and not vis->includes(#package) OCL result = if vis->includes(#public) then #public else #private endif A public element is visible to all elements that can access the contents of the namespace that owns it. A private element is only visible inside the namespace that owns it. A protected element is visible to elements that have a generalization relationship to the namespace that owns it. A package element is owned by a namespace that is not a package, and is visible to elements that are in the same package as its owning namespace. Only named elements that are not owned by packages can be marked as having package visibility. Any element marked as having package visibility is visible to all elements within the nearest enclosing package (given that other owning elements have proper visibility). Outside the nearest enclosing package, an element marked as having package visibility is not visible. A usage is a relationship in which one element requires another element (or set of elements) for its full implementation or operation. A usage is a dependency in which the client requires the presence of the supplier. An abstraction is a relationship that relates two elements or sets of elements that represent the same concept at different levels of abstraction or from different viewpoints. An composition of an Expression that states the abstraction relationship between the supplier and the client. In some cases, such as Derivation, it is usually formal and unidirectional; in other cases, such as Trace, it is usually informal and bidirectional. The mapping expression is optional and may be omitted if the precise relationship between the elements is not specified. A dependency is a relationship that signifies that a single or a set of model elements requires other model elements for their specification or implementation. This means that the complete semantics of the depending elements is either semantically or structurally dependent on the definition of the supplier element(s). The element(s) independent of the client element(s), in the same respect and the same dependency relationship. In some directed dependency relationships (such as Refinement Abstractions), a common convention in the domain of class-based OO software is to put the more abstract element in this role. Despite this convention, users of UML may stipulate a sense of dependency suitable for their domain, which makes a more abstract element dependent on that which is more specific. The element(s) dependent on the supplier element(s). In some cases (such as a Trace Abstraction) the assignment of direction (that is, the designation of the client element) is at the discretion of the modeler, and is a stipulation. Realization is a specialized abstraction relationship between two sets of model elements, one representing a specification (the supplier) and the other represents an implementation of the latter (the client). Realization can be used to model stepwise refinement, optimizations, transformations, templates, model synthesis, framework composition, etc. A substitution is a relationship between two classifiers signifies that the substituting classifier complies with the contract specified by the contract classifier. This implies that instances of the substituting classifier are runtime substitutable where instances of the contract classifier are expected. The contract with which the substituting classifier complies. Instances of the substituting classifier are runtime substitutable where instances of the contract classifier are expected. A packageable element indicates a named element that may be owned directly by a package. Indicates that packageable elements must always have a visibility, i.e., visibility is not optional. A namespace is an element in a model that contains a set of named elements that can be identified by name. All the members of a Namespace are distinguishable within it. OCL membersAreDistinguishable() References the ElementImports owned by the Namespace. References the PackageImports owned by the Namespace. Specifies a set of Constraints owned by this Namespace. A collection of NamedElements identifiable within the Namespace, either by being owned or by being introduced by importing or inheritance. References the PackageableElements that are members of this Namespace as a result of either PackageImports or ElementImports. A collection of NamedElements owned by the Namespace. The importedMember property is derived from the ElementImports and the PackageImports. References the PackageableElements that are members of this Namespace as a result of either PackageImports or ElementImports. OCL result = self.importMembers(self.elementImport.importedElement.asSet()- >union(self.packageImport.importedPackage->collect(p | p.visibleMembers()))) The query getNamesOfMember() takes importing into account. It gives back the set of names that an element would have in an importing namespace, either because it is owned, or if not owned then imported individually, or if not individually then from a package. The query getNamesOfMember() gives a set of all of the names that a member would have in a Namespace. In general a member can have multiple names in a Namespace if it is imported more than once with different aliases. The query takes account of importing. It gives back the set of names that an element would have in an importing namespace, either because it is owned, or if not owned then imported individually, or if not individually then from a package. OCL result = if self.ownedMember ->includes(element) then Set{}->include(element.name) else let elementImports: ElementImport = self.elementImport->select(ei | ei.importedElement = element) in if elementImports->notEmpty() then elementImports->collect(el | el.getName()) else self.packageImport->select(pi | pi.importedPackage.visibleMembers()->includes(element))-> collect(pi | pi.importedPackage.getNamesOfMember(element)) endif endif The Boolean query membersAreDistinguishable() determines whether all of the namespace's members are distinguishable within it. OCL result = self.member->forAll( memb | self.member->excluding(memb)->forAll(other | memb.isDistinguishableFrom(other, self))) The query importMembers() defines which of a set of PackageableElements are actually imported into the namespace. This excludes hidden ones, i.e., those which have names that conflict with names of owned members, and also excludes elements which would have the same name when imported. OCL result = self.excludeCollisions(imps)->select(imp | self.ownedMember->forAll(mem | mem.imp.isDistinguishableFrom(mem, self))) The query excludeCollisions() excludes from a set of PackageableElements any that would not be distinguishable from each other in this namespace. OCL result = imps->reject(imp1 | imps.exists(imp2 | not imp1.isDistinguishableFrom(imp2, self))) Indicates the dependencies that reference the supplier. An opaque expression is an uninterpreted textual statement that denotes a (possibly empty) set of values when evaluated in a context. Provides a mechanism for precisely defining the behavior of an opaque expression. An opaque expression is defined by a behavior restricted to return one result. If the language attribute is not empty, then the size of the body and language arrays must be the same. OCL language->notEmpty() implies (body->size() = language->size()) The behavior may only have return result parameters. OCL self.behavior.notEmpty() implies self.behavior.ownedParameters->select(p | p.direction<>#return)->isEmpty() The behavior must have exactly one return result parameter. OCL self.behavior.notEmpty() implies self.behavior.ownedParameter->select(p | p.direction=#return)->size() = 1 The text of the expression, possibly in multiple languages. Specifies the languages in which the expression is stated. The interpretation of the expression body depends on the languages. If the languages are unspecified, they might be implicit from the expression body or the context. Languages are matched to body strings by order. Restricts an opaque expression to return exactly one return result. When the invocation of the opaque expression completes, a single set of values is returned to its owner. This association is derived from the single return result parameter of the associated behavior. Specifies the behavior of the opaque expression. The query value() gives an integer value for an expression intended to produce one. OCL self.isIntegral() OCL true The query isIntegral() tells whether an expression is intended to produce an integer. OCL result = false The query isPositive() tells whether an integer expression has a positive value. OCL self.isIntegral() OCL result = false The query isNonNegative() tells whether an integer expression has a non-negative value. OCL self.isIntegral() OCL result = false An behavior with implementation-specific semantics. Specifies the behavior in one or more languages. Languages the body strings use in the same order as the body strings. A function behavior is an opaque behavior that does not access or modify any objects or other external data. A function behavior has at least one output parameter. OCL self.ownedParameters-> select(p | p.direction=#out or p.direction=#inout or p.direction=#return)->size() >= 1 The types of parameters are all data types, which may not nest anything but other datatypes. OCL def: hasAllDataTypeAttributes(d : DataType) : Boolean = d.ownedAttribute->forAll(a | a.type.oclIsTypeOf(DataType) and hasAllDataTypeAttributes(a.type)) self.ownedParameters->forAll(p | p.type.notEmpty() and p.oclIsTypeOf(DataType) and hasAllDataTypeAttributes(p)) An interface realization is a specialized realization relationship between a classifier and an interface. This relationship signifies that the realizing classifier conforms to the contract specified by the interface. References the Interface specifying the conformance contract. References the BehavioredClassifier that owns this Interfacerealization (i.e., the classifier that realizes the Interface to which it points). Specifies a link that enables communication between two or more instances. This link may be an instance of an association, or it may represent the possibility of the instances being able to communicate because their identities are known by virtue of being passed in as parameters, held in variables or slots, or because the communicating instances are the same instance. The link may be realized by something as simple as a pointer or by something as complex as a network connection. In contrast to associations, which specify links between any instance of the associated classifiers, connectors specify links between instances playing the connected parts only. The types of the connectable elements that the ends of a connector are attached to must conform to the types of the association ends of the association that types the connector, if any. OCL true The connectable elements attached to the ends of a connector must be compatible. OCL true The ConnectableElements attached as roles to each ConnectorEnd owned by a Connector must be roles of the Classifier that owned the Connector, or they must be ports of such roles. OCL true An optional association that specifies the link corresponding to this connector. A connector may be redefined when its containing classifier is specialized. The redefining connector may have a type that specializes the type of the redefined connector. The types of the connector ends of the redefining connector may specialize the types of the connector ends of the redefined connector. The properties of the connector ends of the redefining connector may be replaced. A connector consists of at least two connector ends, each representing the participation of instances of the classifiers typing the connectable elements attached to this end. The set of connector ends is ordered. A structured classifier is an abstract metaclass that represents any classifier whose behavior can be fully or partly described by the collaboration of owned or referenced instances. The multiplicities on connected elements must be consistent. OCL true References the properties owned by the classifier. References the properties specifying instances that the classifier owns by composition. This association is derived, selecting those owned properties where isComposite is true. References the roles that instances may play in this classifier. References the connectors owned by the classifier. ConnectableElement is an abstract metaclass representing a set of instances that play roles of a classifier. Connectable elements may be joined by attached connectors and specify configurations of linked instances to be created within an instance of the containing classifier. Denotes a connector that attaches to this connectable element. A message defines a particular communication between lifelines of an interaction. If the sending MessageEvent and the receiving MessageEvent of the same Message are on the same Lifeline, the sending MessageEvent must be ordered before the receiving MessageEvent. OCL true The signature must either refer an Operation (in which case messageSort is either synchCall or asynchCall) or a Signal (in which case messageSort is asynchSignal). The name of the NamedElement referenced by signature must be the same as that of the Message. OCL true In the case when the Message signature is an Operation, the arguments of the Message must correspond to the parameters of the Operation. A Parameter corresponds to an Argument if the Argument is of the same Class or a specialization of that of the Parameter. OCL true In the case when the Message signature is a Signal, the arguments of the Message must correspond to the attributes of the Signal. A Message Argument corresponds to a Signal Attribute if the Arguement is of the same Class or a specialization of that of the Attribute. OCL true Arguments of a Message must only be: i) attributes of the sending lifeline ii) constants iii) symbolic values (which are wildcard values representing any legal value) iv) explicit parameters of the enclosing Interaction v) attributes of the class owning the Interaction OCL true Messages cannot cross bounderies of CombinedFragments or their operands. OCL true If the MessageEnds are both OccurrenceSpecifications then the connector must go between the Parts represented by the Lifelines of the two MessageEnds. OCL true The derived kind of the Message (complete, lost, found or unknown) The sort of communication reflected by the Message References the Receiving of the Message References the Sending of the Message. The Connector on which this Message is sent. The enclosing Interaction owning the Message The arguments of the Message The definition of the type or signature of the Message (depending on its kind). The associated named element is derived from the message end that constitutes the sending or receiving message event. If both a sending event and a receiving message event are present, the signature is obtained from the sending event. A general ordering represents a binary relation between two occurrence specifications, to describe that one occurrence specification must occur before the other in a valid trace. This mechanism provides the ability to define partial orders of occurrence cpecifications that may otherwise not have a specified order. The OccurrenceSpecification referenced comes before the OccurrenceSpecification referenced by after. The OccurrenceSpecification referenced comes after the OccurrenceSpecification referenced by before. An execution specification is a specification of the execution of a unit of behavior or action within the lifeline. The duration of an execution specification is represented by two cccurrence specifications, the start occurrence specification and the finish occurrence specification. The startEvent and the finishEvent must be on the same Lifeline OCL start.lifeline = finish.lifeline References the OccurrenceSpecification that designates the start of the Action or Behavior References the OccurrenceSpecification that designates the finish of the Action or Behavior. An occurrence specification is the basic semantic unit of interactions. The sequences of occurrences specified by them are the meanings of interactions. References the Lifeline on which the OccurrenceSpecification appears. References the GeneralOrderings that specify EventOcurrences that must occur after this OccurrenceSpecification References the GeneralOrderings that specify EventOcurrences that must occur before this OccurrenceSpecification References a specification of the occurring event. MessageEnd is an abstract specialization of NamedElement that represents what can occur at the end of a message. References a Message. A state invariant is a runtime constraint on the participants of the interaction. It may be used to specify a variety of different kinds of constraints, such as values of attributes or variables, internal or external states, and so on. A state invariant is an interaction fragment and it is placed on a lifeline. A Constraint that should hold at runtime for this StateInvariant References the Lifeline on which the StateInvariant appears. An action execution specification is a kind of execution specification representing the execution of an action. The Action referenced by the ActionExecutionSpecification, if any, must be owned by the Interaction owning the ActionExecutionOccurrence. OCL true Action whose execution is occurring. A behavior execution specification is a kind of execution specification representing the execution of a behavior. Behavior whose execution is occurring. An execution event models the start or finish of an execution occurrence. A creation event models the creation of an object. No othet OccurrenceSpecification may appear above an OccurrenceSpecification which references a CreationEvent on a given Lifeline in an InteractionOperand. OCL true A destruction event models the destruction of an object. No other OccurrenceSpecifications may appear below an OccurrenceSpecification which references a DestructionEvent on a given Lifeline in an InteractionOperand. OCL true A send operation event models the invocation of an operation call. The operation associated with this event. A send signal event models the sending of a signal. The signal associated with this event. A message occurrence specification pecifies the occurrence of message events, such as sending and receiving of signals or invoking or receiving of operation calls. A message occurrence specification is a kind of message end. Messages are generated either by synchronous operation calls or asynchronous signal sends. They are received by the execution of corresponding accept event actions. An execution occurrence specification represents moments in time at which actions or behaviors start or finish. References the execution specification describing the execution that is started or finished at this execution event. The event referenced is restricted to an execution event. A receive operation event specifies the event of receiving an operation invocation for a particular operation by the target entity. The operation associated with this event. A receive signal event specifies the event of receiving a signal by the target entity. The signal associated with this event. This is an enumerated type that identifies the type of message. sendEvent and receiveEvent are present sendEvent present and receiveEvent absent sendEvent absent and receiveEvent present sendEvent and receiveEvent absent (should not appear) This is an enumerated type that identifies the type of communication action that was used to generate the message. The message was generated by a synchronous call to an operation. The message was generated by an asynchronous call to an operation; i.e., a CallAction with isSynchronous = false. The message was generated by an asynchronous send action. The message designating the creation of another lifeline object. The message designating the termination of another lifeline. The message is a reply message to an operation call. This association shows the lifelines that make up an interaction. A lifeline may be part of more than one interaction use. The event shows the time point at which the action begins execution. The event shows the time point at which the action completes execution. If a Part has multiplicity, multiple lifelines might be used to show it. An interaction use refers to an interaction. The interaction use is a shorthand for copying the contents of the referenced interaction where the interaction use is. To be accurate the copying must take into account substituting parameters with arguments and connect the formal gates with the actual ones. Actual Gates of the InteractionUse must match Formal Gates of the referred Interaction. Gates match when their names are equal. OCL true The InteractionUse must cover all Lifelines of the enclosing Interaction which appear within the referred Interaction. OCL true The arguments of the InteractionUse must correspond to parameters of the referred Interaction OCL true The arguments must only be constants, parameters of the enclosing Interaction or attributes of the classifier owning the enclosing Interaction. OCL true Refers to the Interaction that defines its meaning The actual gates of the InteractionUse The actual arguments of the Interaction A part decomposition is a description of the internal interactions of one lifeline relative to an interaction. PartDecompositions apply only to Parts that are Parts of Internal Structures not to Parts of Collaborations. OCL true Assume that within Interaction X, Lifeline L is of class C and decomposed to D. Within X there is a sequence of constructs along L (such constructs are CombinedFragments, InteractionUse and (plain) OccurrenceSpecifications). Then a corresponding sequence of constructs must appear within D, matched one-to-one in the same order. i) CombinedFragment covering L are matched with an extra-global CombinedFragment in D ii) An InteractionUse covering L are matched with a global (i.e. covering all Lifelines) InteractionUse in D. iii) A plain OccurrenceSpecification on L is considered an actualGate that must be matched by a formalGate of D OCL true Assume that within Interaction X, Lifeline L is of class C and decomposed to D. Assume also that there is within X an InteractionUse (say) U that covers L. According to the constraint above U will have a counterpart CU within D. Within the Interaction referenced by U, L should also be decomposed, and the decomposition should reference CU. (This rule is called commutativity of decomposition) OCL true An interaction operand is contained in a combined fragment. An interaction operand represents one operand of the expression given by the enclosing combined fragment. The guard must be placed directly prior to (above) the OccurrenceSpecification that will become the first OccurrenceSpecification within this InteractionOperand. OCL true The guard must contain only references to values local to the Lifeline on which it resides, or values global to the whole Interaction. OCL true Constraint of the operand. The fragments of the operand. An interaction constraint is a Boolean expression that guards an operand in a combined fragment. The dynamic variables that take part in the constraint must be owned by the ConnectableElement corresponding to the covered Lifeline. OCL true The constraint may contain references to global data or write-once data. OCL true Minint/maxint can only be present if the InteractionConstraint is associated with the operand of a loop CombinedFragment. OCL true If minint is specified, then the expression must evaluate to a non-negative integer. OCL true If maxint is specified, then the expression must evaluate to a positive integer. OCL true If maxint is specified, then minint must be specified and the evaluation of maxint must be >= the evaluation of minint OCL true The minimum number of iterations of a loop The maximum number of iterations of a loop A gate is a connection point for relating a message outside an interaction fragment with a message inside the interaction fragment. The message leading to/from an actualGate of an InteractionUse must correspond to the message leading from/to the formalGate with the same name of the Interaction referenced by the InteractionUse. OCL true The message leading to/from an (expression) Gate within a CombinedFragment must correspond to the message leading from/to the CombinedFragment on its outside. OCL true A combined fragment defines an expression of interaction fragments. A combined fragment is defined by an interaction operator and corresponding interaction operands. Through the use of combined fragments the user will be able to describe a number of traces in a compact and concise manner. If the interactionOperator is opt, loop, break, or neg there must be exactly one operand OCL true The InteractionConstraint with minint and maxint only apply when attached to an InteractionOperand where the interactionOperator is loop. OCL true If the interactionOperator is break, the corresponding InteractionOperand must cover all Lifelines within the enclosing InteractionFragment. OCL true The interaction operators 'consider' and 'ignore' can only be used for the CombineIgnoreFragment subtype of CombinedFragment OCL ((interactionOperator = #consider) or (interactionOperator = #ignore)) implies oclsisTypeOf(CombineIgnoreFragment) Specifies the operation which defines the semantics of this combination of InteractionFragments. The set of operands of the combined fragment. Specifies the gates that form the interface between this CombinedFragment and its surroundings An interaction is a unit of behavior that focuses on the observable exchange of information between connectable elements. Specifies the participants in this Interaction. The Messages contained in this Interaction. The ordered set of fragments in the Interaction. Actions owned by the Interaction. Specifies the gates that form the message interface between this Interaction and any InteractionUses which reference it. A lifeline represents an individual participant in the interaction. While parts and structural features may have multiplicity greater than 1, lifelines represent only one interacting entity. If two (or more) InteractionUses within one Interaction, refer to Interactions with 'common Lifelines,' those Lifelines must also appear in the Interaction with the InteractionUses. By common Lifelines we mean Lifelines with the same selector and represents associations. OCL true The selector for a Lifeline must only be specified if the referenced Part is multivalued. OCL (self.selector->isEmpty() implies not self.represents.isMultivalued()) or (not self.selector->isEmpty() implies self.represents.isMultivalued()) The classifier containing the referenced ConnectableElement must be the same classifier, or an ancestor, of the classifier that contains the interaction enclosing this lifeline. OCL if (represents->notEmpty()) then (if selector->notEmpty() then represents.isMultivalued() else not represents.isMultivalued()) References the InteractionFragments in which this Lifeline takes part. References the ConnectableElement within the classifier that contains the enclosing interaction. References the Interaction enclosing this Lifeline. If the referenced ConnectableElement is multivalued, then this specifies the specific individual part within that set. References the Interaction that represents the decomposition. A continuation is a syntactic way to define continuations of different branches of an alternative combined fragment. Continuations is intuitively similar to labels representing intermediate points in a flow of control. Continuations with the same name may only cover the same set of Lifelines (within one Classifier). OCL true Continuations are always global in the enclosing InteractionFragment e.g. it always covers all Lifelines covered by the enclosing InteractionFragment. OCL true Continuations always occur as the very first InteractionFragment or the very last InteractionFragment of the enclosing InteractionFragment. OCL true True: when the Continuation is at the end of the enclosing InteractionFragment and False when it is in the beginning. InteractionFragment is an abstract notion of the most general interaction unit. An interaction fragment is a piece of an interaction. Each interaction fragment is conceptually like an interaction by itself. References the Lifelines that the InteractionFragment involves. The general ordering relationships contained in this fragment. The Interaction enclosing this InteractionFragment. The operand enclosing this InteractionFragment (they may nest recursively) A consider ignore fragment is a kind of combined fragment that is used for the consider and ignore cases, which require lists of pertinent messages to be specified. The interaction operator of a ConsiderIgnoreFragment must be either 'consider' or 'ignore'. OCL (interactionOperator = #consider) or (interactionOperator = #ignore) The NamedElements must be of a type of element that identifies a message (e.g., an Operation, Reception, or a Signal). OCL message->forAll(m | m.oclIsKindOf(Operation) or m.oclIsKindOf(Reception) or m.oclIsKindOf(Signal)) The set of messages that apply to this fragment InteractionOperatorKind is an enumeration designating the different kinds of operators of combined fragments. The interaction operand defines the type of operator of a combined fragment. The interactionOperator seq designates that the CombinedFragment represents a weak sequencing between the behaviors of the operands. The interactionOperator alt designates that the CombinedFragment represents a choice of behavior. At most one of the operands will be chosen. The chosen operand must have an explicit or implicit guard expression that evaluates to true at this point in the interaction. An implicit true guard is implied if the operand has no guard. The interactionOperator opt designates that the CombinedFragment represents a choice of behavior where either the (sole) operand happens or nothing happens. An option is semantically equivalent to an alternative CombinedFragment where there is one operand with non-empty content and the second operand is empty. The interactionOperator break designates that the CombinedFragment represents a breaking scenario in the sense that the operand is a scenario that is performed instead of the remainder of the enclosing InteractionFragment. A break operator with a guard is chosen when the guard is true and the rest of the enclosing Interaction Fragment is ignored. When the guard of the break operand is false, the break operand is ignored and the rest of the enclosing InteractionFragment is chosen. The choice between a break operand without a guard and the rest of the enclosing InteractionFragment is done non-deterministically. The interactionOperator par designates that the CombinedFragment represents a parallel merge between the behaviors of the operands. The OccurrenceSpecifications of the different operands can be interleaved in any way as long as the ordering imposed by each operand as such is preserved. The interactionOperator strict designates that the CombinedFragment represents a strict sequencing between the behaviors of the operands. The semantics of strict sequencing defines a strict ordering of the operands on the first level within the CombinedFragment with interactionOperator strict. Therefore OccurrenceSpecifications within contained CombinedFragment will not directly be compared with other OccurrenceSpecifications of the enclosing CombinedFragment. The interactionOperator loop designates that the CombinedFragment represents a loop. The loop operand will be repeated a number of times. The interactionOperator critical designates that the CombinedFragment represents a critical region. A critical region means that the traces of the region cannot be interleaved by other OccurrenceSpecifications (on those Lifelines covered by the region). This means that the region is treated atomically by the enclosing fragment when determining the set of valid traces. Even though enclosing CombinedFragments may imply that some OccurrenceSpecifications may interleave into the region, such as e.g. with par-operator, this is prevented by defining a region. The interactionOperator neg designates that the CombinedFragment represents traces that are defined to be invalid. The interactionOperator assert designates that the CombinedFragment represents an assertion. The sequences of the operand of the assertion are the only valid continuations. All other continuations result in an invalid trace. The interacionOperator ignore designates that there are some message types that are not shown within this combined fragment. These message types can be considered insignificant and are implicitly ignored if they appear in a corresponding execution. Alternatively, one can understand ignore to mean that the message types that are ignored can appear anywhere in the traces. The interactionOperator consider designates which messages should be considered within this combined fragment. This is equivalent to defining every other message to be ignored. A create object action is an action that creates an object that conforms to a statically specified classifier and puts it on an output pin at runtime. The classifier cannot be abstract. OCL not (self.classifier.isAbstract = #true) The classifier cannot be an association class OCL not self.classifier.oclIsKindOf(AssociationClass) The type of the result pin must be the same as the classifier of the action. OCL self.result.type = self.classifier The multiplicity of the output pin is 1..1. OCL self.result.multiplicity.is(1,1) Classifier to be instantiated. Gives the output pin on which the result is put. A destroy object action is an action that destroys objects. The multiplicity of the input pin is 1..1. OCL self.target.multiplicity.is(1,1) The input pin has no type. OCL self.target.type->size() = 0 Specifies whether links in which the object participates are destroyed along with the object. Specifies whether objects owned by the object are destroyed along with the object. The input pin providing the object to be destroyed. A test identity action is an action that tests if two values are identical objects. The input pins have no type. OCL self.first.type->size() = 0 and self.second.type->size() = 0 The multiplicity of the input pins is 1..1. OCL self.first.multiplicity.is(1,1) and self.second.multiplicity.is(1,1) The type of the result is Boolean. OCL self.result.type.oclIsTypeOf(Boolean) Gives the pin on which an object is placed. Gives the pin on which an object is placed. Tells whether the two input objects are identical. A read self action is an action that retrieves the host object of an action. The action must be contained in an behavior that has a host classifier. OCL self.context->size() = 1 If the action is contained in an behavior that is acting as the body of a method, then the operation of the method must not be static. OCL true The type of the result output pin is the host classifier. OCL self.result.type = self.context The multiplicity of the result output pin is 1..1. OCL self.result.multiplicity.is(1,1) Gives the output pin on which the hosting object is placed. StructuralFeatureAction is an abstract class for all structural feature actions. The structural feature must not be static. OCL self.structuralFeature.isStatic = #false The type of the object input pin is the same as the classifier of the object passed on this pin. OCL true The multiplicity of the input pin must be 1..1. OCL self.object.multiplicity.is(1,1) Visibility of structural feature must allow access to the object performing the action. OCL let host : Classifier = self.context in self.structuralFeature.visibility = #public or host = self.structuralFeature.featuringClassifier.type or (self.structuralFeature.visibility = #protected and host.allSupertypes ->includes(self.structuralFeature.featuringClassifier.type))) A structural feature has exactly one featuringClassifier. OCL self.structuralFeature.featuringClassifier->size() = 1 Structural feature to be read. Gives the input pin from which the object whose structural feature is to be read or written is obtained. A read structural feature action is a structural feature action that retrieves the values of a structural feature. The type and ordering of the result output pin are the same as the type and ordering of the structural feature. OCL self.result.type = self.structuralFeature.type and self.result.ordering = self.structuralFeature.ordering The multiplicity of the structural feature must be compatible with the multiplicity of the output pin. OCL self.structuralFeature.multiplicity.compatibleWith(self.result.multiplicity) Gives the output pin on which the result is put. WriteStructuralFeatureAction is an abstract class for structural feature actions that change structural feature values. The type input pin is the same as the classifier of the structural feature. OCL self.value.type = self.structuralFeature.featuringClassifier The multiplicity of the input pin is 1..1. OCL self.value.multiplicity.is(1,1) Value to be added or removed from the structural feature. A clear structural feature action is a structural feature action that removes all values of a structural feature. A remove structural feature value action is a write structural feature action that removes values from structural features. Actions removing a value from ordered nonunique structural features must have a single removeAt input pin if isRemoveDuplicates is false. It must be of type Unlimited Natural with multiplicity 1..1. Otherwise, the action has no removeAt input pin. OCL true Specifies whether to remove duplicates of the value in nonunique structural features. Specifies the position of an existing value to remove in ordered nonunique structural features. The type of the pin is UnlimitedNatural, but the value cannot be zero or unlimited. An add structural feature value action is a write structural feature action for adding values to a structural feature. Actions adding a value to ordered structural features must have a single input pin for the insertion point with type UnlimitedNatural and multiplicity of 1..1, otherwise the action has no input pin for the insertion point. OCL let insertAtPins : Collection = self.insertAt in if self.structuralFeature.isOrdered = #false then insertAtPins->size() = 0 else let insertAtPin : InputPin= insertAt->asSequence()->first() in insertAtPins->size() = 1 and insertAtPin.type = UnlimitedNatural and insertAtPin.multiplicity.is(1,1)) endif Specifies whether existing values of the structural feature of the object should be removed before adding the new value. Gives the position at which to insert a new value or move an existing value in ordered structural features. The type of the pin is UnlimitedNatural, but the value cannot be zero. This pin is omitted for unordered structural features. LinkAction is an abstract class for all link actions that identify their links by the objects at the ends of the links and by the qualifiers at ends of the links. The association ends of the link end data must all be from the same association and include all and only the association ends of that association. OCL self.endData->collect(end) = self.association()->collect(connection)) The association ends of the link end data must not be static. OCL self.endData->forall(end.oclisKindOf(NavigableEnd) implies end.isStatic = #false The input pins of the action are the same as the pins of the link end data and insertion pins. OCL self.input->asSet() = let ledpins : Set = self.endData->collect(value) in if self.oclIsKindOf(LinkEndCreationData) then ledpins->union(self.endData.oclAsType(LinkEndCreationData).insertAt) else ledpins Data identifying one end of a link by the objects on its ends and qualifiers. Pins taking end objects and qualifier values as input. The association operates on LinkAction. It returns the association of the action. OCL result = self.endData->asSequence().first().end.association A read link action is a link action that navigates across associations to retrieve objects on one end. Exactly one link-end data specification (the 'open' end) must not have an end object input pin. OCL self.endData->select(ed | ed.value->size() = 0)->size() = 1 The type and ordering of the result output pin are same as the type and ordering of the open association end. OCL let openend : AssociationEnd = self.endData->select(ed | ed.value->size() = 0)->asSequence()->first().end in self.result.type = openend.type and self.result.ordering = openend.ordering The multiplicity of the open association end must be compatible with the multiplicity of the result output pin. OCL let openend : AssociationEnd = self.endData->select(ed | ed.value->size() = 0)->asSequence()->first().end in openend.multiplicity.compatibleWith(self.result.multiplicity) The open end must be navigable. OCL let openend : AssociationEnd = self.endData->select(ed | ed.value->size() = 0)->asSequence()->first().end in openend.isNavigable() Visibility of the open end must allow access to the object performing the action. OCL let host : Classifier = self.context in let openend : AssociationEnd = self.endData->select(ed | ed.value->size() = 0)->asSequence()->first().end in openend.visibility = #public or self.endData->exists(oed | not oed.end = openend and (host = oed.end.participant or (openend.visibility = #protected and host.allSupertypes->includes(oed.end.participant)))) The pin on which are put the objects participating in the association at the end not specified by the inputs. A link end creation data is not an action. It is an element that identifies links. It identifies one end of a link to be created by a create link action. LinkEndCreationData can only be end data for CreateLinkAction or one of its specializations. OCL self.LinkAction.oclIsKindOf(CreateLinkAction) Link end creation data for ordered association ends must have a single input pin for the insertion point with type UnlimitedNatural and multiplicity of 1..1, otherwise the action has no input pin for the insertion point. OCL let insertAtPins : Collection = self.insertAt in if self.end.ordering = #unordered then insertAtPins->size() = 0 else let insertAtPin : InputPin = insertAts->asSequence()->first() in insertAtPins->size() = 1 and insertAtPin.type = UnlimitedNatural and insertAtPin.multiplicity.is(1,1)) endif Specifies whether the existing links emanating from the object on this end should be destroyed before creating a new link. Specifies where the new link should be inserted for ordered association ends, or where an existing link should be moved to. The type of the input is UnlimitedNatural, but the input cannot be zero. This pin is omitted for association ends that are not ordered. A create link action is a write link action for creating links. The association cannot be an abstract classifier. OCL self.association().isAbstract = #false Specifies ends of association and inputs. A destroy link action is a write link action that destroys links and link objects. Specifies ends of association and inputs. WriteLinkAction is an abstract class for link actions that create and destroy links. The visibility of at least one end must allow access to the class using the action. OCL true A clear association action is an action that destroys all links of an association in which a particular object participates. The type of the input pin must be the same as the type of at least one of the association ends of the association. OCL self.association->exists(end.type = self.object.type) The multiplicity of the input pin is 1..1. OCL self.object.multiplicity.is(1,1) Gives the input pin from which is obtained the object whose participation in the association is to be cleared. Association to be cleared. A broadcast signal action is an action that transmits a signal instance to all the potential target objects in the system, which may cause the firing of a state machine transitions or the execution of associated activities of a target object. The argument values are available to the execution of associated behaviors. The requestor continues execution immediately after the signals are sent out. It does not wait for receipt. Any reply messages are ignored and are not transmitted to the requestor. The number and order of argument pins must be the same as the number and order of attributes in the signal. OCL true The type, ordering, and multiplicity of an argument pin must be the same as the corresponding attribute of the signal. OCL true The specification of signal object transmitted to the target objects. A send object action is an action that transmits an object to the target object, where it may invoke behavior such as the firing of state machine transitions or the execution of an activity. The value of the object is available to the execution of invoked behaviors. The requestor continues execution immediately. Any reply message is ignored and is not transmitted to the requestor. The target object to which the object is sent. The request object, which is transmitted to the target object. The object may be copied in transmission, so identity might not be preserved. A link end destruction data is not an action. It is an element that identifies links. It identifies one end of a link to be destroyed by destroy link action. LinkEndDestructionData can only be end data for DestroyLinkAction or one of its specializations. OCL true LinkEndDestructionData for ordered nonunique association ends must have a single destroyAt input pin if isDestroyDuplicates is false. It must be of type UnlimitedNatural and have a multiplicity of 1..1. Otherwise, the action has no input pin for the removal position. OCL true Specifies whether to destroy duplicates of the value in nonunique association ends. Specifies the position of an existing link to be destroyed in ordered nonunique association ends. The type of the pin is UnlimitedNatural, but the value cannot be zero or unlimited. A value specification action is an action that evaluates a value specification. The type of value specification must be compatible with the type of the result pin. OCL true The multiplicity of the result pin is 1..1 OCL true Value specification to be evaluated. Gives the output pin on which the result is put. A time expression defines a value specification that represents a time value. The value of the time expression. Refers to the time and duration observations that are involved in expr. Duration defines a value specification that specifies the temporal distance between two time instants. The value of the Duration. Refers to the time and duration observations that are involved in expr. A duration interval defines the range between two durations. Refers to the Duration denoting the minimum value of the range. Refers to the Duration denoting the maximum value of the range. A time constraint is a constraint that refers to a time interval. A condition that must be true when evaluated in order for the constraint to be satisfied. The value of firstEvent is related to constrainedElement. If firstEvent is true, then the corresponding observation event is the first time instant the execution enters constrainedElement. If firstEvent is false, then the corresponding observation event is the last time instant the execution is within constrainedElement. A time interval defines the range between two time expressions. Refers to the TimeExpression denoting the maximum value of the range. Refers to the TimeExpression denoting the minimum value of the range. A duration constraint is a constraint that refers to a duration interval. The multiplicity of firstEvent must be 2 if the multiplicity of constrainedElement is 2. Otherwise the multiplicity of firstEvent is 0. OCL if (constrainedElement->size() =2) then (firstEvent->size() = 2) else (firstEvent->size() = 0) The interval constraining the duration. The value of firstEvent[i] is related to constrainedElement[i] (where i is 1 or 2). If firstEvent[i] is true, then the corresponding observation event is the first time instant the execution enters constrainedElement[i]. If firstEvent[i] is false, then the corresponding observation event is the last time instant the execution is within constrainedElement[i]. Default value is true applied when constrainedElement[i] refers an element that represents only one time instant. An interval constraint is a constraint that refers to an interval. A condition that must be true when evaluated in order for the constraint to be satisfied. An interval defines the range between two value specifications. Refers to the ValueSpecification denoting the minimum value of the range. Refers to the ValueSpecification denoting the maximum value of the range. Observation is a superclass of TimeObservation and DurationObservation in order for TimeExpression and Duration to refer to either in a simple way. A time observation is a reference to a time instant during an execution. It points out the element in the model to observe and whether the observation is when this model element is entered or when it is exited. The observation is determined by the entering or exiting of the event element during execution. The value of firstEvent is related to event. If firstEvent is true, then the corresponding observation event is the first time instant the execution enters event. If firstEvent is false, then the corresponding observation event is the time instant the execution exits event. A duration observation is a reference to a duration during an execution. It points out the element(s) in the model to observe and whether the observations are when this model element is entered or when it is exited. The multiplicity of firstEvent must be 2 if the multiplicity of event is 2. Otherwise the multiplicity of firstEvent is 0. OCL if (event->size() = 2) then (firstEvent->size() = 2) else (firstEvent->size() = 0) The observation is determined by the entering or exiting of the event element during execution. The value of firstEvent[i] is related to event[i] (where i is 1 or 2). If firstEvent[i] is true, then the corresponding observation event is the first time instant the execution enters event[i]. If firstEvent[i] is false, then the corresponding observation event is the time instant the execution exits event[i]. Default value is true applied when event[i] refers an element that represents only one time instant. A call event models the receipt by an object of a message invoking a call of an operation. Designates the operation whose invocation raised the call event. A change event models a change in the system configuration that makes a condition true. A Boolean-valued expression that will result in a change event whenever its value changes from false to true. A trigger relates an event to a behavior that may affect an instance of the classifier. The event that causes the trigger. An interface is a kind of classifier that represents a declaration of a set of coherent public features and obligations. An interface specifies a contract; any instance of a classifier that realizes the interface must fulfill that contract. The obligations that may be associated with an interface are in the form of various kinds of constraints (such as pre- and post-conditions) or protocol specifications, which may impose ordering restrictions on interactions through the interface. Interfaces may include receptions (in addition to operations). The visibility of all features owned by an interface must be public. OCL self.feature->forAll(f | f.visibility = #public) The attributes (i.e. the properties) owned by the class. The operations owned by the class. References all the Classifiers that are defined (nested) within the Class. References all the Interfaces redefined by this Interface. Receptions that objects providing this interface are willing to accept. A reception is a declaration stating that a classifier is prepared to react to the receipt of a signal. A reception designates a signal and specifies the expected behavioral response. The details of handling a signal are specified by the behavior associated with the reception or the classifier itself. A Reception can not be a query. OCL not self.isQuery The signal that this reception handles. A signal is a specification of send request instances communicated between objects. The receiving object handles the received request instances as specified by its receptions. The data carried by a send request (which was passed to it by the send invocation occurrence that caused that request) are represented as attributes of the signal. A signal is defined independently of the classifiers handling the signal occurrence. The attributes owned by the signal. A signal event represents the receipt of an asynchronous signal instance. A signal event may, for example, cause a state machine to trigger a transition. The specific signal that is associated with this event. A message event specifies the receipt by an object of either a call or a signal. A transition trigger associated with an any receive event specifies that the transition is to be triggered by the receipt of any message that is not explicitly referenced in another transition from the same vertex. A behaviored classifier may have an interface realization. A classifier can have behavior specifications defined in its namespace. One of these may specify the behavior of the classifier itself. If a behavior is classifier behavior, it does not have a specification. OCL self.classifierBehavior.notEmpty() implies self.specification.isEmpty() References behavior specifications owned by a classifier. A behavior specification that specifies the behavior of the classifier itself. The set of InterfaceRealizations owned by the BehavioredClassifier. Interface realizations reference the Interfaces of which the BehavioredClassifier is an implementation. References Trigger descriptions owned by a Classifier. An event is the specification of some occurrence that may potentially trigger effects by an object. An operation is a behavioral feature of a classifier that specifies the name, type, parameters, and constraints for invoking an associated behavior. An operation may invoke both the execution of method behaviors as well as other behavioral responses. An operation can have at most one return parameter; i.e., an owned parameter with the direction set to 'return' OCL self.ownedParameter->select(par | par.direction = #return)->size() <= 1 A bodyCondition can only be specified for a query operation. OCL bodyCondition->notEmpty() implies isQuery Specifies whether an execution of the BehavioralFeature leaves the state of the system unchanged (isQuery=true) or whether side effects may occur (isQuery=false). This information is derived from the return result for this Operation. Specifies whether the return parameter is ordered or not, if present. This information is derived from the return result for this Operation. Specifies whether the return parameter is unique or not, if present. This information is derived from the return result for this Operation. Specifies the lower multiplicity of the return parameter, if present. This information is derived from the return result for this Operation. Specifies the upper multiplicity of the return parameter, if present. The class that owns the operation. An optional set of Constraints on the state of the system when the Operation is invoked. An optional set of Constraints specifying the state of the system when the Operation is completed. References the Operations that are redefined by this Operation. The DataType that owns this Operation. An optional Constraint on the result values of an invocation of this Operation. This information is derived from the return result for this Operation. Specifies the return result of the operation, if present. Specifies the ordered set of formal parameters of this BehavioralFeature. Specifies the parameters owned by this Operation. References the Types representing exceptions that may be raised during an invocation of this operation. The Interface that owns this Operation. If this operation has a return parameter, isOrdered equals the value of isOrdered for that parameter. Otherwise isOrdered is false. OCL result = if returnResult()->notEmpty() then returnResult()->any().isOrdered else false endif If this operation has a return parameter, isUnique equals the value of isUnique for that parameter. Otherwise isUnique is true. OCL result = if returnResult()->notEmpty() then returnResult()->any().isUnique else true endif If this operation has a return parameter, lower equals the value of lower for that parameter. Otherwise lower is not defined. OCL result = if returnResult()->notEmpty() then returnResult()->any().lower else Set{} endif If this operation has a return parameter, upper equals the value of upper for that parameter. Otherwise upper is not defined. OCL result = if returnResult()->notEmpty() then returnResult()->any().upper else Set{} endif If this operation has a return parameter, type equals the value of type for that parameter. Otherwise type is not defined. OCL result = if returnResult()->notEmpty() then returnResult()->any().type else Set{} endif The query isConsistentWith() specifies, for any two Operations in a context in which redefinition is possible, whether redefinition would be consistent in the sense of maintaining type covariance. Other senses of consistency may be required, for example to determine consistency in the sense of contravariance. Users may define alternative queries under names different from 'isConsistentWith()', as for example, users may define a query named 'isContravariantWith()'. A redefining operation is consistent with a redefined operation if it has the same number of owned parameters, and the type of each owned parameter conforms to the type of the corresponding redefined parameter. OCL redefinee.isRedefinitionContextValid(self) OCL result = (redefinee.oclIsKindOf(Operation) and let op: Operation = redefinee.oclAsType(Operation) in self.ownedParameter.size() = op.ownedParameter.size() and forAll(i | op.ownedParameter[i].type.conformsTo(self.ownedParameter[i].type)) ) The query returnResult() returns the set containing the return parameter of the Operation if one exists, otherwise, it returns an empty set OCL result = ownedParameter->select (par | par.direction = #return) CallConcurrencyKind is an enumeration type. No concurrency management mechanism is associated with the operation and, therefore, concurrency conflicts may occur. Instances that invoke a behavioral feature need to coordinate so that only one invocation to a target on any behavioral feature occurs at once. Multiple invocations of a behavioral feature may occur simultaneously to one instance, but only one is allowed to commence. The others are blocked until the performance of the first behavioral feature is complete. It is the responsibility of the system designer to ensure that deadlocks do not occur due to simultaneous blocks. Multiple invocations of a behavioral feature may occur simultaneously to one instance and all of them may proceed concurrently. State machines can be used to express the behavior of part of a system. Behavior is modeled as a traversal of a graph of state nodes interconnected by one or more joined transition arcs that are triggered by the dispatching of series of (event) occurrences. During this traversal, the state machine executes a series of activities associated with various elements of the state machine. The classifier context of a state machine cannot be an interface. OCL context->notEmpty() implies not context.oclIsKindOf(Interface) The context classifier of the method state machine of a behavioral feature must be the classifier that owns the behavioral feature. OCL specification->notEmpty() implies (context->notEmpty() and specification->featuringClassifier->exists (c | c = context)) The connection points of a state machine are pseudostates of kind entry point or exit point. OCL conectionPoint->forAll (c | c.kind = #entryPoint or c.kind = #exitPoint) A state machine as the method for a behavioral feature cannot have entry/exit connection points. OCL specification->notEmpty() implies connectionPoint->isEmpty() The regions owned directly by the state machine. The connection points defined for this state machine. They represent the interface of the state machine when used as part of submachine state. The state machines of which this is an extension. References the submachine(s) in case of a submachine state. Multiple machines are referenced in case of a concurrent state. The operation LCA(s1,s2) returns an orthogonal state or region which is the least common ancestor of states s1 and s2, based on the statemachine containment hierarchy. OCL true The query ancestor(s1, s2) checks whether s2 is an ancestor state of state s1. context StateMachine::ancestor (s1 : State, s2 : State) : Boolean OCL result = if (s2 = s1) then true else if (s1.container->isEmpty) then true else if (s2.container->isEmpty) then false else (ancestor (s1, s2.container)) The query isRedefinitionContextValid() specifies whether the redefinition contexts of a statemachine are properly related to the redefinition contexts of the specified statemachine to allow this element to redefine the other. The containing classifier of a redefining statemachine must redefine the containing classifier of the redefined statemachine. OCL result = true The query isConsistentWith() specifies that a redefining state machine is consistent with a redefined state machine provided that the redefining state machine is an extension of the redefined state machine: Regions are inherited and regions can be added, inherited regions can be redefined. In case of multiple redefining state machines, extension implies that the redefining state machine gets orthogonal regions for each of the redefined state machines. OCL result = true A state models a situation during which some (usually implicit) invariant condition holds. Only submachine states can have connection point references. OCL isSubmachineState implies connection->notEmpty ( ) The connection point references used as destinations/sources of transitions associated with a submachine state must be defined as entry/exit points in the submachine state machine. OCL self.isSubmachineState implies (self.connection->forAll (cp | cp.entry->forAll (p | p.statemachine = self.submachine) and cp.exit->forAll (p | p.statemachine = self.submachine))) A state is not allowed to have both a submachine and regions. OCL isComposite implies not isSubmachineState Only composite states can have entry or exit pseudostates defined. OCL connectionPoint->notEmpty() implies isComoposite Only entry or exit pseudostates can serve as connection points. OCL connectionPoint->forAll(cp|cp.kind = #entry or cp.kind = #exit) A state with isComposite=true is said to be a composite state. A composite state is a state that contains at least one region. A state with isOrthogonal=true is said to be an orthogonal composite state. An orthogonal composite state contains two or more regions. A state with isSimple=true is said to be a simple state. A simple state does not have any regions and it does not refer to any submachine state machine. A state with isSubmachineState=true is said to be a submachine state. Such a state refers to a state machine (submachine). The state machine that is to be inserted in place of the (submachine) state. The entry and exit connection points used in conjunction with this (submachine) state, i.e. as targets and sources, respectively, in the region with the submachine state. A connection point reference references the corresponding definition of a connection point pseudostate in the statemachine referenced by the submachinestate. The state of which this state is a redefinition. The regions owned directly by the state. References the classifier in which context this element may be redefined. Specifies conditions that are always true when this state is the current state. In protocol state machines, state invariants are additional conditions to the preconditions of the outgoing transitions, and to the postcondition of the incoming transitions. An optional behavior that is executed whenever this state is entered regardless of the transition taken to reach the state. If defined, entry actions are always executed to completion prior to any internal behavior or transitions performed within the state. An optional behavior that is executed whenever this state is exited regardless of which transition was taken out of the state. If defined, exit actions are always executed to completion only after all internal activities and transition actions have completed execution. An optional behavior that is executed while being in the state. The execution starts when this state is entered, and stops either by itself, or when the state is exited, whichever comes first. The entry and exit pseudostates of a composite state. These can only be entry or exit Pseudostates, and they must have different names. They can only be defined for composite states. A list of triggers that are candidates to be retained by the state machine if they trigger no transitions out of the state (not consumed). A deferred trigger is retained until the state machine reaches a state configuration where it is no longer deferred. A simple state is a state without any regions. OCL result = region.isEmpty() A composite state is a state with at least one region. OCL result = region.notEmpty() An orthogonal state is a composite state with at least 2 regions OCL result = (region->size () > 1) Only submachine states can have a reference statemachine. OCL result = submachine.notEmpty() The redefinition context of a state is the nearest containing statemachine. OCL result = let sm = containingStateMachine() in if sm.context->isEmpty() or sm.general->notEmpty() then sm else sm.context endif The query isRedefinitionContextValid() specifies whether the redefinition contexts of a state are properly related to the redefinition contexts of the specified state to allow this element to redefine the other. The containing region of a redefining state must redefine the containing region of the redefined state. OCL result = true The query isConsistentWith() specifies that a redefining state is consistent with a redefined state provided that the redefining state is an extension of the redefined state: A simple state can be redefined (extended) to become a composite state (by adding a region) and a composite state can be redefined (extended) by adding regions and by adding vertices, states, and transitions to inherited regions. All states may add or replace entry, exit, and 'doActivity' actions. OCL result = true The query containingStateMachine() returns the state machine that contains the state either directly or transitively. OCL result = container.containingStateMachine() A transition is a directed relationship between a source vertex and a target vertex. It may be part of a compound transition, which takes the state machine from one state configuration to another, representing the complete response of the state machine to an occurrence of an event of a particular type. A fork segment must not have guards or triggers. OCL (source.oclIsKindOf(Pseudostate) and source.kind = #fork) implies (guard->isEmpty() and trigger->isEmpty()) A join segment must not have guards or triggers. OCL (target.oclIsKindOf(Pseudostate) and target.kind = #join) implies (guard->isEmpty() and trigger->isEmpty()) A fork segment must always target a state. OCL (source.oclIsKindOf(Pseudostate) and source.kind = #fork) implies (target.oclIsKindOf(State)) A join segment must always originate from a state. OCL (target.oclIsKindOf(Pseudostate) and target.kind = #join) implies (source.oclIsKindOf(State)) Transitions outgoing pseudostates may not have a trigger. OCL source.oclIsKindOf(Pseudostate) and ((source.kind <> #junction) and (source.kind <> #join) and (source.kind <> #initial)) implies trigger->isEmpty() An initial transition at the topmost level (region of a statemachine) either has no trigger or it has a trigger with the stereotype <<create>>. OCL self.source.oclIsKindOf(Pseudostate) implies (self.source.oclAsType(Pseudostate).kind = #initial) implies (self.source.container = self.stateMachine.top) implies ((self.trigger->isEmpty) or (self.trigger.stereotype.name = 'create')) In case of more than one trigger, the signatures of these must be compatible in case the parameters of the signal are assigned to local variables/attributes. OCL true Indicates the precise type of the transition. Designates the region that owns this transition. Designates the originating vertex (state or pseudostate) of the transition. Designates the target vertex that is reached when the transition is taken. The transition that is redefined by this transition. A guard is a constraint that provides a fine-grained control over the firing of the transition. The guard is evaluated when an event occurrence is dispatched by the state machine. If the guard is true at that time, the transition may be enabled, otherwise, it is disabled. Guards should be pure expressions without side effects. Guard expressions with side effects are ill formed. References the classifier in which context this element may be redefined. Specifies an optional behavior to be performed when the transition fires. Specifies the triggers that may fire the transition. The redefinition context of a transition is the nearest containing statemachine. OCL result = let sm = containingStateMachine() in if sm.context->isEmpty() or sm.general->notEmpty() then sm else sm.context endif The query isConsistentWith() specifies that a redefining transition is consistent with a redefined transition provided that the redefining transition has the following relation to the redefined transition: A redefining transition redefines all properties of the corresponding redefined transition, except the source state and the trigger. OCL result = (redefinee.oclIsKindOf(Transition) and let trans: Transition = redefinee.oclAsType(Transition) in (source() = trans.source() and trigger() = tran.trigger()) OCL redefinee.isRedefinitionContextValid(self) The query containingStateMachine() returns the state machine that contains the transition either directly or transitively. OCL result = container.containingStateMachine() A vertex is an abstraction of a node in a state machine graph. In general, it can be the source or destination of any number of transitions. The region that contains this vertex. Specifies the transitions departing from this vertex. Specifies the transitions entering this vertex. The operation containingStateMachine() returns the state machine in which this Vertex is defined OCL result = if not container->isEmpty() then -- the container is a region container.containingStateMachine() else if (oclIsKindOf(Pseudostate)) then -- entry or exit point? if (kind = #entryPoint) or (kind = #exitPoint) then stateMachine else if (oclIsKindOf(ConnectionPointReference)) then state.containingStateMachine() -- no other valid cases possible endif A pseudostate is an abstraction that encompasses different types of transient vertices in the state machine graph. An initial vertex can have at most one outgoing transition. OCL (self.kind = #initial) implies (self.outgoing->size <= 1) History vertices can have at most one outgoing transition. OCL ((self.kind = #deepHistory) or (self.kind = #shallowHistory)) implies (self.outgoing->size <= 1) In a complete statemachine, a join vertex must have at least two incoming transitions and exactly one outgoing transition. OCL (self.kind = #join) implies ((self.outgoing->size = 1) and (self.incoming->size >= 2)) All transitions incoming a join vertex must originate in different regions of an orthogonal state. OCL (self.kind = #join) implies self.incoming->forAll (t1, t2 | t1<>t2 implies (self.stateMachine.LCA(t1.source, t2.source).container.isOrthogonal)) In a complete statemachine, a fork vertex must have at least two outgoing transitions and exactly one incoming transition. OCL (self.kind = #fork) implies ((self.incoming->size = 1) and (self.outgoing->size >= 2)) All transitions outgoing a fork vertex must target states in different regions of an orthogonal state. OCL (self.kind = #fork) implies self.outgoing->forAll (t1, t2 | t1<>t2 implies (self.stateMachine.LCA(t1.target, t2.target).container.isOrthogonal)) In a complete statemachine, a junction vertex must have at least one incoming and one outgoing transition. OCL (self.kind = #junction) implies ((self.incoming->size >= 1) and (self.outgoing->size >= 1)) In a complete statemachine, a choice vertex must have at least one incoming and one outgoing transition. OCL (self.kind = #choice) implies ((self.incoming->size >= 1) and (self.outgoing->size >= 1)) The outgoing transition from and initial vertex may have a behavior, but not a trigger or a guard. OCL (self.kind = #initial) implies (self.outgoing.guard->isEmpty() and self.outgoing.trigger->isEmpty()) Determines the precise type of the Pseudostate and can be one of: entryPoint, exitPoint, initial, deepHistory, shallowHistory, join, fork, junction, terminate or choice. The StateMachine in which this Pseudostate is defined. This only applies to Pseudostates of the kind entryPoint or exitPoint. The State that owns this pseudostate and in which it appears. A special kind of state signifying that the enclosing region is completed. If the enclosing region is directly contained in a state machine and all other regions in the state machine also are completed, then it means that the entire state machine is completed. A final state cannot have any outgoing transitions. OCL self.outgoing->size() = 0 A final state cannot have regions. OCL self.region->size() = 0 A final state cannot reference a submachine. OCL self.submachine->isEmpty() A final state has no entry behavior. OCL self.entry->isEmpty() A final state has no exit behavior. OCL self.exit->isEmpty() A final state has no state (doActivity) behavior. OCL self.doActivity->isEmpty() A connection point reference represents a usage (as part of a submachine state) of an entry/exit point defined in the statemachine reference by the submachine state. The entry Pseudostates must be Pseudostates with kind entryPoint. OCL entry->notEmpty() implies entry->forAll(e | e.kind = #entryPoint) The exit Pseudostates must be Pseudostates with kind exitPoint. OCL exit->notEmpty() implies exit->forAll(e | e.kind = #exitPoint) The entryPoint kind pseudo states corresponding to this connection point. The State in which the connection point refreshens are defined. The exitPoints kind pseudo states corresponding to this connection point. A region is an orthogonal part of either a composite state or a state machine. It contains states and transitions. A region can have at most one initial vertex OCL self.subvertex->select (v | v.oclIsKindOf(Pseudostate))-> select(p : Pseudostate | p.kind = #initial)->size() <= 1 A region can have at most one deep history vertex OCL self.subvertex->select (v | v.oclIsKindOf(Pseudostate))-> select(p : Pseudostate | p.kind = #deepHistory)->size() <= 1 A region can have at most one shallow history vertex OCL self.subvertex->select(v | v.oclIsKindOf(Pseudostate))-> select(p : Pseudostate | p.kind = #shallowHistory)->size() <= 1 If a Region is owned by a StateMachine, then it cannot also be owned by a State and vice versa. OCL (stateMachine->notEmpty() implies state->isEmpty()) and (state->notEmpty() implies stateMachine->isEmpty()) The set of vertices that are owned by this region. The set of transitions owned by the region. Note that internal transitions are owned by a region, but applies to the source state. The StateMachine that owns the Region. If a Region is owned by a StateMachine, then it cannot also be owned by a State. The State that owns the Region. If a Region is owned by a State, then it cannot also be owned by a StateMachine. The region of which this region is an extension. References the classifier in which context this element may be redefined. The redefinition context of a region is the nearest containing statemachine OCL result = let sm = containingStateMachine() in if sm.context->isEmpty() or sm.general->notEmpty() then sm else sm.context endif 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. OCL result = true 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. OCL result = true The operation containingStateMachine() returns the sate machine in which this Region is defined OCL result = if stateMachine->isEmpty() then state.containingStateMachine() else stateMachine endif A time event specifies a point in time. At the specified time, the event occurs. A time event can be defined relative to entering the current state of the executing state machine. The ValueSpecification when must return a non-negative Integer. OCL true The starting time for a relative time event may only be omitted for a time event that is the trigger of a state machine. OCL true Specifies whether it is relative or absolute time. Specifies the corresponding time deadline. PseudostateKind is an enumeration type. An initial pseudostate represents a default vertex that is the source for a single transition to the default state of a composite state. There can be at most one initial vertex in a region. The outgoing transition from the initial vertex may have a behavior, but not a trigger or guard. DeepHistory represents the most recent active configuration of the composite state that directly contains this pseudostate; e.g. the state configuration that was active when the composite state was last exited. A composite state can have at most one deep history vertex. At most one transition may originate from the history connector to the default deep history state. This transition is taken in case the composite state had never been active before. Entry actions of states entered on the path to the state represented by a deep history are performed. ShallowHistory represents the most recent active substate of its containing state (but not the substates of that substate). A composite state can have at most one shallow history vertex. A transition coming into the shallow history vertex is equivalent to a transition coming into the most recent active substate of a state. At most one transition may originate from the history connector to the default shallow history state. This transition is taken in case the composite state had never been active before. Entry actions of states entered on the path to the state represented by a shallow history are performed. Join vertices serve to merge several transitions emanating from source vertices in different orthogonal regions. The transitions entering a join vertex cannot have guards or triggers. Fork vertices serve to split an incoming transition into two or more transitions terminating on orthogonal target vertices (i.e. vertices in different regions of a composite state). The segments outgoing from a fork vertex must not have guards or triggers. Junction vertices are semantic-free vertices that are used to chain together multiple transitions. They are used to construct compound transition paths between states. For example, a junction can be used to converge multiple incoming transitions into a single outgoing transition representing a shared transition path (this is known as an merge). Conversely, they can be used to split an incoming transition into multiple outgoing transition segments with different guard conditions. This realizes a static conditional branch. (In the latter case, outgoing transitions whose guard conditions evaluate to false are disabled. A predefined guard denoted 'else' may be defined for at most one outgoing transition. This transition is enabled if all the guards labeling the other transitions are false.) Static conditional branches are distinct from dynamic conditional branches that are realized by choice vertices (described below). Choice vertices which, when reached, result in the dynamic evaluation of the guards of the triggers of its outgoing transitions. This realizes a dynamic conditional branch. It allows splitting of transitions into multiple outgoing paths such that the decision on which path to take may be a function of the results of prior actions performed in the same run-tocompletion step. If more than one of the guards evaluates to true, an arbitrary one is selected. If none of the guards evaluates to true, then the model is considered ill-formed. (To avoid this, it is recommended to define one outgoing transition with the predefined else guard for every choice vertex.) Choice vertices should be distinguished from static branch points that are based on junction points (described above). An entry point pseudostate is an entry point of a state machine or composite state. In each region of the state machine or composite state it has a single transition to a vertex within the same region. An exit point pseudostate is an exit point of a state machine or composite state. Entering an exit point within any region of the composite state or state machine referenced by a submachine state implies the exit of this composite state or submachine state and the triggering of the transition that has this exit point as source in the state machine enclosing the submachine or composite state. Entering a terminate pseudostate implies that the execution of this state machine by means of its context object is terminated. The state machine does not exit any states nor does it perform any exit actions other than those associated with the transition leading to the terminate pseudostate. Entering a terminate pseudostate is equivalent to invoking a DestroyObjectAction. TransitionKind is an enumeration type. The source state of a transition with transition kind local must be a composite state. OCL kind=#local implies owner.source.isComposite The source state of a transition with transition kind external must be a composite state. OCL kind=#external implies owner.source.isComposite Implies that the transition, if triggered, occurs without exiting or entering the source state. Thus, it does not cause a state change. This means that the entry or exit condition of the source state will not be invoked. An internal transition can be taken even if the state machine is in one or more regions nested within this state. Implies that the transition, if triggered, will not exit the composite (source) state, but it will apply to any state within the composite state, and these will be exited and entered. Implies that the transition, if triggered, will exit the composite (source) state. A port is a property of a classifier that specifies a distinct interaction point between that classifier and its environment or between the (behavior of the) classifier and its internal parts. Ports are connected to properties of the classifier by connectors through which requests can be made to invoke the behavioral features of a classifier. A Port may specify the services a classifier provides (offers) to its environment as well as the services that a classifier expects (requires) of its environment. The required interfaces of a port must be provided by elements to which the port is connected. OCL true Port.aggregation must be composite. OCL true When a port is destroyed, all connectors attached to this port will be destroyed also. OCL true A defaultValue for port cannot be specified when the type of the Port is an Interface OCL true Specifies whether requests arriving at this port are sent to the cla