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 named element is an element in a model that may have a name. If there is no name, or one of the containing namespaces has no name, there is no qualified name. OCL (self.name->isEmpty() or self.allNamespaces()->select(ns | ns.name->isEmpty())->notEmpty()) implies self.qualifiedName->isEmpty() When there is a name, and all of the containing namespaces have a name, the qualified name is constructed from the names of the containing namespaces. OCL (self.name->notEmpty() and self.allNamespaces()->select(ns | ns.name->isEmpty())->isEmpty()) implies self.qualifiedName = self.allNamespaces()->iterate( ns : Namespace; result: String = self.name | ns.name->union(self.separator())->union(result)) The name of the NamedElement. A name which allows the NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from the names of the containing namespaces starting at the root of the hierarchy and ending with the name of the NamedElement itself. Specifies the namespace that owns the NamedElement. The query allNamespaces() gives the sequence of namespaces in which the NamedElement is nested, working outwards. OCL result = if self.namespace->isEmpty() then Sequence{} else self.namespace.allNamespaces()->prepend(self.namespace) endif The query isDistinguishableFrom() determines whether two NamedElements may logically co-exist within a Namespace. By default, two named elements are distinguishable if (a) they have unrelated types or (b) they have related types but different names. OCL result = if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType) then ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))->isEmpty() else true endif The query separator() gives the string that is used to separate names when constructing a qualified name. OCL result = '::' When there is a name, and all of the containing namespaces have a name, the qualified name is constructed from the names of the containing namespaces. OCL result = if self.name->notEmpty() and self.allNamespaces()->select(ns | ns.name->isEmpty())->isEmpty() then self.allNamespaces()->iterate( ns : Namespace; result: String = self.name | ns.name->union(self.separator())->union(result)) else Set{} endif 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() A collection of NamedElements owned by the Namespace. A collection of NamedElements identifiable within the Namespace, either by being owned or by being introduced by importing or inheritance. 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. Those semantics are specified by overriding the getNamesOfMember operation. The specification here simply returns a set containing a single name, or the empty set if no name. OCL result = if member->includes(element) then Set{}->including(element.name) else Set{} endif The Boolean query membersAreDistinguishable() determines whether all of the namespaces members are distinguishable within it. OCL result = self.member->forAll( memb | self.member->excluding(memb)->forAll(other | memb.isDistinguishableFrom(other, self))) A classifier is a classification of instances - it describes a set of instances that have features in common. Specifies each feature defined in the classifier. The query allFeatures() gives all of the features in the namespace of the classifier. In general, through mechanisms such as inheritance, this will be a larger set than feature. OCL result = member->select(oclIsKindOf(Feature)) A feature declares a behavioral or structural characteristic of instances of classifiers. The Classifiers that have this Feature as a feature. An opaque expression is an uninterpreted textual statement that denotes a (possibly empty) set of values when evaluated in a context. 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. 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 An expression is a structured tree of symbols that denotes a (possibly empty) set of values when evaluated in a context. The symbol associated with the node in the expression tree. Specifies a sequence of operands. MultiplicityElement supports the use of value specifications to define each bound of the multiplicity. Specifies the lower bound of the multiplicity interval. Specifies the upper bound of the multiplicity interval. The specification of the upper bound for this multiplicity. The specification of the lower bound for this multiplicity. The derived lower attribute must equal the lowerBound. OCL result = lowerBound() The derived upper attribute must equal the upperBound. OCL result = upperBound() The query lowerBound() returns the lower bound of the multiplicity as an integer. OCL result = if lowerValue->isEmpty() then 1 else lowerValue.integerValue() endif The query upperBound() returns the upper bound of the multiplicity as an unlimited natural. OCL result = if upperValue->isEmpty() then 1 else upperValue.unlimitedValue() endif A behavioral feature is a feature of a classifier that specifies an aspect of the behavior of its instances. Specifies the parameters of the BehavioralFeature. The query isDistinguishableFrom() determines whether two BehavioralFeatures may coexist in the same Namespace. It specifies that they have to have different signatures. OCL result = if n.oclIsKindOf(BehavioralFeature) then if ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))->notEmpty() then Set{}->including(self)->including(n)->isUnique( bf | bf.parameter->collect(type)) else true endif else true endif A parameter is a specification of an argument used to pass information into or out of an invocation of a behavioral feature. 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) ) 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. The classifier or classifiers of the represented instance. If multiple classifiers are specified, the instance is classified by all of them. 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 value or values corresponding to the defining feature for the owning instance specification. The structural feature that specifies the values that may be held by the slot. An instance value is a value specification that identifies an instance. The instance that is the specified value. 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)) 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 instance of the general classifier. Thus, the specific classifier indirectly has features of the more general classifier. References the specializing classifier in the Generalization relationship. References the general classifier in the Generalization relationship. A classifier is a type and can own generalizations, thereby making it possible to define generalization relationships to other classifiers. Specifies the Generalization relationships for this Classifier. These Generalizations navigate to more general classifiers in the generalization hierarchy. Specifies the general Classifiers for this Classifier. The general classifiers are the classifiers referenced by the generalization relationships. OCL result = self.parents() The query parents() gives all of the immediate ancestors of a generalized Classifier. OCL result = generalization.general The query conformsTo() gives true for a classifier that defines a type that conforms to another. This is used, for example, in the specification of signature conformance for operations. OCL result = (self=other) or (self.allParents()->includes(other)) 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. Relationship is an abstract concept that specifies some kind of relationship between elements. Specifies the elements related by the Relationship. StructuralFeature has an attribute that determines whether a client may modify its value. States whether the feature's value may be modified by a client. A structural feature is a typed feature of a classifier that specifies the structure of instances of the classifier. 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 Namespace that owns this NamedElement. A condition that must be true when evaluated in order for the constraint to be satisfied. The ordered set of Elements referenced by this Constraint. A namespace can own constraints. A constraint associated with a namespace may either apply to the namespace itself, or it may apply to elements in the namespace. Specifies a set of Constraints owned by this Namespace. A collection of NamedElements owned by the Namespace. A collection of NamedElements identifiable within the Namespace, either by being owned or by being introduced by importing or inheritance. A named element is an element in a model that may have a name. Specifies the namespace that owns the NamedElement. NamedElement has a visibility attribute. If a NamedElement is not owned by a Namespace, it does not have a visibility. OCL namespace->isEmpty() implies visibility->isEmpty() Determines where the NamedElement appears within different Namespaces within the overall model, and its accessibility. 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 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 classifier can specify a generalization hierarchy by referencing its general classifiers. Generalization hierarchies must be directed and acyclical. A classifier can not be both a transitively general and transitively specific classifier of the same classifier. OCL not self.allParents()->includes(self) A classifier may only specialize classifiers of a valid type. OCL self.parents()->forAll(c | self.maySpecializeType(c)) If true, the Classifier does not provide a complete declaration and can typically not be instantiated. An abstract classifier is intended to be used by other classifiers e.g. as the target of general metarelationships or generalization relationships. Specifies all elements inherited by this classifier from the general classifiers. Specifies the more general classifiers in the generalization hierarchy for this Classifier. The inheritedMember association is derived by inheriting the inheritable members of the parents. OCL result = self.inherit(self.parents()->collect(p | p.inheritableMembers(self)) The query parents() gives all of the immediate ancestors of a generalized Classifier. OCL result = general The query allParents() gives all of the direct and indirect ancestors of a generalized Classifier. OCL result = self.parents()->union(self.parents()->collect(p | p.allParents()) The query inheritableMembers() gives all of the members of a classifier that may be inherited in one of its descendants, subject to whatever visibility restrictions apply. OCL c.allParents()->includes(self) OCL result = member->select(m | c.hasVisibilityOf(m)) The query hasVisibilityOf() determines whether a named element is visible in the classifier. By default all are visible. It is only called when the argument is something owned by a parent. OCL self.allParents()->collect(c | c.member)->includes(n) OCL result = if (self.inheritedMember->includes (n)) then (n.visibility <> #private) else true The query inherit() defines how to inherit a set of elements. Here the operation is defined to inherit them all. It is intended to be redefined in circumstances where inheritance is affected by redefinition. OCL result = inhs The query maySpecializeType() determines whether this classifier may have a generalization relationship to classifiers of the specified type. By default a classifier may specialize classifiers of the same or a more general type. It is intended to be redefined by classifiers that have different specialization constraints. OCL result = self.oclIsKindOf(c.oclType) 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 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 specification identifies a literal constant being modeled. 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 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 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 multiplicity is a definition of an inclusive interval of non-negative integers beginning with a lower bound and ending with a (possibly infinite) upper bound. A multiplicity element embeds this information to specify the allowable cardinalities for an instantiation of this element. A multiplicity must define at least one valid cardinality that is greater than zero. OCL upperBound()->notEmpty() implies upperBound() > 0 The lower bound must be a non-negative integer literal. OCL lowerBound()->notEmpty() implies lowerBound() >= 0 The upper bound must be greater than or equal to the lower bound. OCL (upperBound()->notEmpty() and lowerBound()->notEmpty()) implies upperBound() >= lowerBound() For a multivalued multiplicity, this attribute specifies whether the values in an instantiation of this element are sequentially ordered. For a multivalued multiplicity, this attributes specifies whether the values in an instantiation of this element are unique. Specifies the lower bound of the multiplicity interval. Specifies the upper bound of the multiplicity interval. The query lowerBound() returns the lower bound of the multiplicity as an integer. OCL result = if lower->notEmpty() then lower else 1 endif The query upperBound() returns the upper bound of the multiplicity for a bounded multiplicity as an unlimited natural. OCL result = if upper->notEmpty() then upper else 1 endif The query isMultivalued() checks whether this multiplicity has an upper bound greater than one. OCL upperBound()->notEmpty() OCL result = upperBound() > 1 The query includesCardinality() checks whether the specified cardinality is valid for this multiplicity. OCL upperBound()->notEmpty() and lowerBound()->notEmpty() includesCardinality = (lowerBound() <= C) and (upperBound() >= C) OCL result = (lowerBound() <= C) and (upperBound() >= C) The query includesMultiplicity() checks whether this multiplicity includes all the cardinalities allowed by the specified multiplicity. OCL self.upperBound()->notEmpty() and self.lowerBound()->notEmpty() and M.upperBound()->notEmpty() and M.lowerBound()->notEmpty() OCL result = (self.lowerBound() <= M.lowerBound()) and (self.upperBound() >= M.upperBound()) An element is a constituent of a model. A type constrains the values represented by a typed element. 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 A typed element has a type. The type of the TypedElement. 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 class is a type that has objects as its instances. True when a class is abstract. The attributes owned by a class. These do not include the inherited attributes. Attributes are represented by instances of Property. The operations owned by a class. These do not include the inherited operations. The immediate superclasses of a class, from which the class inherits. An operation is owned by a class and may be invoked in the context of objects that are instances of that class. It is a typed element and a multiplicity element. The exceptions that are declared as possible during an invocation of the operation. The parameters to the operation. The class that owns the operation. A parameter is a typed element that represents a parameter of an operation. The operation that owns the parameter. A property is a typed element that represents an attribute of a class. If isReadOnly is true, the attribute may not be written to after initialization. A string that is evaluated to give a default value for the attribute when an object of the owning class is instantiated. If isComposite is true, the object containing the attribute is a container for the object or value contained in the attribute. If isDerived is true, the value of the attribute is derived from information elsewhere. The class that owns the property, and of which the property is an attribute. Two attributes attr1 and attr2 of two objects o1 and o2 (which may be the same object) may be paired with each other so that o1.attr1 refers to o2 if and only if o2.attr2 refers to o1. In such a case attr1 is the opposite of attr2 and attr2 is the opposite of attr1. A type is a named element that is used as the type for a typed element. A type can be contained in a package. Specifies the owning package of this classifier, if any. A named element represents an element with a name. The name of the NamedElement. A typed element is a kind of named element that represents an element with a type. The type of the TypedElement. An enumeration defines a set of literals that can be used as its values. The ordered set of literals for this Enumeration. An enumeration literal is a value of an enumeration. The Enumeration that this EnumerationLiteral is a member of. A primitive type is a data type implemented by the underlying infrastructure and made available for modeling. A package is a container for types and other packages. The set of contained packages. The containing package. The set of contained types. DataType is an abstract class that acts as a common superclass for different kinds of data types. A multiplicity is a definition of an inclusive interval of non-negative integers beginning with a lower bound and ending with a (possibly infinite) upper bound. A multiplicity element embeds this information to specify the allowable cardinalities for an instantiation of this element. A multiplicity must define at least one valid cardinality that is greater than zero. OCL upperBound()->notEmpty() implies upperBound() > 0 The lower bound must be a non-negative integer literal. OCL lowerBound()->notEmpty() implies lowerBound() >= 0 The upper bound must be greater than or equal to the lower bound. OCL (upperBound()->notEmpty() and lowerBound()->notEmpty()) implies upperBound() >= lowerBound() For a multivalued multiplicity, this attribute specifies whether the values in an instantiation of this element are sequentially ordered. For a multivalued multiplicity, this attributes specifies whether the values in an instantiation of this element are unique. Specifies the lower bound of the multiplicity interval. Specifies the upper bound of the multiplicity interval. The query lowerBound() returns the lower bound of the multiplicity as an integer. OCL result = if lower->notEmpty() then lower else 1 endif The query upperBound() returns the upper bound of the multiplicity for a bounded multiplicity as an unlimited natural. OCL result = if upper->notEmpty() then upper else 1 endif The query isMultivalued() checks whether this multiplicity has an upper bound greater than one. OCL upperBound()->notEmpty() OCL result = upperBound() > 1 The query includesCardinality() checks whether the specified cardinality is valid for this multiplicity. OCL upperBound()->notEmpty() and lowerBound()->notEmpty() OCL result = (lowerBound() <= C) and (upperBound() >= C) The query includesMultiplicity() checks whether this multiplicity includes all the cardinalities allowed by the specified multiplicity. OCL self.upperBound()->notEmpty() and self.lowerBound()->notEmpty() and M.upperBound()->notEmpty() and M.lowerBound()->notEmpty() OCL result = (self.lowerBound() <= M.lowerBound()) and (self.upperBound() >= M.upperBound()) An element is a constituent of a model. The Comments owned by this element. 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 classifier is a classification of instances - it describes a set of instances that have features in common. A classifier can specify a generalization hierarchy by referencing its general classifiers. Generalization hierarchies must be directed and acyclical. A classifier can not be both a transitively general and transitively specific classifier of the same classifier. OCL not self.allParents()->includes(self) A classifier may only specialize classifiers of a valid type. OCL self.parents()->forAll(c | self.maySpecializeType(c)) Refers to all of the Properties that are direct (i.e. not inherited or imported) attributes of the classifier. Note that there may be members of the Classifier that are of the type Feature but are not included in this association, e.g. inherited features. References the general classifier in the Generalization relationship. Specifies all elements inherited by this classifier from the general classifiers. The query conformsTo() gives true for a classifier that defines a type that conforms to another. This is used, for example, in the specification of signature conformance for operations. OCL result = (self=other) or (self.allParents()->includes(other)) The query allFeatures() gives all of the features in the namespace of the classifier. In general, through mechanisms such as inheritance, this will be a larger set than feature. OCL result = member->select(oclIsKindOf(Feature)) The general classifiers are the classifiers referenced by the generalization relationships. OCL result = self.parents() The query parents() gives all of the immediate ancestors of a generalized Classifier. OCL result = generalization.general The inheritedMember association is derived by inheriting the inheritable members of the parents. OCL result = self.inherit(self.parents()->collect(p | p.inheritableMembers(self)) The query allParents() gives all of the direct and indirect ancestors of a generalized Classifier. OCL result = self.parents()->union(self.parents()->collect(p | p.allParents()) The query inheritableMembers() gives all of the members of a classifier that may be inherited in one of its descendants, subject to whatever visibility restrictions apply. OCL c.allParents()->includes(self) OCL result = member->select(m | c.hasVisibilityOf(m)) The query hasVisibilityOf() determines whether a named element is visible in the classifier. By default all are visible. It is only called when the argument is something owned by a parent. OCL self.allParents()->collect(c | c.member)->includes(n) OCL result = if (self.inheritedMember->includes(n)) then (n.visibility <> #private) else true The inherit operation is overridden to exclude redefined properties. OCL result = inhs The query maySpecializeType() determines whether this classifier may have a generalization relationship to classifiers of the specified type. By default a classifier may specialize classifiers of the same or a more general type. It is intended to be redefined by classifiers that have different specialization constraints. OCL result = self.oclIsKindOf(c.oclType) 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. 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 feature declares a behavioral or structural characteristic of instances of classifiers. The Classifiers that have this Feature as a feature. A multiplicity is a definition of an inclusive interval of non-negative integers beginning with a lower bound and ending with a (possibly infinite) upper bound. A multiplicity element embeds this information to specify the allowable cardinalities for an instantiation of this element. A multiplicity must define at least one valid cardinality that is greater than zero. OCL upperBound()->notEmpty() implies upperBound() > 0 The upper bound must be greater than or equal to the lower bound. OCL (upperBound()->notEmpty() and lowerBound()->notEmpty()) implies upperBound() >= lowerBound() The lower bound must be a non-negative integer literal. OCL lowerBound()->notEmpty() implies lowerBound() >= 0 For a multivalued multiplicity, this attribute specifies whether the values in an instantiation of this element are sequentially ordered. For a multivalued multiplicity, this attributes specifies whether the values in an instantiation of this element are unique. Specifies the lower bound of the multiplicity interval. Specifies the upper bound of the multiplicity interval. The query isMultivalued() checks whether this multiplicity has an upper bound greater than one. OCL upperBound()->notEmpty() OCL result = upperBound() > 1 The query includesMultiplicity() checks whether this multiplicity includes all the cardinalities allowed by the specified multiplicity. OCL self.upperBound()->notEmpty() and self.lowerBound()->notEmpty() and M.upperBound()->notEmpty() and M.lowerBound()->notEmpty() OCL result = (self.lowerBound() <= M.lowerBound()) and (self.upperBound() >= M.upperBound()) The query includesCardinality() checks whether the specified cardinality is valid for this multiplicity. OCL upperBound()->notEmpty() and lowerBound()->notEmpty() OCL result = (lowerBound() <= C) and (upperBound() >= C) The query lowerBound() returns the lower bound of the multiplicity as an integer. OCL result = if lower->notEmpty() then lower else 1 endif The query upperBound() returns the upper bound of the multiplicity for a bounded multiplicity as an unlimited natural. OCL result = if upper->notEmpty() then upper else 1 endif 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 PackageableElements that are members of this Namespace as a result of either PackageImports or ElementImports. References the ElementImports owned by the Namespace. References the PackageImports owned by the Namespace. A collection of NamedElements owned by the Namespace. A collection of NamedElements identifiable within the Namespace, either by being owned or by being introduced by importing or inheritance. 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. 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 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))) 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))) A packageable element indicates a named element that may be owned directly by a package. 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)) References the contexts that this element may be redefined from. The redefinable element that is being redefined by this element. 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 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 = self.redefinitionContext->exists(c | redefined.redefinitionContext->exists(r | c.allParents()->includes(r))) Relationship is an abstract concept that specifies some kind of relationship between elements. Specifies the elements related by the Relationship. A structural feature is a typed feature of a classifier that specifies the structure of instances of the classifier. A typed element is a kind of named element that represents an element with a type. This information is derived from the return result for this Operation. 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 An association describes a set of tuples whose values refer to typed instances. An instance of an association is called a link. 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. A class describes a set of objects that share the same specifications of features, constraints, and semantics. True when a class is abstract. The attributes (i.e. the properties) owned by the class. The operations owned by the class. This gives the superclasses of a class. The inherit operation is overridden to exclude redefined properties. OCL result = inhs->excluding(inh | ownedMember->select(oclIsKindOf(RedefinableElement))->select(redefinedElement->includes(inh))) A property is a structural feature of a classifier that characterizes instances of the classifier. A property related by ownedAttribute to a classifier (other than an association) represents an attribute and might also represent an association end. It relates an instance of the class to a value or set of values of the type of the attribute. A property related by memberEnd or its specializations to an association represents an end of the association. The type of the property is the type of the end of the association. A multiplicity of a composite aggregation must not have an upper bound greater than 1. OCL isComposite implies (upperBound()->isEmpty() or upperBound() <= 1) Subsetting may only occur when the context of the subsetting property conforms to the context of the subsetted property. OCL self.subsettedProperty->notEmpty() implies (self.subsettingContext()->notEmpty() and self.subsettingContext()->forAll (sc | self.subsettedProperty->forAll(sp | sp.subsettingContext()->exists(c | sc.conformsTo(c))))) A redefined property must be inherited from a more general classifier containing the redefining property. OCL if (redefinedProperty->notEmpty()) then (redefinitionContext->notEmpty() and redefinedProperty->forAll(rp| ((redefinitionContext->collect(fc| fc.allParents()))->asSet())->collect(c| c.allFeatures())->asSet()->includes(rp)) A subsetting property may strengthen the type of the subsetted property, and its upper bound may be less. OCL self.subsettedProperty->forAll(sp | self.type.conformsTo(sp.type) and ((self.upperBound()->notEmpty() and sp.upperBound()->notEmpty()) implies self.upperBound()<=sp.upperBound() )) Only a navigable property can be marked as readOnly. OCL isReadOnly implies isNavigable() A derived union is derived. OCL isDerivedUnion implies isDerived A property may not subset a property with the same name. OCL true If isReadOnly is true, the attribute may not be written to after initialization. Specifies a String that represents a value to be used when no argument is supplied for the Property. If isComposite is true, the object containing the attribute is a container for the object or value contained in the attribute. If isDerived is true, the value of the attribute is derived from information elsewhere. Specifies whether the property is derived as the union of all of the properties that are constrained to subset it. References the Class that owns the Property. References the owning association of this property, if any. References the properties that are redefined by this property. References the properties of which this property is constrained to be a subset. In the case where the property is one navigable end of a binary association with both ends navigable, this gives the other end. The DataType that owns this Property. References the association of which this property is a member, if any. If this property is owned by a class, associated with a binary association, and the other end of the association is also owned by a class, then opposite gives the other end. OCL result = if owningAssociation->isEmpty() and association.memberEnd->size() = 2 then let otherEnd = (association.memberEnd - self)->any() in if otherEnd.owningAssociation->isEmpty() then otherEnd else Set{} endif else Set {} endif The query isConsistentWith() specifies, for any two Properties in a context in which redefinition is possible, whether redefinition would be logically consistent. A redefining property is consistent with a redefined property if the type of the redefining property conforms to the type of the redefined property, the multiplicity of the redefining property (if specified) is contained in the multiplicity of the redefined property, and the redefining property is derived if the redefined property is derived. OCL redefinee.isRedefinitionContextValid(self) OCL result = redefinee.oclIsKindOf(Property) and let prop : Property = redefinee.oclAsType(Property) in (prop.type.conformsTo(self.type) and ((prop.lowerBound()->notEmpty() and self.lowerBound()->notEmpty()) implies prop.lowerBound() >= self.lowerBound()) and ((prop.upperBound()->notEmpty() and self.upperBound()->notEmpty()) implies prop.lowerBound() <= self.lowerBound()) and (self.isDerived implies prop.isDerived) and (self.isComposite implies prop.isComposite)) The query subsettingContext() gives the context for subsetting a property. It consists, in the case of an attribute, of the corresponding classifier, and in the case of an association end, all of the classifiers at the other ends. OCL result = if association->notEmpty() then association.endType-type else if classifier->notEmpty then Set{classifier} else Set{} endif endif The query isNavigable() indicates whether it is possible to navigate across the property. OCL result = not classifier->isEmpty() or association.owningAssociation.navigableOwnedEnd->includes(self) The query isAttribute() is true if the Property is defined as an attribute of some classifier. OCL result = Classifier->allInstances->exists(c | c.attribute->includes(p)) 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. 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 ordered set of Elements referenced by this Constraint. A condition that must be true when evaluated in order for the constraint to be satisfied. An opaque expression is an uninterpreted textual statement that denotes a (possibly empty) set of values when evaluated in a context. 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 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. An operation is a behavioral feature of a classifier that specifies the name, type, parameters, and constraints for invoking an associated behavior. A bodyCondition can only be specified for a query operation. OCL bodyCondition->notEmpty() implies isQuery 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 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. This information is derived from the return result for this Operation. This information is derived from the return result for this Operation. This information is derived from the return result for this Operation. The class that owns the operation. The DataType that owns this Operation. References the Types representing exceptions that may be raised during an invocation of this operation. References the Operations that are redefined by this Operation. This information is derived from the return result for this Operation. Specifies the ordered set of formal parameters of this BehavioralFeature. If this operation has a return parameter, isOrdered equals the value of isOrdered for that parameter. Otherwise isOrdered is false. OCL result = if returnResult->size() = 1 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->size() = 1 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->size() = 1 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->size() = 1 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->size() = 1 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()'. OCL redefinee.isRedefinitionContextValid(self) OCL result = (redefinee.oclIsKindOf(Operation) and let op: Operation = redefinee.oclAsType(Operation) in self.formalParameter.size() = op.formalParameter.size() and self.returnResult.size() = op.returnResult.size() and forAll(i | op.formalParameter[i].type.conformsTo(self.formalParameter[i].type)) and forAll(i | op.returnResult[i].type.conformsTo(self.returnResult[i].type)) ) OCL result = ownedParameter->select (par | par.direction = #return) A parameter is a specification of an argument used to pass information into or out of an invocation of a behavioral feature. Specifies a String that represents a value to be used when no argument is supplied for the Parameter. Indicates whether a parameter is being sent into or out of a behavioral element. References the Operation owning this parameter. A behavioral feature is a feature of a classifier that specifies an aspect of the behavior of its instances. Specifies the ordered set of formal parameters of this BehavioralFeature. References the Types representing exceptions that may be raised during an invocation of this feature. The query isDistinguishableFrom() determines whether two BehavioralFeatures may coexist in the same Namespace. It specifies that they have to have different signatures. OCL result = if n.oclIsKindOf(BehavioralFeature) then if ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))->notEmpty() then Set{}->include(self)->include(n)->isUnique( bf | bf.parameter->collect(type)) else true endif else true endif 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 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) 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. References the PackageMerges that are owned by 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.visibility = #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 Package whose members are imported into a Namespace. Specifies the Namespace that imports the members from a Package. 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. A type is a named element that is used as the type for a typed element. A type can be contained in a package. 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 A named element is an element in a model that may have a name. If there is no name, or one of the containing namespaces has no name, there is no qualified name. OCL (self.name->isEmpty() or self.allNamespaces()->select(ns | ns.name->isEmpty())->notEmpty()) implies self.qualifiedName->isEmpty() When there is a name, and all of the containing namespaces have a name, the qualified name is constructed from the names of the containing namespaces. OCL (self.name->notEmpty() and self.allNamespaces()->select(ns | ns.name->isEmpty())->isEmpty()) implies self.qualifiedName = self.allNamespaces()->iterate( ns : Namespace; result: String = self.name | ns.name->union(self.separator())->union(result)) If a NamedElement is not owned by a Namespace, it does not have a visibility. OCL namespace->isEmpty() implies visibility->isEmpty() The name of the NamedElement. Determines where the NamedElement appears within different Namespaces within the overall model, and its accessibility. Specifies the namespace that owns the NamedElement. A name which allows the NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from the names of the containing namespaces starting at the root of the hierarchy and ending with the name of the NamedElement itself. The query allNamespaces() gives the sequence of namespaces in which the NamedElement is nested, working outwards. OCL result = if self.namespace->isEmpty() then Sequence{} else self.namespace.allNamespaces()->prepend(self.namespace) endif The query isDistinguishableFrom() determines whether two NamedElements may logically co-exist within a Namespace. By default, two named elements are distinguishable if (a) they have unrelated types or (b) they have related types but different names. OCL result = if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType) then ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))->isEmpty() else true endif The query separator() gives the string that is used to separate names when constructing a qualified name. OCL result = '::' When there is a name, and all of the containing namespaces have a name, the qualified name is constructed from the names of the containing namespaces. OCL result = if self.name->notEmpty() and self.allNamespaces()->select(ns | ns.name->isEmpty())->isEmpty() then self.allNamespaces()->iterate( ns : Namespace; result: String = self.name | ns.name->union(self.separator())->union(result)) else Set{} endif An expression is a structured tree of symbols that denotes a (possibly empty) set of values when evaluated in a context. Specifies a sequence of operands. 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. 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 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 stereotype defines how an existing metaclass may be extended, and enables the use of platform or domain specific terminology or notation in place of, or in addition to, the ones used for the extended metaclass. Stereotype names should not clash with keyword names for the extended model element. OCL true A Stereotype may only generalize or specialize another Stereotype. OCL generalization.general->forAll(e |e.oclIsKindOf(Stereotype)) and generalization.specific->forAll(e | e.oclIsKindOf(Stereotype)) Stereotype can change the graphical appearance of the extended model element by using attached icons. When this association is not null, it references the location of the icon content to be displayed within diagrams presenting the extended model elements. A profile defines limited extensions to a reference metamodel with the purpose of adapting the metamodel to a specific platform or domain. An element imported as a metaclassReference is not specialized or generalized in a Profile. OCL self.metaclassReference.importedElement-> select(c | c.oclIsKindOf(Classifier) and (c.generalization.namespace = self or (c.specialization.namespace = self) )->isEmpty() All elements imported either as metaclassReferences or through metamodelReferences are members of the same base reference metamodel. OCL self.metamodelReference.importedPackage.elementImport.importedElement.allOwningPackages())-> union(self.metaclassReference.importedElement.allOwningPackages() )->notEmpty() References the Stereotypes that are owned by the Profile. References a metaclass that may be extended. References a package containing (directly or indirectly) metaclasses that may be extended. A package can have one or more profile applications to indicate which profiles have been applied. Because a profile is a package, it is possible to apply a profile not only to packages, but also to profiles. References the ProfileApplications that indicate which profiles have been applied to the Package. Class has derived association that indicates how it may be extended through one or more stereotypes. Stereotype is the only kind of metaclass that cannot be extended by stereotypes. References the Extensions that specify additional properties of the metaclass. The property is derived from the extensions whose memberEnds are typed by the Class. A profile application is used to show which profiles have been applied to a package. References the Profiles that are applied to a Package through this ProfileApplication. Specifies that the Profile filtering rules for the metaclasses of the referenced metamodel shall be strictly applied. The package that owns the profile application. An extension is used to indicate that the properties of a metaclass are extended through a stereotype, and gives the ability to flexibly add (and later remove) stereotypes to classes. The non-owned end of an Extension is typed by a Class. OCL metaclassEnd()->notEmpty() and metaclass()->oclIsKindOf(Class) An Extension is binary, i.e., it has only two memberEnds. OCL memberEnd->size() = 2 Indicates whether an instance of the extending stereotype must be created when an instance of the extended class is created. The attribute value is derived from the multiplicity of the Property referenced by Extension::ownedEnd; a multiplicity of 1 means that isRequired is true, but otherwise it is false. Since the default multiplicity of an ExtensionEnd is 0..1, the default value of isRequired is false. References the Class that is extended through an Extension. The property is derived from the type of the memberEnd that is not the ownedEnd. References the end of the extension that is typed by a Stereotype. The query metaclassEnd() returns the Property that is typed by a metaclass (as opposed to a stereotype). OCL result = memberEnd->reject(ownedEnd) The query metaclass() returns the metaclass that is being extended (as opposed to the extending stereotype). OCL result = metaclassEnd().type The query isRequired() is true if the owned end has a multiplicity with the lower bound of 1. OCL result = (ownedEnd->lowerBound() = 1) An extension end is used to tie an extension to a stereotype when extending a metaclass. The multiplicity of ExtensionEnd is 0..1 or 1. OCL (self->lowerBound() = 0 or self->lowerBound() = 1) and self->upperBound() = 1 The aggregation of an ExtensionEnd is composite. OCL self.aggregation = #composite References the type of the ExtensionEnd. Note that this association restricts the possible types of an ExtensionEnd to only be Stereotypes. This redefinition changes the default multiplicity of association ends, since model elements are usually extended by 0 or 1 instance of the extension stereotype. The query lowerBound() returns the lower bound of the multiplicity as an Integer. This is a redefinition of the default lower bound, which normally, for MultiplicityElements, evaluates to 1 if empty. OCL result = lowerBound = if lowerValue->isEmpty() then 0 else lowerValue->IntegerValue() endif Physical definition of a graphical image. This contains the serialization of the image according to the format. The value could represent a bitmap, image such as a GIF file, or drawing 'instructions' using a standard such as Scalable Vector Graphic (SVG) (which is XML based). This contains a location that can be used by a tool to locate the image as an alternative to embedding it in the stereotype. This indicates the format of the content - which is how the string content should be interpreted. The following values are reserved: SVG, GIF, PNG, JPG, WMF, EMF, BMP. In addition the prefix 'MIME: ' is also reserved. This option can be used as an alternative to express the reserved values above, for example "SVG" could instead be expressed as "MIME: image/svg+xml". The query allOwningPackages() returns all the directly or indirectly owning packages. OCL result = self.namespace->select(p | p.oclIsKindOf(Package))->union(p.allOwningPackages())