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. An element is a constituent of a model. As such, it has the capability of owning other elements. An element may not directly or indirectly own itself. OCL not self.allOwnedElements()->includes(self) Elements that must be owned must have an owner. OCL self.mustBeOwned() implies owner->notEmpty() The Elements owned by this element. The Element that owns this element. The Comments owned by this element. The query allOwnedElements() gives all of the direct and indirect owned elements of an element. OCL result = ownedElement->union(ownedElement->collect(e | e.allOwnedElements())) The query mustBeOwned() indicates whether elements of this type must have an owner. Subclasses of Element that do not require an owner must override this operation. OCL result = true 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 generalization is a taxonomic relationship between a more general classifier and a more specific classifier. Each instance of the specific classifier is also an indirect instance of the general classifier. Thus, the specific classifier inherits the features of the more general classifier. Indicates whether the specific classifier can be used wherever the general classifier can be used. If true, the execution traces of the specific classifier will be a superset of the execution traces of the general classifier. References the specializing classifier in the Generalization relationship. References the general classifier in the Generalization relationship. A parameter is a specification of an argument used to pass information into or out of an invocation of a behavioral feature. Indicates whether a parameter is being sent into or out of a behavioral element. Specifies a String that represents a value to be used when no argument is supplied for the Parameter. Specifies a ValueSpecification that represents a value to be used when no argument is supplied for the Parameter. References the Operation owning this parameter. 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 is used to group elements, and provides a namespace for the grouped elements. If an element that is owned by a package has visibility, it is public or private. OCL self.ownedElements->forAll(e | e.visibility->notEmpty() implies e.visbility = #public or e.visibility = #private) References the PackageMerges that are owned by this Package. Specifies the packageable elements that are owned by this Package. References the packaged elements that are Types. References the packaged elements that are Packages. References the Package that owns this Package. The query mustBeOwned() indicates whether elements of this type must have an owner. OCL result = false The query visibleMembers() defines which members of a Package can be accessed outside it. OCL result = member->select( m | self.makesVisible(m)) The query makesVisible() defines whether a Package makes an element visible outside itself. Elements with no visibility and elements with public visibility are made visible. OCL self.member->includes(el) OCL result = (ownedMember->includes(el)) or (elementImport->select(ei|ei.importedElement = #public)->collect(ei|ei.importedElement)->includes(el)) or (packageImport->select(pi|pi.visibility = #public)->collect(pi|pi.importedPackage.member->includes(el))->notEmpty()) 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. Behavior is a specification of how its context classifier changes state over time. This specification may be either a definition of possible behavior execution or emergent behavior, or a selective illustration of an interesting subset of possible executions. The latter form is typically used for capturing examples, such as a trace of a particular execution. The parameters of the behavior must match the parameters of the implemented behavioral feature. OCL true The implemented behavioral feature must be a feature (possibly inherited) of the context classifier of the behavior. OCL true If the implemented behavioral feature has been redefined in the ancestors of the owner of the behavior, then the behavior must realize the latest redefining behavioral feature. OCL true There may be at most one behavior for a given pairing of classifier (as owner of the behavior) and behavioral feature (as specification of the behavior). OCL true Tells whether the behavior can be invoked while it is still executing from a previous invocation. References a behavior that this behavior redefines. A subtype of Behavior may redefine any other subtype of Behavior. If the behavior implements a behavioral feature, it replaces the redefined behavior. If the behavior is a classifier behavior, it extends the redefined behavior. Designates a behavioral feature that the behavior implements. The behavioral feature must be owned by the classifier that owns the behavior or be inherited by it. The parameters of the behavioral feature and the implementing behavior must match. If a behavior does not have a specification, it is directly associated with a classifier (i.e., it is the behavior of the classifier as a whole). References a list of parameters to the behavior which describes the order and type of arguments that can be given when the behavior is invoked and of the values which will be returned when the behavior completes its execution. The classifier that is the context for the execution of the behavior. If the behavior is owned by a BehavioredClassifier, that classifier is the context. Otherwise, the context is the first BehavioredClassifier reached by following the chain of owner relationships. For example, following this algorithm, the context of an entry action in a state machine is the classifier that owns the state machine. The features of the context classifier as well as the elements visible to the context classifier are visible to the behavior. An optional set of Constraints specifying what must be fulfilled when the behavior is invoked. An optional set of Constraints specifying what is fulfilled after the execution of the behavior is completed, if its precondition was fulfilled before its invocation. 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 defi