Issue 1790: Lack of features commonly used in OCL
Issue 3392: OCL needs an abstract syntax, just like the UML metamode
Issue 3513: OCL: Usage of qualifiers
Issue 3800: postcondition for the operation round on the predefined OCL type
Issue 3855: context declaration for OCL invariants
Issue 4112: OCL: Created and Destroyed instances
Issue 4121: In 6.9 "Grammar for OCL" (Internationalization issues)
Issue 4451: Downcast OCL collection operators
Issue 4691: 1. 6.2.1 "legend" on page 6-3, Internationalization issue
Issue 4692: 6.8.1.9 String on page 6-34
Issue 4693: EBNF of the String on page6-48.
Issue 4694: inhibtedChar on page6-48,
Issue 5581: Section 6.6.2
Issue 5582: Section 6.6.7
Issue 5970: OCL 2: flatten
Issue 5971: OCL 2: OrderedSet
Issue 5972: OCL 2: Can collections contain void/undefined objects
Issue 5973: OCL 2: what is a collection?
Issue 5974: OCL 2: String operations
Issue 6012: OCL/MOF/UML alignment
Issue 6393: OCL 2.0/international character sets
Issue 6528: Provide access to the sender of a message
Issue 6529: oclIsNew for a collection
Issue 6530: status of objects and tuples
Issue 6531: Omit predefined type OclModelElement.
Issue 6532: Consider OclType as a powertype
Issue 6533: Template return types in operation signatures
Issue 6534: Up- and Down-casts with oclAsType().
Issue 6535: Lack of operation specifications
Issue 6536: Additional annotations in the OCL Standard Library
Issue 6537: domain for library operations /, div
Issue 6538: Exception of strict evaluation (implies)
Issue 6539: Exception of strict evaluation (forAll, exists)
Issue 6540: Exception of strict evaluation (queries)
Issue 6541: Exception of strict evaluation (=)
Issue 6542: Flagging insecure cast from Set to Sequence
Issue 6543: Flagging recursive definitions
Issue 6544: Operator precedence
Issue 6545: Attributes and Association Ends versus Properties
Issue 6546: Undefined values, isEmpty() and Collections
Issue 6547: Incomplete and missing well-formedness rules
Issue 6548: Satisfaction of Operation Specifications
Issue 6549: Satisfaction of Operation Specifications (2)
Issue 6550: Satisfaction of Operation Specifications (3)
Issue 6551: Add select/reject/collectNested to Collection
Issue 6552: Clarify definition of collectNested for Set, Bag, and Sequence
Issue 6553: Clarify the semantics of forAll
Issue 6554: Clarify the UML semantics of IfExpEval
Issue 6555: Missing equality and inequality operations on collection types
Issue 6556: Reintroduce allAttributes operator
Issue 6557: Introduce a "tuplejoin" operator
Issue 6558: Issue: General section to define OCL concepts
Issue 6559: Issue: Virtual machine
Issue 6560: Issue: Set of characters
Issue 6561: Issue: Unspecified syntax and semantics for Integer, Real, and String
Issue 6562: Issue: Keywords
Issue 6563: Issue: Comments
Issue 6564: Issue: Operator precedence
Issue 6565: Issue: Grammar of OCL
Issue 6566: Issue: Abstract syntax tree
Issue 6567: Issue: Attributes and Association Ends versus Properties
Issue 6568: Issue: oclIUndefined() versus isEmpty()
Issue 6569: Issue: OclType
Issue 6570: Issue: OclModelElement
Issue 6571: Issue: Syntax of Operation Call, Iterator, and Iterate Expressions
Issue 6572: Issue: Parsing Tuple Types and Collection Types as Arguments
Issue 6573: Issue: OclAny operations of tuples and collections
Issue 6574: Issue: Signature of Environment
Issue 6600: The index seems incomplete
Issue 6601: compliance points strategies
Issue 6609: OclUndefined / allInstances() clarification.
Issue 6610: Enumeration approach for reflection
Issue 6611: OclUndefined = OclUndefine ?
Issue 6612: Formal Semantics of OCL 2.0 in Appendix A
Issue 6614: Example with TupleType
Issue 6615: Keywords "attr" and "oper"?
Issue 6633: What's a collection?
Issue 6879: The notation for testing the type of a metaclass is too verbose
Issue 6880: The notation for selecting elements should be more intuitive
Issue 6881: notation for selecting unique element within a list should be more concise
Issue 6882: There is no simple way to invoke an "if then else" on a collection
Issue 6883: The notation when nesting "if then else" is too verbose
Issue 6884: The notation when nesting "if then else" is too verbose
Issue 6885: Improve the notation when defining local variables
Issue 6886: Allow applying iteration operations on single objects
Issue 6887: Allow implicit type casting to boolean when a boolean is expected
Issue 6888: Use the "null" keyword instead of verbose "OclUndefined".
Issue 6889: Automatic casting between strings and enumeration values
Issue 6890: Suppress the usage of an Ocl prefix in standard library operations
Issue 6891: Allow defining standard library functions
Issue 6892: Allow defining default values for parameters in operations
Issue 6893: Provide specific notational support when testing stereotypes
Issue 6894: Add a generic text formatter operator '%
Issue 6895: Make usage of tuples less complex and less verbose
Issue 7341: section 7.4.6 (Re-typing or casting) on p.13
Issue 7455: Add an import statement to OCL files (with package - endpackage block)
Issue 7456: Remove the composition symbol at the end of PropertyCallExp
Issue 7457: Add a concrete syntax to allow OCL users to add additional IteratorExp’s
Issue 7458: result of applying the collect operation to a Sequence
Issue 7459: There should be an OclUndefinedLiteralExp metaclass
Issue 7460: There should be an OclTypeLiteralExp metaclass
Issue 7461: There should be an OclTypeLiteralExp metaclass
Issue 7462: flatten operation
Issue 7463: plus (infix) operator (’+’)
Issue 7464: tostring operation for Integer, Real and Boolean
Issue 7465: OclMessageArg metaclass that is currently defined, could be removed.
Issue 7466: rewrite well-formedness
Issue 7467: change rollnames
Issue 7468: The classifier name TupleType is also a reserved word
Issue 7469: Errors in the abstract syntax chapter 1. -- [1] Integer conforms to real.
Issue 7470: The type of body expression must conform to declared type of result variabl
Issue 7471: If message is a send action, arguments must conform to attributes of signal
Issue 7472: context Operation
Issue 7473: In section 3.3.9
Issue 7474: context TupleType::make(atts : sequence(Attribute) ) : TupleType
Issue 7475: 7. context AttrubuteCallExp
Issue 7476: collection literal expression
Issue 7477: The type of the condition of an if expression must be Boolean.
Issue 7478: iterator
Issue 7479: result type
Issue 7480: 1] The type of the source expression must be a collection.
Issue 7481: type of each iterator var. must be type of the elements of source collectio
Issue 7482: parameters of the operation.
Issue 7483: attributes of the signal.
Issue 7484: ’sentMessage’ should be ’sentSignal’
Issue 7485: 5] The target of an OCL message cannot be a collection.
Issue 7486: forall’ should be ’forAll’
Issue 7487: the property ’refParams’ is not present in OperationCallExp
Issue 7488: ’parameter’ should be ’Parameter’
Issue 7489: message is a call action,
Issue 7490: message is a send action,
Issue 7491: type of a TupleLiteralExp
Issue 7492: tuple literal expression
Issue 7493: The type of the attribute is the type of the value expression.
Issue 7494: type of a TupleLiteralExp
Issue 7495: context TTupleType::make(atts : sequence(Attribute) ) : TTupleType
Issue 7496: "Bag"
Issue 7497: referredOperation
Issue 7498: context TTupleType::...
Issue 7499: context Classifier
Issue 7500: context Classifier (02)
Issue 7501: context Operation
Issue 7502: context Parameter::asAttribute(): Attribute
Issue 7503: context State::getStateMachine() : StateMachine
Issue 7504: context VariableDeclaration::asAttribute() : Attribute
Issue 7505: parameters of the referredOperation
Issue 7506: parameters of the referredOperation
Issue 7507: An additional attribute refParams lists all parameters of the referred
Issue 7508: 1] The type of the attribute is the type of the value expression.
Issue 7509: context LocalSnapshot
Issue 7510: outgoingMessages results in the sequence of OclMessageValues
Issue 7511: context IfExpEval inv:
Issue 7512: sub evaluations (in the sequence bodyEvals)
Issue 7513: sub evaluations (in sequence bodyEvals) have different environment.
Issue 7514: ocl message expression
Issue 7515: isSent attribute
Issue 7516: add ’and’ between both expression parts
Issue 7517: result value of an association class call expression evaluation
Issue 7518: value of an association end call expression evaluation
Issue 7519: missing ’inv:’ twice
Issue 7520: an iterate expression evaluation
Issue 7521: arguments
Issue 7522: inv: model.sentSignal->size() = 1 implies arguments of the return message of an ocl message expression
Issue 7523: arguments of the return message of an ocl message expression
Issue 7524: Only one of the attributes isPost and isPre may be true at the same time.
Issue 7525: ’element’ should be ’elements’
Issue 7526: ’element’ should be ’elements’ (02)
Issue 7527: ’Element’ should be ’NameValueBinding’
Issue 7528: history of an object is ordered.
Issue 7529: The history of an object is ordered.(02)
Issue 7530: The operation allPredecessors
Issue 7531: elements in a tuple value
Issue 7532: value of an association class call expression
Issue 7533: result value of an association end call expression
Issue 7534: result value of an association class call expression
Issue 7535: result value of an association end call expression
Issue 7536: result value of an association end call expression (02)
Issue 7537: result value of an attribute call expression
Issue 7538: value of a collection item
Issue 7539: result value of a collection literal expression evaluation
Issue 7540: number of elements in the result value
Issue 7541: value of a collection range
Issue 7542: result value of an if expression
Issue 7543: elements in the result value
Issue 7544: value of a collection range
Issue 7545: sub evaluations
Issue 7546: sub evaluations (02)
Issue 7547: ’StringValue.iterators
Issue 7722: Section: 6.5.4.3 Combining Properties
Issue 7972: OCL Constraints in many levels
Issue 8620: Section: 7.4
Issue 8621: Section: 7.4.5
Issue 8622: Section: 7.5.3
Issue 8623: Section: 7.5.8
Issue 8624: Section: 7.5.9
Issue 8625: Section: 7.5.11
Issue 8626: Section: 7.5.13
Issue 8627: Section: 7.6.2
Issue 8628: Section: 8.2
Issue 8634: Section: 8.3
Issue 8635: Section: 8.3.4
Issue 8636: Section: 8.3.5
Issue 8637: Section: 8.3.1
Issue 8638: Section: 8.3.8
Issue 8639: Section: 9.1
Issue 8640: Section: 9.3 CollectionLiteralPartsCS
Issue 8641: Section: 10.1
Issue 8642: Section: 10.2
Issue 8643: Section: 10.2.1 Element
Issue 8644: Section: 10.2.1 NameValueBinding
Issue 8645: Section: 10.2.2 LocalSnapshot
Issue 8646: Section: 10.2.3 ObjectValue
Issue 8647: Section: 10.3
Issue 8648: Section: 10.3.1 LoopExpEval
Issue 8649: Section: 10.3.1 VariableExpEval
Issue 8650: Section: 10.3.2 AssociationEndCallExpEval
Issue 8651: Section: 10.3.2 OperationCallExp
Issue 8652: Section: 10.3.2 NavigationCallExpEval
Issue 8653: Section: 10.3.4 OclMessageArgEval
Issue 8654: Section: 10.3.4 OclMessageArgEval
Issue 8655: Section: 10.3.4 OclMessageExpEval
Issue 8656: Section: 10.3.5
Issue 8657: Section: 10.4
Issue 8658: Section: 10.4.3 IntegerLiteralExpEval
Issue 8659: Section: 11.2.1
Issue 8660: Section: 11.5.1
Issue 8661: Section: 11.5.4
Issue 8662: Section: 11.7.2
Issue 8663: Section: 11.9.1 exists
Issue 8664: Section: 11.9.2 reject
Issue 8665: Section: 11.9.2 sortedBy
Issue 8666: Section: 11.9.3 & 11.9.4 Section: 1 - 13
Issue 8667: Section: 1 - 13
Issue 8789: The spec does not describes the syntax of integer, real or string literals
Issue 8790: OclAny cannot be an instance of Classifier
Issue 8791: Specific inheritance links at M1 level should be removed
Issue 8792: VariableDeclaration should be renamed Variable
Issue 8793: The container for self and return variables is missing
Issue 8794: make link explicit
Issue 8808: Container of additional operations
Issue 8809: Should compare the value of the slots and not the objects itself
Issue 8810: Inherited or non navigable properties should not appear in class descriptio
Issue 8811: Use a uniform convention to name multivalued properties
Issue 8812: The set of possible values of CollectionKind is missing
Issue 8813: The naming of the parts properties in literals is not consistent
Issue 8814: Inconsistency in the way to represent Tuple literal part
Issue 8815: Should avoid using the OclHelper stereotype
Issue 8816: The Ocl prefix should be avoided as much as possible in metaclass names
Issue 8817: An UnlimitedNaturalExp should be added in the metamodel
Issue 8818: Reusing TypedElement for UnspecifiedValueExp
Issue 8819: The superclass of UnspecifiedValueExp is not ModelElement
Issue 8820: The composition associations in figure 9 are missing
Issue 8821: The property 'unspecified' can be removed from the metamodel
Issue 8822: The metaclass 'OclMessageArg' can be removed from the metamodel
Issue 8823: Instanciation of collection types
Issue 10786: Naming of Constraints in OCL (02)
Issue 10787: OCL Collections applied to Properties
Issue 1790: Lack of features commonly used in OCL (ocl2-ftf)
Click here for this issue's archive.
Nature: Enhancement
Severity: Significant
Summary: Summary: The current specification for OCL lacks many of the features we commonly
use when doing formal specification of class interfaces, e.g. the ability
to specify the frame condition, the ability to specify postconditions
case-wise, the ability to specify when exceptions are thrown, etc.
To bring OCL closer to the state of the art, I would like to see these
considered as future extensions.
Resolution:
Revised Text: This issue needs to be resolved by the OCL 2.0 Finalization Task Force
Actions taken:
August 10, 1998: received issue
July 22, 1999: Deferred to UML 1.4/2.0.
December 2, 2004: Transferred to OCL 2.0 FTF
Discussion: This issue needs to be resolved by the OCL 2.0 Finalization Task Force. This is an UML 1.x issue transferred to the OCL 2 FTF.
Not all the extra facilities suggested by the text of this issue have been incorporated to the
OCL2 specification. Specific facilities for specifying constraints on class interfaces could
be considered within the context of an RTF.
Disposition: Deferred
Issue 3392: OCL needs an abstract syntax, just like the UML metamode (ocl2-ftf)
Source: Klasse Objecten (Dr. Jos Warmer, j.warmer@klasse.nl)
Nature: Uncategorized Issue
Severity:
Summary:
OCL needs an abstract syntax, just like the UML metamodel. This will clarify many issues about the exact semantics of OCL. This request has been made by multiple sources.
Qualifiers, written in brackets after the path name of a feature call,
can express two different things.
- qualifying use: A qualifier is used to give the qualifing value of
a qualified association (chapter 7.5.7).
- navigational use: A qualifier is used to refine the navigation to
association classes. While this navigational use is necessary
only with recursive associations, it is legal for every navigation
to an association class (chapter 7.5.5).
There is no way to distinguish these two sorts of qualifiers. There are
even expressions where both uses of the qualifiers would be necessary at
once, but this problem is restricted to such models that contain a
recursive, qualified association that has an association class.
Example where navigational and qualifing use cannot be distinguished:
There are two classes "Bank" and "Person", with a association between
them qualified by the account number (an Integer). The association end
at the class Person is named "customers".
An additional class "Company" has an attribute "customers" of type
Integer.
Now consider the subexpression "bank.person[customers]" in the context
of Company. "bank" clearly is a navigational expression. But "customers"
could either mean the attribute of Company, since Company is the context
of the expression (that is qualifying use as defined in 7.5.7); or
"customer" could mean the name of the association end (navigational use
as defined in 7.5.5). In the first case, the result type would be
Person, in the second case Set(Person).
Discussion: This is an OCL 1 issue transferred to the OCL 2 FTF. Deferred for timing constraints.
The postcondition for the operation round on the predefined OCL type real reads ((r - result) < r).abs < 0.5) or ((r - result).abs = 0.5 and (result > r)) This is incorrect and should be replaced by ((r - result).abs < 0.5) or ((r - result).abs = 0.5 and (result > r))
The second form of the context declaration for OCL invariants should be extended from context c : Class inv: to context c1,..,cn : Class inv: In similar situations, like the forAll and Exists operators, multiple iterators are allowed. So the above suggestion would increase uniformity. It also leads in some cases to simplified OCL expressions, e.g. context C inv C.allInstances->forAll(c1,c2 | c1.id = c2.id implies c1=c2) could be written as context c1,c2 : C inv c1.id = c2.id implies c1=c2 Crossreference to issue #3139.
Discussion: This is an OCL 1 issue transferred to the OCL 2 FTF. Asking for a language enhancement which does not fit well with object orientation style where an invariant has a unique context object. Disposition: Closed, no change
Usually, the behaviour of an operation is described by pre and postconditions, and then shown in a collaboration diagram. In turn, in a collaboration diagram one can model (via the standard stereotypes create and destroy) the creation and destroying of instances, but this is not in the case in OCL. It would be useful to be able to explicitly model in a postcondition that an instance ocurring in the expression was created during the execution of the operation being specified. Since introducing a command is not possible, this feature could be achieved by just 'declaring' in the postcondition that the instance 'was created'. For example: context X::operation() post: self.attr = self.attr@pre->including(created p) this declares that p was created during the execution of operation, and it was not taken from elsewhere.
> In 6.9 "Grammar for OCL",
> According to the current BNF grammar, we cannot use
> multi-byte characters in class nor attribute names, because
> name and string are composed of alpha-numeric letters only.
> I think the definition of OCL should be modified for us
> to be able to use multi-byte characters.
> I show a draft of modification which will be proposed by
> ISO/Japan National Body.(This will be discussed in UML1.3 PAS
> at the next OMG/ISO Orlando meeting)
>
> typeName :=charForNameTop charForName*
> name :=charForNameTop charForName*
> charForNameTop := /* Characters except inhibitedChar
> and ["0"-"9"]; the available
> characters shall be determined by
> the tool implementers ultimately.*/
> charForName := /* Characters except inhibitedChar; the
> available characters shall be determined
> by the tool implementers ultimately.*/
> inhibitedChar := " "|"\"|"#"|"\'"|"("|")"|"*"|"+"|","|"-"|
> "."|"/"|":"|";"|"<"|"="|">"|"@"|"["|"\\"|
> "]"|"{"|"|"|"}"
already a quick fix in 1.4, further defer to 2.0. Discussion: This is an OCL 1 issue transferred to the OCL 2 FTF.
It is sometimes useful to downcast an OCL collection, for example
when a generic function returns an OCL Collection, but a particular
usage requires a Sequence. Unfortunately, the OCL operators
asSet(), asSequence() and asBag(), are defined only for the
concrete types, and not for their abstract common supertype
Collection.Discussion: This is an OCL 1 issue transferred to the OCL 2 FTF. Deferred for timing constrains.
1. 6.2.1 "legend" on page 6-3,
There is a following description.
"OCL expression are written using ASCII characters only"
This sentence can be interpreted in this context as
a) OCL expressions are written using only
ASCII characters as examples in this document,
b) the OCL expression must be written by only
ASCII characters in general usage?
Could you change this to
"OCL expressions in this document are
written using ASCII character only."Resolution: This is an OCL 1 issue transferred to the OCL 2 FTF. The first interpretation is the right one. Adding "In this document " solves the ambiguity.
In the String explanation, There is a descrition that "The OCL type String represents ASCII strings." I think this cannot apply to multi-byte code. Could you change this sentence to "The OCL type String represents strings consisting of ASCII characters and/or multi-byte characters.
Resolution: This is an OCL 1 issue transferred to the OCL 2 FTF. Already resolved in OCL2: In 11.4.3 it is written: "The standard type String represents strings, which can be both ASCII or Unicode."
Relating this, in the EBNF of the String on page6-48. There is a "~" symbol after double brackets. Does this means negation? If it is negation, there is no modification of String definition on the EBNF even though the body of string explanation is changed. But, I cannot find a "~" definition in the EBNF. In the unaryOperater definition of the EBNF on page6-48 There is a "-". I think this is a "~" symbol.
This is an OCL 1 issue transferred to the OCL 2 FTF. Obsolete issue. Refers to the old version (UML 1.4), not relevant to the OCL2 submission.
4.Regarding inhibtedChar on page6-48,
its definition is following.
inhibitedChar :=
"|"\"|"#"|"\'"|"("|")"|"*"|"+"|","|
"|"."|"/"|":"|";"|"<"|"="|">"|"@"|
["|"\\"|"]"|"{"|"|"|"}"
But, this definition is slightly different from one which we
have provided previously.
(Top two characters of each line are dropped)
inhibitedChar := " " | "\"" | "#" | "\'" | "(" | ")" |
"*" | "+" | "," | "-" | "." | "/" |
":" | ";" | "<" | "=" | ">" | "@" |
"[" | "\\" | "]" | "{" | "|" | "}"
This is an OCL 1 issue transferred to the OCL 2 FTF. Obsolete issue. Refers to the old version (UML 1.4), not relevant to the OCL2 submission.
Section 6.6.2 In the paragraph after the OCL sample should the word "reject" be "collect" instead?
This is an OCL 1 issue transferred to the OCL 2 FTF. Obsolete issue. Refers to the old version (UML 1.4), not relevant to the OCL2 submission.
Section 6.6.7 In the second bullet point: - shouldn't the italics refer to "employee" throughout? (In one case it says "employer"). - "unambiguous" should be "ambiguous".
This is an OCL 1 issue transferred to the OCL 2 FTF. Obsolete issue. Refers to the old version (UML 1.4), not relevant to the OCL2 submission.
quotes from ad/2003-01-07 (v1.6 of OCL 2 proposal):
Section 1.5.1 says, "the flatten operation is a deep flatten, it
completely flattens a nested collection of any depth". However the
formal definition is :
post: result = if self.type.elementType.oclIsKindOf(CollectionType) then
self->iterate(c; acc : Set() = Set{} |
acc->union(c->asSet() ) )
else
self
endif
From Section 6.5.1 (definition of Set.Flatten). The formal declaration does
not show that the flatten operation is deep. This discussion is extended in
Appendix A, which presents an analogous postcondition, but explains that this
is for a single level only.
It would seem that the post-condition(s) in section 6.5.1 are wrong?
Deferred for timing reasons
OrderedSet isn't discussed in the section on semantics
Deferred for timing reasons
Is it possible for collections to contain void (= undefined objects)? Conceptually, this would appear to be required so that you can specify whether an item in a collection can be null in an actual implementation. The use of void and undefined() is advised in exactly the same situation in a non-collection context. However, this quote from Section 2.4.11: "In general, an expression where one of the parts is undefined will itself be undefined", along with the rest of the section, shows that you can't use void as a parameter to the collection calls, and in the context of OCL as a language, this makes sense. So I thank that this constraint: context Collection inv: self->forAll(not OclIsUndefined()) is required, and this should be stated to clear up uncertainties. This leaves the problem of how to say whether an "item in a collection can be null in an actual implementation" is inresolvable in OCL 2.
Resolution: The notion of OclUndefined is splitted into two notions: LiteralNull and OclInvalid to distinguish between the situations where we have an absence of value (LiteralNull) and an invalid events (such as division of zero). Collection can contain null values but cannot contain Oclinvalid values. Apart from making more flexible the usage of OCL as a query language, this resolution aligns OCL with UML2 in which the "absence of value" is already modeled by the notion of null literal which is not considered being an invalid value.
OCL 2 doesn't really define what a collection is. In essence, a particular UML construct is arbitrarily designated as the OCL collection, and a series of properties are assigned to it This question arises in 2 different ways: - can you sub-class one of the concrete descendents in a UML diagram - by referring to the OCL package - and thereby add functionality to your own collection types - are all parameterised classifiers collections? if you define a parameterised class, how does an OCL user or environment know whether it's a collection or not? perhaps a stereotype should be intrroduced to allow for unambiguous resolution of these issues
Deferred for timing reasons
the routines on String are too sparse to support real world usage. In particular, most users would require: * uppercase and lowercase routines * the ability to ask if String1 is found in String2 * case insensitive compare would be useful but can be built using the uppercase or lowercase routines
Deferred for timing reasons
Document ad/2003-05-01 contains directions along which the OCL metamodel and the UML Infrastructure metamodel can be integrated to form one single language. The OCL has originally been conceived as part of the UML language, and has never been intended to be used separately. A tight connection between the two metamodels is nessesary for all modelers that want to use either UML, OCL, MOF, or a combination of these. Within the OMG the OCL is heavily used for specifyingconstraints on metamodels in the varous OMG standards. OCL is also used extensively in many of the proposals for the MOF 2.0 QVT RfP, as the solution for a query language, and as part of a transformation definition language. In all these cases, the OCL is used at the metamodel level, i.e. at the MOF level. Formally this is incorrect, because OCL isn't part of the MOF. Within the UML/MOF/OCL 2.0 framework, the UML and the MOF share a common core. The MOF 2.0 proposal reuses the UML 2.0 Infrastucture. By integrating the OCL into the reused part of the UML 2.0 infrastructure, the OCL metamodel is integrated with the MOF 2.0 as well. The definition of OCL at the MOF level is then achieved. Some aspects of the coupling of the OCL metamodel with the UML Superstructure metamodel are addressed in document ad/2003-05-01 as well.
Resolution: The approach taken to solve the alignment problem is as follows: - Chapters 7 to chapters 12 define the OCL for the UML superstructure language. The OCL metamodel specification, notation and semantics is updated when needed to reflect the changes made in the last version of the UML2 superstructure specification. - Chapters 13 define the OCL that is required for metamodelling. More precisely, chapter 13 defines firstly the BasicOCL package extending the UML Core::Basic package to allow the integration of OCL in languages that are built on the basis of the Infrastructure Library. The chapter also defines the EssentialOCL package extending EMOF for OCL integration. Conceptually, EssentialOCL is build from from BasicOCL using the same principles used to define the EMOF package from the Core::Basic library package. Structurally there is no difference between BasicOCL and EssentialOCL. Also, because no new concept is introduced by BasicOCL and EssentialOCL the class descriptions are not repeated, only the diagrams are showed.
The OCL 2.0 FAS makes several references to ASCII (pg. 22), lowercase and uppercase characters (pg. 33-34) that violate the requirement for allowing international character sets to be used with UML. This is unacceptable since it limits the use of UML.
Resolution: Already resolved in the OCL2 document. "Ascii or unicode" is used instead of "ascii" alone.
Consider the operation: Account::withdraw (amount: Money) Suppose a Person object sends the operation, and we want to state that the person has to be the owner of the account. Access to the sender of the message is needed. One might for instance imagine that the concrete syntax defines a keyword sender, and we could then write: context: Account::withdraw (amount: Money) pre: sender = self.owner
Discussion: Asking for an improvement of the language. Better solved in a RTF
Description: Provide an operation for creating a collection of new objects Rationale: Consider the case where you want to create a new smartcard for a set of persons. Any solution is currently longwinded. It would be nice to be able to have an operation oclIsNew that applies to a collection (or perhaps only to a Set), and states the number of objects to be created, e.g.: let: s: Set(SmartCards) in s.oclIsNew(self.person->size())...
Discussion: Asking for an improvement of the language. Better solved in a RTF
Description: Provide a notation for the status of an object
Rationale:
It would be convenient to have a notation for denoting the status of an object. The type of such a status is a tuple. With such a notation it would be possible to compare the status of two objects or to compare the status of an object with a tuple. If not available, comparisons have to be performed on an attribute by attribute basis. Consider e.g.
p, p1 and p2 are Person(s)
p1.all = p2.all -- the 2 persons have same status, i.e.
is nicer and less error-prone than comparing all attributes:
p1.firstName = p2.firstName and p1.name = p2.name and ...
It would also be possible to compare with a tuple:
p.all = Tuple = Tuple {firstName = 'Alfred', name = 'Strohmeier', ...}
Discussion: Asking for an improvement of the language. Better solved in a RTF
Description: OclModelElement is currently defined in the OCL Standard Library. It can simply be omitted, as it is actually never used. OclModelElementType, however, must remain in the metamodel, e.g., for the mapping of OclState.
This issue has been merged with issue 6610 (Enumeration approach for reflection) which suggest dropping the enumeration approach for reflection because of multiple implementation problems it causes. Usage of enumeration for reflection is now avoided thanks to the introduction of TypeExp and StateExp. The metaclass TypeType is now used to represent the type accepted by the oclIsKindOf, oclIsTypeOf and oclAsType operations. The TypeType has a unique instance named 'OclType' , but it is anymore a enumeration but a type compliant with any type defined in the model (metalevel). In a similar way, the OclModelElementType – renamed ElementType – to better match UML2 terminology (since Element replaces ModelElement as the base element in the class hierarchy) – is retained to allow encoding explicitly the type of the parameter in the oclInState pre-defined operation. This ElementType type has a singleton instance in the standard library called OclElement (which is not an enumeration). Since a usage of oclIsKindOf (resp. oclInState) is encoded as an operations call, the arguments need to be OclExpressions: that's why the meta types are passed using TypeExp (resp. StateExp).
Description: OclType is currently a subtype of OclAny and seen as an enumeration type. This leads to some drawbacks w.r.t. the specification of operations like oclAsType(), oclIsKindOf(), and oclIsTypeOf(), that need to reason about type conformance. As this cannot be done without accessing the metalevel, OclType should rather be considered as a powertype (cf. OCL Workshop paper at UML 2003: S.Flake, OclType - A Type or Metatype?).
Usage of powertypes as an alternative way to represent generically Ocl types is an interesting suggestion. However, for timing reasons we prefer defer this issue to the RTF.
Description: At some places, template parameter T appears in operation signatures, e.g., oclAsType(typename:OclType) : T (e.g., Sect. 6.2.1). At other places, this is denoted by "instance of OclType" or <<the return type of the invoked operation>>. It would be more meaningful when these informal return type descriptions are replaced by "OclAny". An additional constraint about the actual return type should be given when necessary.
Deferred for timing reasons
Description: This is not treated consistently throughout the document. As the formal semantics already allows both up- and downcasts, this should also be allowed in Sect. 2.4.6.
Deferred for timing reasons
Author: Stephan Flake (flake@c-lab.de) Description: Some operation specifications are still missing (they are marked by --TBD), e.g., oclAsType(). For this operation, a proposed specification is as follows (provided that OclType is a powertype): 1: context OclAny::oclAsType(typename:OclType) : OclAny 2: post: if OclType.allInstances() 3: ->select(t:OclType | self.oclIsTypeOf(t)) 4: ->exists(t:OclType | typename.conformsTo(t) or t.conformsTo(typename)) then 5: result = self and result.oclIsTypeOf(typename) 6: else 7: result = OclUndefined and result.oclIsTypeOf(OclVoid) 8: endif For a comparison, a complex OCL specification for ENUMERATION TYPE OclType can be found in the paper "OclType - A Type or Metatype?".
Deferred for timing reasons
Author: Stephan Flake (flake@c-lab.de) Description: The OCL Standard Library type system should make use of the notation offered by the official UML specification. In particular, abstract types (like OclAny, Collection(T)), datatypes (Integer, Set(T)), and enumeration types (OclState) can be denoted in italics and stereotyped, respectively. An ellipsis can be used to indicate that further types are imported from a referred UML user model. Moreover, OrderedSet(T) is missing in the OCL Standard Library Type type system.
Deferred for timing reasons
Author: Thomas Baar (thomas.baar@epfl.ch) Description: clarify, whether x/0 is undefined Rationale: On page 6/6, 6-7 the semantics of operation / is decribed informally as 'The value of self divided by r (respective i).' It remains unclear what self / 0 evaluates to. On page 6/7 the div-operation is specified in terms of /-operation, however with a pre-condition pre: i <> 0. Why is div handled differently from / ?
Adding: Evaluates to OclUndefined if r(resp i) is equal to zero.
Author: Thomas Baar (thomas.baar@epfl.ch) Description: Exception from strict evaluation for IMPLIES is incomplete and contradicts set-theoretical semantics Rationale: On page 2-10 only one exception from strict evaluation for IMPLIES is given: False IMPLIES x == True However, based on the official semantics of IMPLIES given on page A-12 also x IMPLIES True == True
Deferred for timing reasons