Issues for OCL 2.0 Finalization Task Force

To comment on any of these issues, send email to ocl2-ftf@omg.org. (Please include the issue number in the Subject: header, thusly: [Issue ###].) To submit a new issue, send email to issues@omg.org.

List of issues (green=resolved, yellow=pending Board vote, red=unresolved)

List options: All ; Open Issues only; or Closed Issues only

Issue 3392: OCL needs an abstract syntax, just like the UML metamode
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 5972: OCL 2: Can collections contain void/undefined objects
Issue 5974: OCL 2: String operations
Issue 6012: OCL/MOF/UML alignment
Issue 6393: OCL 2.0/international character sets
Issue 6529: oclIsNew for a collection
Issue 6531: Omit predefined type OclModelElement.
Issue 6532: Consider OclType as a powertype
Issue 6537: domain for library operations /, div
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 6552: Clarify definition of collectNested for Set, Bag, and Sequence
Issue 6555: Missing equality and inequality operations on collection types
Issue 6556: Reintroduce allAttributes operator
Issue 6558: Issue: General section to define OCL concepts
Issue 6560: Issue: Set of characters
Issue 6562: Issue: Keywords
Issue 6564: Issue: Operator precedence
Issue 6567: Issue: Attributes and Association Ends versus Properties
Issue 6568: Issue: oclIUndefined() versus isEmpty()
Issue 6569: Issue: OclType
Issue 6570: Issue: OclModelElement
Issue 6610: Enumeration approach for reflection
Issue 6611: OclUndefined = OclUndefine ?
Issue 6612: Formal Semantics of OCL 2.0 in Appendix A
Issue 6615: Keywords "attr" and "oper"?
Issue 6633: What's a collection?
Issue 6888: Use the "null" keyword instead of verbose "OclUndefined".
Issue 7341: section 7.4.6 (Re-typing or casting) on p.13
Issue 7456: Remove the composition symbol at the end of PropertyCallExp
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 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 7547: ’StringValue.iterators
Issue 8662: Section: 11.7.2
Issue 8663: Section: 11.9.1 exists
Issue 8664: Section: 11.9.2 reject
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 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 3392: OCL needs an abstract syntax, just like the UML metamode (ocl2-ftf)

Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.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.

Resolution:
Revised Text: Resolution: This is an OCL 1 issue transferred to the OCL 2 FTF. Section 8 of the OCL2 specification provides the metamodel. Revised text: No text change needed.
Actions taken:
March 1, 2000: received issue
December 2, 2004: Transferred to OCL 2.0 FTF
November 1, 2005: closed issue

Issue 3800: postcondition for the operation round on the predefined OCL type (ocl2-ftf)

Click
here for this issue's archive.
Nature: Revision
Severity: Minor
Summary:
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))

Resolution:
Revised Text: Discussion: This is an OCL 1 issue transferred to the OCL 2 FTF. The OCL2 text has already corrected this using this definition: post: ((self - result).abs() < 0.5) or ((self - result).abs() = 0.5 and (result > self)) Revised text: No text change needed.
Actions taken:
September 1, 2000: received issue
December 2, 2004: Transferred to OCL 2.0 FTF
November 1, 2005: closed issue

Issue 3855: context declaration for OCL invariants (ocl2-ftf)

Click
here for this issue's archive.
Nature: Enhancement
Severity: Minor
Summary:
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. 

Resolution:
Revised Text:
Actions taken:
September 13, 2000: received issue
December 2, 2004: Transferred to OCL 2.0 FTF
November 1, 2005: closed issue

Discussion:
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


Issue 4112: OCL: Created and Destroyed instances (ocl2-ftf)

Click
here for this issue's archive.
Nature: Enhancement
Severity: Significant
Summary:
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.

Resolution:
Revised Text: Resolution: This is an OCL 1 issue transferred to the OCL 2 FTF. Resolved in OCL2 thanks to the new oclIsNew construct Revised text: No text change needed.
Actions taken:
December 8, 2000: received issue
December 2, 2004: Transferred to OCL 2.0 FTF
November 1, 2005: closed issue

Issue 4121: In 6.9 "Grammar for OCL" (Internationalization issues) (ocl2-ftf)

Click
here for this issue's archive.
Source: Fujitsu (Mr. Hiroshi Miyazaki, miyazaki.hir-02(at)jp.fujitsu.com)
Nature: Uncategorized Issue
Severity:
Summary:
> 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    := " "|"\"|"#"|"\'"|"("|")"|"*"|"+"|","|"-"|
>                         "."|"/"|":"|";"|"<"|"="|">"|"@"|"["|"\\"|
>                         "]"|"{"|"|"|"}"

Resolution:
Revised Text: Resolution: The OCL2 defines the production rule simpleNameCS ::= <String> where <String> is left undefined to allow to use multi-byte characters for internationalisation. Revised text: No text update is needed. Disposition: Resolved
Actions taken:
December 9, 2000: received issue
December 2, 2004: Transferred to OCL 2.0 FTF
November 1, 2005: closed issue

Discussion:
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.


Issue 4451: Downcast OCL collection operators (ocl2-ftf)

Click
here for this issue's archive.
Source: NIST (Mr. Conrad Bock, conrad.bock(at)nist.gov)
Nature: Revision
Severity: Significant
Summary:
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.

Resolution:
Revised Text: Add to Section 11.7.1 Collection: asSet() : Set(T) The Set containing all the elements from self, with duplicates removed. post: result->forAll(elem | self ->includes(elem)) post: self ->forAll(elem | result->includes(elem)) asOrderedSet() : OrderedSet(T) An OrderedSet that contains all the elements from self, with duplicates removed, in an order dependent on the particular concrete collection type. post: result->forAll(elem | self->includes(elem)) post: self ->forAll(elem | result->includes(elem)) asSequence() : Sequence(T) A Sequence that contains all the elements from self, in an order dependent on the particular concrete collection type. post: result->forAll(elem | self->includes(elem)) post: self ->forAll(elem | result->includes(elem)) asBag() : Bag(T) The Bag that contains all the elements from self. post: result->forAll(elem | self->includes(elem)) post: self ->forAll(elem | result->includes(elem)) Update Section 11.7.2 Set: definitions of the coercion operations are now redefinitions to add constraints. asSet() : Set(T) Redefines the Collection operation. A Set identical to self. post: result = self asOrderedSet() : OrderedSet(T) Redefines the Collection operation. An OrderedSet that contains all the elements from self, in undefined order. asSequence() : Sequence(T) Redefines the Collection operation. A Sequence that contains all the elements from self, in undefined order. post: self->forAll(elem | result->count(elem) = 1) asBag() : Bag(T) Redefines the Collection operation. The Bag that contains all the elements from self. post: self->forAll(elem | result->count(elem) = 1) Update Section 11.7.3 OrderedSet: add redefinitions to add constraints. asSet() : Set(T) Redefines the Set operation. Returns a Set containing all of the elements of self, in undefined order. asOrderedSet() : OrderedSet(T) Redefines the Set operation. An OrderedSet identical to self. post: result = self post: Sequence{1..self.size()}->forAll(i | result->at(i) = self->at(i)) asSequence() : Sequence(T) Redefines the Set operation. A Sequence that contains all the elements from self, in the same order. post: Sequence{1..self.size()}->forAll(i | result->at(i) = self->at(i)) asBag() : Bag(T) Redefines the Set operation. The Bag that contains all the elements from self, in undefined order. Update Section 11.7.4 Bag: definitions of the coercion operations are now redefinitions to add constraints. asBag() : Bag(T) Redefines the Collection operation. A Bag identical to self. post: result = self asSequence() : Sequence(T) Redefines the Collection operation. A Sequence that contains all the elements from self, in undefined order. post: result->forAll(elem | self->count(elem) = result->count(elem)) post: self ->forAll(elem | self->count(elem) = result->count(elem)) asSet() : Set(T) Redefines the Collection operation. The Set containing all the elements from self, with duplicates removed. asOrderedSet() : OrderedSet(T) Redefines the Collection operation. An OrderedSet that contains all the elements from self, in undefined order, with duplicates removed. post: self ->forAll(elem | result->count(elem) = 1) Update Section 11.7.5 Sequence: definitions of the coercion operations are now redefinitions to add constraints. asBag() : Bag(T) Redefines the Collection operation. A Bag containing all the elements from self, including duplicates. post: result->forAll(elem | self->count(elem) = result->count(elem) ) post: self->forAll(elem | self->count(elem) = result->count(elem) ) asSequence() : Sequence(T) Redefines the Collection operation. A Sequence identical to the self. post: result = self asSet() : Set(T) Redefines the Collection operation. A Set containing all the elements from self, with duplicates removed. asOrderedSet() : OrderedSet(T) Redefines the Collection operation. An OrderedSet that contains all the elements from self, in the same order, with duplicates removed. post: self ->forAll(elem | result->count(elem) = 1) post: self ->forAll(elem1, elem2 | self->indexOf(elem1) < self->indexOf(elem2) implies result->indexOf(elem1) < result->indexOf(elem2) )
Actions taken:
August 3, 2001: received issue
December 2, 2004: Transferred to OCL 2.0 FTF
October 16, 2009: closed issue

Discussion:
Discussion:
This is an OCL 1 issue transferred to the OCL 2 FTF.
Deferred for timing constrains.


Issue 4691: 1. 6.2.1 "legend" on page 6-3, Internationalization issue (ocl2-ftf)

Click
here for this issue's archive.
Source: Fujitsu (Mr. Hiroshi Miyazaki, miyazaki.hir-02(at)jp.fujitsu.com)
Nature: Uncategorized Issue
Severity:
Summary:
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:
Revised Text: Revised text: In 7.2.1, the sentence "OCL expressions are written using ASCII characters only" changed to "OCL expressions in this document are written using ASCII characters only".
Actions taken:
November 9, 2001: received issue
December 2, 2004: Transferred to OCL 2.0 FTF
November 1, 2005: closed issue

Discussion:
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.


Issue 4692: 6.8.1.9 String on page 6-34 (ocl2-ftf)

Click
here for this issue's archive.
Source: Fujitsu (Mr. Hiroshi Miyazaki, miyazaki.hir-02(at)jp.fujitsu.com)
Nature: Uncategorized Issue
Severity:
Summary:
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:
Revised Text: No text change needed.
Actions taken:
November 9, 2001: received issue
December 2, 2004: Transferred to OCL 2.0 FTF
November 1, 2005: closed issue

Discussion:
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."


Issue 4693: EBNF of the String on page6-48. (ocl2-ftf)

Click
here for this issue's archive.
Source: Fujitsu (Mr. Hiroshi Miyazaki, miyazaki.hir-02(at)jp.fujitsu.com)
Nature: Uncategorized Issue
Severity:
Summary:
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.

Resolution:
Revised Text: Closed, no change
Actions taken:
November 9, 2001: received issue
December 2, 2004: Transferred to OCL 2.0 FTF
November 1, 2005: closed issue

Discussion:
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.


Issue 4694: inhibtedChar on page6-48, (ocl2-ftf)

Click
here for this issue's archive.
Source: Fujitsu (Mr. Hiroshi Miyazaki, miyazaki.hir-02(at)jp.fujitsu.com)
Nature: Uncategorized Issue
Severity:
Summary:
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    := " " | "\"" | "#" | "\'" | "(" | ")" |
                    "*" | "+" | "," | "-" | "." | "/" |
                    ":" | ";" | "<" | "=" | ">" | "@" |
                    "[" | "\\" | "]" | "{" | "|" | "}"

Resolution:
Revised Text:
Actions taken:
November 9, 2001: received issue
December 2, 2004: Transferred to OCL 2.0 FTF
November 1, 2005: closed issue

Discussion:
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.


Issue 5581: Section 6.6.2 (ocl2-ftf)

Click
here for this issue's archive.
Nature: Clarification
Severity: Minor
Summary:
Section 6.6.2 

In the paragraph after the OCL sample should the word "reject" be "collect" instead?

Resolution:
Revised Text:
Actions taken:
August 20, 2002: received issue
December 2, 2004: Transferred to OCL 2.0 FTF
November 1, 2005: closed issue

Discussion:
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.


Issue 5582: Section 6.6.7 (ocl2-ftf)

Click
here for this issue's archive.
Nature: Clarification
Severity: Minor
Summary:
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".

Resolution:
Revised Text:
Actions taken:
August 20, 2002: received issue
December 2, 2004: Transferred to OCL 2.0 FTF
November 1, 2005: closed issue

Discussion:
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.


Issue 5970: OCL 2: flatten (ocl2-ftf)

Click
here for this issue's archive.
Source: HL7 (Mr. Grahame Grieve, grahame(at)healthintersections.com.au)
Nature: Uncategorized Issue
Severity:
Summary:
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?


Resolution:
Revised Text: Add a definition of the flatten() operation to the Collection type, for redefinitions to utilize recursively: flatten() : Collection(T2) If the element type is not a collection type, this results in the same collection as self. If the element type is a collection type, the result is a collection containing all the elements of all the recursively flattened elements of self. Update definition of flatten() in Section 11.7.2 Set: flatten() : Set(T2) Redefines the Collection operation. If the element type is not a collection type, this results in the same set as self. If the element type is a collection type, the result is the set containing all the elements of all the recursively flattened elements of self. post: result = if self.oclType().elementType.oclIsKindOf(CollectionType) then self->iterate(c; acc : Set(T2) = Set{} | acc->union(c->flatten()->asSet() ) ) else self endif Update definition of flatten() in Section 11.7.4 Bag: flatten() : Bag(T2) Redefines the Collection operation. If the element type is not a collection type, this results in the same bag as self. If the element type is a collection type, the result is the bag containing all the elements of all the recursively flattened elements of self. post: result = if self.oclType().elementType.oclIsKindOf(CollectionType) then self->iterate(c; acc : Bag(T2) = Bag{} | acc->union(c->flatten()->asBag() ) ) else self endif Update definition of flatten() in Section 11.7.5 Sequence: flatten() : Sequence(T2) Redefines the Collection operation. If the element type is not a collection type, this results in the same sequence as self. If the element type is a collection type, the result is the sequence containing all the elements of all the recursively flattened elements of self. The order of the elements is partial. post: result = if self.oclType().elementType.oclIsKindOf(CollectionType) then self->iterate(c; acc : Sequence(T2) = Sequence{} | acc->union(c->flatten()->asSequence() ) ) else self endif
Actions taken:
April 22, 2003: received issue
October 16, 2009: closed issue

Discussion:
Deferred for timing reasons


Issue 5972: OCL 2: Can collections contain void/undefined objects (ocl2-ftf)

Click
here for this issue's archive.
Source: HL7 (Mr. Grahame Grieve, grahame(at)healthintersections.com.au)
Nature: Uncategorized Issue
Severity:
Summary:
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:
Revised Text: Revised Text: 1) In section 8.2.2 (Well formedness Rules for the Types Package) add the following constraint:[2] A Collection cannot contain OclInvalid values. context Collection inv: self->forAll(not oclIsInvalid()) 2) In section 8.2 adds a description for the class InvalidType, with the following text: InvalidType represents a type that conforms to all types. The only instance of InvalidType is Invalid, which is further defined in the standard library. Furthermore Invalid has exactly one instance called OclInvalid. Also update figure 5 adding the InvalidType metaclass in the type inheritance: VoidType DataType Class TupleType SetTypOrderedSetType SequenceType BagType e Type CollectionType 1 * +elementType PrimitiveType InvalidType AnyType Operation Signal MessageType 0..1 * +referredOperation 0..1 * +referredSignal TypeType ElementType 3) In section 8.2.1 (Type Conformance), add the compliance rule for InvalidType with the following text: InvalidType Invalid conforms to all other types [1] context InvalidType inv: Classifier.allInstances()->forAll (c | self.conformsTo (c)) 4) In section 8.3, within the description of VoidType, replace the last sentence by: Furthermore OclVoid has exactly one instance called null - corresponding to the UML NullLiteral literal specification - and representing the absence of value. Note that in contrast with OclInvalid null is a valid value and as such can be owned by collections. 5) Change the title of section 11.2 as follows: """ The OclAny, OclVoid, OclInvalid and OclMessage types."""6) In section 11.2.3 replace "It has a single instance called OclUndefined …" by "It has a single instance called null which corresponds with the UML NullLiteral specification value." Also replace "Any propertycall applied on OclUndefined …" by "Any propertycall applied on null results in OclInvalid". And finally replace: "an instance of the metatype Classifier" by "an instance of the metatype VoidType". 7) In section 11.2 add OclInvalid description with the following text: OclInvalid The type OclInvalid is a type that conforms to all other types. It has one single instance called invalid. Any propertycall applied on invalid results in OclInvalid, except for the operations oclIsUndefined() and oclIsInvalid(). OclInvalid is itself an instance of the metatype InvalidType 8) In section 11.2.4, change the definition of oclIsUndefined() as follows: Evaluates to true if the self is equal to OclInvalid or to null. post: result = self.isTypeOf( OclVoid) or self.isTypeOf( OclInvalid ). 9) In section 11.2.4, add the definition of iclIsInvalid() as follows: Evaluates to true if the self is equal to OclInvalid. post: result = self.isTypeOf( OclInvalid). 10) Remove 11.2.5 section (definition of OclVoid::oclIsUndefined and badly placed constraint ) – since this method is already defined for AnyType. 11) Add in figure 10 (Abstract syntax metamodel for Literal expression) the metaclasses NullLiteralExp and InvalidLiteralExp. IntegerLiteralExp integerSymbol : Integer RealLiteralExp realSymbol : Real BooleanLiteralExp booleanSymbol : Boolean StringLiteralExp stringSymbol : String UnlimitedNaturalExp symbol : UnlimitedNatural LiteralExp EnumerationLiteral EnumLiteralExp 0..1 * +referredEnumLiteral +literalExp PrimitiveLiteralExp NumericLiteralExp NullLiteralExp InvalidLiteralExp Actions taken: April 22, 2003: received issue Disposition: Resolved Document ptc/2005-06-05 Page 24
Actions taken:
April 22, 2003: received issue
November 1, 2005: closed issue

Discussion:
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.


Issue 5974: OCL 2: String operations (ocl2-ftf)

Click
here for this issue's archive.
Source: HL7 (Mr. Grahame Grieve, grahame(at)healthintersections.com.au)
Nature: Uncategorized Issue
Severity:
Summary:
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

Resolution:
Revised Text: Add operation definitions to Section 11.5.3 String: toUpperCase() : String Converts self to upper case, if appropriate to the locale. Otherwise, returns the same string as self. toLowerCase() : Integer Converts self to lower case, if appropriate to the locale. Otherwise, returns the same string as self. indexOf(s : String) : Integer Queries the index in self at which s is a substring of self, or zero if s is not a substring of self. The empty string is considered to be a substring of every string but the empty string, at index 1. No string is a substring of the empty string. post: self.size() = 0 implies result = 0 post: s.size() = 0 and self.size() > 0 implies result = 1 post: s.size() > 0 and result > 0 implies self.substring(result, result + s.size() - 1) = s equalsIgnoreCase(s : String) : Integer Queries whether s and self are equivalent under case-insensitive collation in the locale of self. at(i : Integer) : String Queries the character at position i in self. pre: i > 0 pre: i <= self.size() post: result = self.substring(i, i) characters() : Sequence(String) Obtains the characters of self as a sequence. post: result = if self.size() = 0 then Sequence{} else Sequence{1..self.size()}->iterate(i; acc : Sequence(String) = Sequence{} | acc->append(self.at(i))) endif
Actions taken:
April 22, 2003: received issue
October 16, 2009: closed issue

Discussion:
Deferred for timing reasons


Issue 6012: OCL/MOF/UML alignment (ocl2-ftf)

Click
here for this issue's archive.
Source: Modeling Value Group (Mr. Wim Bast, wim.bast(at)modelingvalue.nl)
Nature: Uncategorized Issue
Severity:
Summary:
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:
Revised Text: The revised text is given for each chapter. Chapter 8 (Abstract Syntax) *********************** 0) In 8.2, in the introductory text, removes the "with the annotation (from <UML package>) and shown with". 1) In 8.2, replaces "… from the UML Infrastructure" by "…from the UML Superstructure". 2) In 8.2.1 (Type conformance), within the well-formedness rules of Classifier, replaces 'generalization.parent' by 'generalization.general'. 3) In all the text replace 'Primitive' as 'PrimitiveType', 'PropertyCall' by ''CallExp', 'ModelPropertyCallExp' by 'FeatureCallExp', 'AssociationEndCallExp' by 'PropertyExp', remove AttributeCallExp. Update figure 6 and figure 7 to take into account these changes: TypedElement Classifier TypeExp 0..1 * +referredType FeaturePropertyCall LiteralExp IfExp MessageExp IteratorExp VariableExp ParameterFeaturePropertyCall OperatioOperationCallExp n 0..1 * +referredOperation +referringExp OclExpression * 0..1 +argument {ordered} +parentCall PropertyCallExp Property * 0..1 +referredProperty +re*ferringExp NavigationCallExp * 0..1 +qualifier {o*rdered} +parentNav 0..1 * +navigationSource 4) In the well-formedness rules of TupleType, replace 'allAttributes' by 'allProperties'. 5) In 8.3.8, in Classifier subtitle, after the definition of lookupSignal add the following text: """ def: allReceptions() : Set(Reception) = self.allFeatures()->select(f | f.oclIsKindOf(Reception)) def: allProperties() : Set(Property) = self.allFeatures()->select(f | f.oclIsKindOf(Property)) def: allOperations() : Set(Property) = self.allFeatures()->select(f | f.oclIsKindOf(Operations)) The operation allFeatures() is defined in the UML semantics. """ 6) In 8.3.8, in Classifier subtitle, remove the paragraph starting with "Operations allAttributes … " and ending with "…inherited Attributes". Also remove the OCL code of allReceptions after the removed paragraph (since added in step 5 above). 7) Replace the existing chapter 13 by the new content below. The title of the chapter is Basic OCL and Essential OCL. 13 Basic OCL and Essential OCL 13.1. Introduction: BasicOCL is the package exposing the minimal OCL required to work with Core::Basic. Basic OCL depends on the Core::Basic Package. It references explicitly the following Core::Basic classes: Property, Operation, Parameter, TypedElement, Type, Class, DataType, Enumeration, PrimitiveType and EnumerationLiteral. EssentialOCL is the package exposing the minimal OCL required to work with EMOF. EssentialOcl depends on the EMOF Package. It references explicitly the EMOF classes:Property, Operation, Parameter, TypedElement, Type, Class, DataType, Enumeration, PrimitiveType and EnumerationLiteral. EssentialOCL is build from Core::Basic and BasicOcl using package merge with copy semantics – similarily as EMOF is build from Core::Basic. Structurally there is no difference between BasicOCL and EssentialOCL. For this reason we provide in this chapter a unique set of diagrams which defines the abstract syntax for both packages. For convenience, because BasicOCL (respectively EssentialOCL) is - conceptually – a subset of the complete OCL language for UML superstructure, we will not repeat or redefine here all the class descriptions and the well-formedness rules defined in the other chapters. When applicable, all these definitions are to be re-interpreted in the specific context of Core::Basic (respectively EMOF). The section "OCL adaptation for metamodelling" specific rules for the re-interpretation of the "complete" OCL, whereas the "Diagrams" section provides the complete diagrams defining the BasicOCL (respectively EssentialOCL) abstract syntax. 13.2. OCL adaptation for metamodelling We provide below a set of rules and conventions that are applied to define BasicOCL (and consequently EssentialOCL) from the OCL defined for UML superstructure – called "complete OCL" in this section. 1) The following metaclasses defined in complete OCL are not part of BasicOCL (and EssentialOCL): - MessageType - ElementType - AssociationClassCallExp - MessageExp - StateExp - UnspecifiedValueExp Any well-formedness rules defined for these classes are consequently not part of the definition of Basic OCL. The properties NavigationCallExp::qualifier and NavigationCallExp::navigationSource are suppressed since not needed in this context. 2) Core::Basic does not contain the intermediate notion of Classifier but uses instead directly the Type notion as the base class for the type system. Consequently, any reference to the Classifier class in the complete OCL specification has to be re-interpreted as a reference to the Type class. Note: It is expected that further revisions of this specification will provide explicily the complete set of well-formedness rules and additional operations that apply to Core::Basic – to replace the lazy re-interpretation statement we are using here.3) In complete OCL, TupleType has DataType as base type. In BasicOCL Tuple has also Class as base type so that the attributes of the tuple can be defined in the same way as in complete OCL – as Property instances. 4) In complete OCL, pre-defined types have pre-defined operations defined in the standard library. However, a DataType in Core::Basic cannot define such operations since it inherits from Type (and not from Class). For all data types and special types – like VoidType, InvalidType and AnyType – the following convention is used: in the standard library the instance representing the pre-defined type is accompanied with a class instance with the same name that holds the operations. An access to an operation of the predefined type implies an access to the operation of the complementary class instance. 13.3. Diagrams The diagrams below define completely the abstract syntax of BasicOCL (respectively EssentialOCL). The classes that are not imported from Core::Basic (respectively EMOF) are shown with a transparent fill color. VoidType DataType Class TupleType SetTypOrderedSetType SequenceType BagType e Type CollectionType PrimitiveType InvalidType TypeType AnyType +elementType 1 * Figure 34 : TypesTypedElement Figure 35 : The top container expression TypedElement Type TypeExp FeaturePropertyCall LiteralExp IfExp IteratorExp VariableExp Parameter IterateExp CallExp LoopExp OclExpression Variable +referredType 0..1 * +referringExp * +representedParameter 0..1 +baseExp 0..1 +appliedElement 0..1 +loopExp 0..1 +loopBodyOwner 0..1 +source 0..1 +body 1 +initExpression 0..1 +referredVariable 0..1 +variable * +iterator * +result 0..1 0..1+initializedElement 1 Figure 16 : main expression conceptsFeaturePropertyCall Operation OperationCallExp OclExpression PropertyCallExp Property NavigationCallExp +referredOperation 0..1 +referringExp * +parentCall 0..1 +argument {ordered} * +re*ferringExp +referredProperty * 0..1 Figure 37: Feature Property Call expressions OclExpression IfExp 1 0..1 +condition +ifOwner 1 0..1 +thenExpression +thenOwner 1 0..1 +elseExpression +elseOwner Figure 2 : If Expressions LetExp OclExpression 0..1 +in Variable 0..1 1 +variable 0..1 0..1 +initExpression +initializedElement Figure 38: Let expressionsLiteralExp EnumerationLiteral EnumLiteralExp 0..1 * +referredEnumLiteral +literalExp PrimitiveLiteralExp NumericLiteralExp NullLiteralExp InvalidLiteralExp Figure 39 : Literals CollectionLiteralPart CollectionLiteralExp kind : CollectionKind * 1 +part CollectionRange OclExpression 1 0..1 +first +firstOwner 1 0..1 +last +lastOwner CollectionItem 1 0..1 +item LiteralExp CollectionKind Set OrderedSet Bag Sequence <<enumeration>> TypedElement TupleLiteralExp Property TupleLiteralPart * 0..1 +part 0..1 0..1 +attribute Figure 40 : Collection and tuple literals Document ptc/2005-06-05 Page 34
Actions taken:
July 22, 2003: received issue
November 1, 2005: closed issue

Discussion:
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.


Issue 6393: OCL 2.0/international character sets (ocl2-ftf)

Click
here for this issue's archive.
Source: Simula Research Laboratory (Mr. Bran Selic, selic(at)acm.org)
Nature: Uncategorized Issue
Severity:
Summary:
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:
Revised Text:
Actions taken:
October 30, 2003: received issue
November 1, 2005: closed issue

Discussion:
Resolution:
Already resolved in the OCL2 document. "Ascii or unicode" is used instead of "ascii" alone.


Issue 6529: oclIsNew for a collection (ocl2-ftf)

Click
here for this issue's archive.
Source: Ecole Polytechnique Federale de Lausanne (Mr. Alfred Strohmeier, )
Nature: Uncategorized Issue
Severity:
Summary:
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())...

Resolution: closed no change
Revised Text:
Actions taken:
November 10, 2003: received issue
October 16, 2009: closed issue

Discussion:
OCL already is sufficiently expressive for this corner case.  The example supplied by the submitter can be expressed as

    s->select(oclIsNew())->size() = self.person->size()

Querying whether a collection is new does not make sense:  collection values are always new, by definition of OCL as a functional (side-effect-free) language.  If the concern is to query whether a collection-valued attribute of an object has been created, that is determined by asserting that the old value isEmpty() and the new value is notEmpty().
An important characteristic of collection values is that they exist entirely in the OCL domain.  The collection types are not defined in the model as data types, so an implementation of collections in the run-time system has no correlation to OCL collections.


Issue 6531: Omit predefined type OclModelElement. (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
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.

Resolution:
Revised Text: Revised Text: 1) In section 8.2 remove the obsolete sentences: "In comparison with UML 1.4 …" and "This means that a Classifier…". 2) In all the document replace OclModelElementType by ElementType. 3) Add the TypeType metaclass and ElementType in the types diagram (Figure 5) +elementType PrimitiveType InvalidType AnyType Operation Signal MessageType 0..1 * +referredOperation 0..1 * +referredSignal TypeType ElementType 4) Add the following description for the TypeType metaclass: """A TypeType is used to represent the type of the formal parameter of specific operations that need to refer to the types at the meta-level, like the oclIsKindOf, oclIsTypeOf and oclAsType pre-defined operations. It has a unique instance named 'OclType' which complies to any type defined in the model (at the meta level). """ 6) In section 8.2, replace the description of the OclModelElementType metaclass (now renamed ElementType) with the following text: A ElementType is used to represent the type of the formal parameter of specific operations that need to refer to elements of the model such as the UML states in the predefined oclInState operation. 7) In all 11.2.4 paragraph, replace all occurrences of 'typename' by 'typespec', "statename" by "statespec" and remove all sentences "Typename may be in the format Package::subPackage::classifier" and "statename may be in the format Class::State::subState". 8) Rename title 11.3 as "Special types". Changes the sentence "This section defines …" by "This section defines several special types that are used to formalize the signature of pre-defined operations that manipulate types and elements defined in the UML model". Rename OclModelElement as OclElement and change its description with "The singleton instance of ElementType". Change the description of OclType with "The singleton instance of TypeType". Remove the OclState description.
Actions taken:
November 10, 2003: received issue
November 1, 2005: closed issue

Discussion:
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).


Issue 6532: Consider OclType as a powertype (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
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?).

Resolution:
Revised Text: Delete references to OclType. Change Section 7.4.6 Re-typing or Casting: the object can be re-typed using the operation oclAsType(Classifier) ... but the known type is Classifier. Change Section 7.5.9 Predefined properties on All Objects: oclIsTypeOf(t : Classifier) : Boolean oclIsKindOf(t : Classifier) : Boolean ... oclAsType(t : Classifier) : instance of Classifier Add to Section 8.3.8 Additional Operations on UML metaclasses, under the heading Classifier: The operation allInstances() context Classifier def: allInstances() : Set( T ) = -- all instances of self returns all instances of the classifier and the classifiers specializing it. May only be used for classifiers that have a finite number of instances. This is the case, for example, for user defined classes because instances need to be created explicitly, and for enumerations, the standard Boolean type, and other special types such as OclVoid and OclInvalid. This is not the case, for example, for data types such as collection types or the standard String, Integer, and Real types. Delete the definition of the allInstances() operation on OclAny in Section 11.2.5 Operations and Well-formedness Rules. Change Section 11.2.5 Operations and Well-formedness Rules: oclAsType(type : Classifier) : T Evaluates to self, where self is of the type identified by type. post: (result = self) and result.oclIsTypeOf(type) oclIsTypeOf(type : Classifier) : Boolean Evaluates to true if self is of the type identified by type. post: self.oclType() = type oclIsKindOf(type : Classifier) : Boolean Evaluates to true if self conforms to the type identified by type. post: self.oclType().conformsTo(type) Delete Section 11.3.2 OclType Change Section 11.3.3 Operations and well-formedness rules: OclElement = (object : OclElement) : Boolean True if self is the same object as object. <> (object : OclElement) : Boolean True if self is a different object from object. post: result = not (self = object) OclType = (object : OclType) : Boolean True if self is the same object as object. <> (object : OclType) : Boolean True if self is a different object from object. post: result = not (self = object)
Actions taken:
November 10, 2003: received issue
October 16, 2009: closed issue

Discussion:
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.


Issue 6537: domain for library operations /, div (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
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 / ?

Resolution:
Revised Text: 1) Change the description of : / (r : Real) : Real, replacing "The value of self divided by r." by " The value of self divided by r". Evaluates to OclUndefined if r is equal to zero. 2) Change the description of : / (i : Integer) : Real replacing "The value of self divided by i." by " The value of self divided by i". Evaluates to OclUndefined if i is equal to zero
Actions taken:
November 10, 2003: received issue
November 1, 2005: closed issue

Discussion:
Adding: Evaluates to OclUndefined if r(resp i) is equal to zero.


Issue 6542: Flagging insecure cast from Set to Sequence (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Author: Jörn Guy Süß (jgsuess@cs.tu-berlin.de)
Description: Interpreter to warn of nondeterministic cast 
Rationale:
If an OCL expression contains a cast from Set to Sequence types, nondeterminism is introduced through the order of the new sequence. Either such casts should be disallowed, or the specification should require that implementations give feedback that nondeterministic behavior is to be expected

Resolution:
Revised Text:
Actions taken:
November 10, 2003: received issue
November 1, 2005: closed issue

Discussion:
Discussion:
We believe it is up to an implementation to decide whether to send a warning or not.
Disposition: Closed, no change


Issue 6543: Flagging recursive definitions (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Author: Jörn Guy Süß (jgsuess@cs.tu-berlin.de)
Description: Interpreter to warn of recursive definitions
Rationale:
While recursive definitions are necessary to express certain constructs, they may lack a fixpoint. Specification should require implementations to provide either an occurs check or structured time-out/stack-trace to handle these situations.

Resolution:
Revised Text:
Actions taken:
November 10, 2003: received issue
November 1, 2005: closed issue

Discussion:
We believe it is up to an implementation to decide whether to send a warning or not.
Revised Text:
Disposition: Closed, no change


Issue 6544: Operator precedence (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Author: Octavian Patrascoiu (O.Patrascoiu@kent.ac.uk)
Description: Logical operators 'and', 'or', and 'xor' have the same precedence, which in my opinion is not natural. I think that the precedence of these operators should be from highest to lowest as follows:

'and'
'or'
'xor'

Also, the precedence of some useful operators like 'div', 'mod', '^', and '^^', is not specified in section 4.3.2.

Resolution:
Revised Text: 1.@pre 2.message-expression operators: “^” and “^^” 3.dot and arrow operators: “.” and “->” 4.unary “not” and unary “-” 5.“*” and “/” 6.“+” and binary “-” 7.“if-then-else-endif” 8.“<“, “>”, “<=”, “>=” 9.“=”, “<>” 10.“and” 11.“or” 12.“xor” 13.“implies” Change Section 9.3.2 Operator Precedence to match.
Actions taken:
November 10, 2003: received issue
October 16, 2009: closed issue

Discussion:
The “div” and “mod” Integer operations are not operators; they are subject to the precedence of the “.” operator.


Issue 6545: Attributes and Association Ends versus Properties (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Author: Octavian Patrascoiu (O.Patrascoiu@kent.ac.uk)
Description: The submission uses the terms of Attributes and Association Ends, which are no longer used in UML 2.0. In order to align OCL 2.0 and UML 2.0 specifications I think that the expression package should look like:

 

 

I also think that the OCL grammar should be rewritten accordingly.

Resolution:
Revised Text:
Actions taken:
November 10, 2003: received issue
November 1, 2005: closed issue

Discussion:
Resolved. See issue 6012 (OCL/MOF alignment)


Issue 6546: Undefined values, isEmpty() and Collections (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Author: Octavian Patrascoiu (O.Patrascoiu@kent.ac.uk)
Description: Most of the modern OO languages support null values, but OCL does not. In order to map null values into OCL concepts we used the undefined value. Unfortunately, OCL offers two choices to test if a value is undefined or not: isEmpty and oclIsUndefined. Using isEmpty for such a purpose is some how confusing:
the result of property->isEmpty() must be true if the value of the property null/undefined 
the result of  Set{1/0, 1/0}->isEmpty() must be false
These situations are a source of errors and confusion at the implementation level. I think that isEmpty() should be used only to test if a collection is empty or not; the undefined values should be tested using ocIslUndefined. This operation should be also valid on collections. This approach will also work nice and clear for nested collections. 

Resolution: The submitter’s assertion about appropriate usage of oclIsUndefined() and isEmpty() is a matter of style. OCL does support null values, even in collections, so that a collection containing a single element that is null is not empty. The isEmpty() operation applied to scalar values that are null is an inevitable consequence of the coercion of scalars to sets. It is reasonable that a scalar null is coerced to an empty set while a non-null scalar is coerced to a non-empty set. Moreover, oclIsUndefined() is true not only for null, but also for invalid, which is not permitted in collections. Disposition: Closed, no change
Revised Text:
Actions taken:
November 10, 2003: received issue
October 16, 2009: closed issue

Discussion:
Deferred for timing reasons


Issue 6552: Clarify definition of collectNested for Set, Bag, and Sequence (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Author: Hubert Baumeister (baumeist@informatik.uni-muenchen.de),
Rolf Hennicker (hennicke@informatik.uni-muenchen.de),
Alexander Knapp (knapp@informatik.uni-muenchen.de)
Description: Clarify definition of collectNested for Set, Bag, and Sequence
Rationale:
For Set, Bag, and Sequence the definition of collectNested (page 6-17ff.) actually defines collect which should read collectNested.
As a minor detail, the definition of collectNested seems to be the only one using iterators as iterator variable. This should be aligned with select, reject, etc.

Resolution:
Revised Text: Change section 11.9.2 Set: collectNested The Bag of elements which results from applying body to every member of the source set. source->collectNested(iterators | body) = ... Change section 11.9.3 Bag: collectNested The Bag of elements which results from applying body to every member of the source bag. source->collectNested(iterators | body) = ... Change section 11.9.4 Sequence: collectNested The Sequence of elements which results from applying body to every member of the source set. source->collectNested(iterators | body) = ...
Actions taken:
November 11, 2003: received issue
October 16, 2009: closed issue

Discussion:
Deferred for timing reasons


Issue 6555: Missing equality and inequality operations on collection types (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Author: Hubert Baumeister (baumeist@informatik.uni-muenchen.de),
Rolf Hennicker (hennicke@informatik.uni-muenchen.de),
Alexander Knapp (knapp@informatik.uni-muenchen.de)
Description: Missing equality and inequality operations on collection types
Rationale:
The collection types Set, Sequence, and Bag show a predefined = operation. However, this operation is not defined for the abstract type Collection. 
Moreover, the operation <> is missing for all collection types.

Resolution:
Revised Text: Insert operation definitions at the beginning of Section 11.7.1 Collection: = (c : Collection(T)) : Boolean True if c is a collection of the same kind as self and contains the same elements in the same quantities and in the same order, in the case of an ordered collection type. <> (c : Collection(T)) : Boolean True if c is not equal to self. post: result = not (self = c)
Actions taken:
November 11, 2003: received issue
October 16, 2009: closed issue

Discussion:
Redefinition of the Collection::<> operation is not required in the context of the specializing collection types, because it is defined in terms of the Collection::= operation.


Issue 6556: Reintroduce allAttributes operator (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Author: Herman Balsters (h.balsters@bdk.rug.nl)
Description: Reintroduce allAttributes operator
Rationale:
In pre-OCL 2.0 versions, there was an operator called  "allAttributes": this operator (to be applied to class objects) returns the set of attributes of that object. (This operator should also be applicable to tuples as well, by the way.) Now the strange thing has happened that this most useful operator has vanished in OCL 2.0  I propose that it be re-introduced.

Resolution:
Revised Text:
Actions taken:
November 11, 2003: received issue
October 16, 2009: closed issue

Discussion:
The Classifier metaclass (from UML) in the OCL Abstract Syntax provides introspection of the attributes and operations that it defines.  OCL does not need to add to these capabilities.
Disposition:	Closed, no change


Issue 6558: Issue: General section to define OCL concepts (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Description: The specification should contain an introductory section containing definitions of the terms used in the specification and other notations that are used (e.g. well-formed expression, ill-formed expression, behaviour, undefined-behaviour etc.).
Rationale: This will avoid ambiguities and provide a better specification of the OCL (see specifications for C++, Java, and C#).  

Resolution:
Revised Text: Revised Text: 1) In the Terms and Definitions (section 3), remove the editorial comment for the FTF and replace the sentence "For the purposes of this specification, the terms and definitions given in the normative references and the following apply." by the sentence: "There are no formal definitions in this specification that are taken from other documents." 2) In the Symbols chapter, remove the editorial comment for the FTF and replace the sentence "List of symbols/abbreviations." by "There are no symbols defined in this specification". 3) In section 6.2, after paragraph "Section 12 …" adds the following paragraph: """Section 13 ("Basic OCL and Essential OCL" defines the adaptation of the OCL metamodel when used in the particular context of Core::Basic infrastructure library package and in the context of EMOF.""" 4) Update the acknowledgement list (6.3) adding France Telecom (alphabetical ordering)
Actions taken:
November 11, 2003: received issue
November 1, 2005: closed issue

Discussion:
Resolution:
Ideally we agree that a complete introduction of the concepts used could be provided
within the document to improve understandability of the specification. However, since
OCL makes usage of concepts defined in normative references (UML and MOF), we
prefer let the reader look at the reference documents.
We treat also here two other points concerning the general section: update of the
acknowledgement list and missing reference to chapter 13.


Issue 6560: Issue: Set of characters (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Description: The OCL 2.0 specification should describe the set of characters allowed in the OCL constructions (e.g. Unicode or ASCII). 
Rationale: This will help implementers to solve another ambiguity and to produce portable implementations. Unicode will be in my opinion the best choice. 

Resolution:
Revised Text: Add a reference to Section 3 Normative References: UNICODE 5.1 Standard: http://www.unicode.org/versions/Unicode5.1.0/ Add a new subsection to Section 7.2 Introduction: 7.2.3 Character Set OCL text comprises characters in the UNICODE character set. In particular, string literals, comments, and the names of types, features, and other elements in the UML model may contain any valid UNICODE character.
Actions taken:
November 11, 2003: received issue
October 16, 2009: closed issue

Discussion:
Deferred for timing reasons


Issue 6562: Issue: Keywords (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Description: OCL 2.0 uses keywords (e.g. and, or, xor, implies etc.) that cannot be used elsewhere.
Rationale: This means that these names cannot be used to identify properties, classes or packages. There are two options to solve this problem: either UML 2.0 specifies the names that cannot be used or the OCL concept of keywords has to be revised. 

Resolution:
Revised Text:
Actions taken:
November 11, 2003: received issue
October 16, 2009: closed issue

Discussion:
The first paragraph of Section 9.3 “Concrete Syntax” describes OCL’s syntax for escaping the names of model elements that clash with OCL reserved words.
Disposition:	Closed, no change


Issue 6564: Issue: Operator precedence (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Description: Section 4.3.2 does not specify precedence for operators like div, mod, ^^, or ^.
Rationale: The operator precedence must be as precise as possible in order to provide a platform-independent implementation. I think that logical operators should be organized on different levels of precedence:
	'not'
'and'
'or'
'xor'
'implies' 

Resolution: See issue 6544 for disposition
Revised Text:
Actions taken:
November 11, 2003: received issue
October 16, 2009: closed issue

Discussion:
This is a request to improve language definition. Should better be solved I a RTF.


Issue 6567: Issue: Attributes and Association Ends versus Properties (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Description: The submission uses the terms of Attributes and Association Ends, which are no longer used in UML 2.0.
Rationale: In order to align OCL 2.0 and UML 2.0 specifications I think that the expression package should look like:   I also think that the OCL grammar should be rewritten accordingly

Resolution:
Revised Text:
Actions taken:
November 11, 2003: received issue
November 1, 2005: closed issue

Discussion:
See issue 6012 (UML2/MOF2 alignment) for resolution.


Issue 6568: Issue: oclIUndefined() versus isEmpty() (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Description: OCL offers two choices to test if a value is undefined or not: isEmpty and oclIsUndefined.
Rationale: Most of the modern programming languages contain null values. The best OCL mapping for null value is the undefined value. Using isEmpty to test if a value is null/undefined is some how confusing:
* the result of property->isEmpty() must be true if the value of the         property is null/undefined
* the result of  Set{1/0}->isEmpty() must be false
because the expression property->isEmpty() is converted according to the OCL specification to Set{property}->empty()
These situations are a source of errors and confusion at the implementation level. I think that isEmpty() should be used only to test if a collection is empty or not; the null/undefined values should be tested using ocIslUndefined. This operation should be also valid on collections. This approach will also work nice and clear for nested collections. On the other hand I don't think that () should not be optional if the called operation has no arguments. This is feature specific to old languages like TAL and Pascal, while in modern languages like C, C++ the meaning of f and f() is different.

Resolution:
Revised Text: See issue 6546 for resolution.
Actions taken:
November 11, 2003: received issue
November 1, 2005: closed issue

Issue 6569: Issue: OclType (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Description: OclType should disappear from the OCL type hierarchy.
Rationale: OclType should be only present in the standard library to support values for the type expression used in functions like oclAsType(), oclIsKindOf(), and oclIsTypeOf().

Resolution:
Revised Text: See issue 6532 for resolution.
Actions taken:
November 11, 2003: received issue
November 1, 2005: closed issue

Issue 6570: Issue: OclModelElement (ocl2-ftf)

Click
here for this issue's archive.
Nature: Uncategorized Issue
Severity:
Summary:
Description: The object OclModelElement object should be removed from the standard library, while OclModelElementType should remain in OCL type hierarchy.
Rationale: It implies a useless level of wrapping for the model objects.

Resolution:
Revised Text: See issue 6531 for resolution.
Actions taken:
November 11, 2003: received issue
November 1, 2005: closed issue

Issue 6610: Enumeration approach for reflection (ocl2-ftf)

Click
here for this issue's archive.
Source: Modeling Value Group (Mr. Wim Bast, wim.bast(at)modelingvalue.nl)
Nature: Enhancement
Severity: Minor
Summary:
- I think the enumeration approach to reflection leads to a dead end. Why not leave that out for now and add full access to the user model in OCL2.1, when the other UML parts have stabilized. I think it would be quite straightforward to simply copy the relevant properties and operations from Classifier/Class to OclType.

Resolution:
Revised Text: See issue 6531 for resolution.
Actions taken:
November 13, 2003: received issue
November 1, 2005: closed issue

Issue 6611: OclUndefined = OclUndefine ? (ocl2-ftf)

Click
here for this issue's archive.
Source: Modeling Value Group (Mr. Wim Bast, wim.bast(at)modelingvalue.nl)
Nature: Clarification
Severity: Minor
Summary:
Perhaps it makes sense to explicitly mention whether OclUndefined = OclUndefined results in OclUndefined (or true)? The SQL equivalent seems to cause a lot of confusion, especially since in C "NULL == NULL" resturns true. For example, the above expression would not work with excluding(OclUndefined), given (OclUndefined=OclUndefined).isOclUndefined().....


Resolution: Technically, no change is necessary because the OclAny definition of the = operation, together with the definition of the singleton values null and invalid, is sufficient. However, being more explicit is helpful, especially as the there is no oclIsXyz() operation testing for void but not invalid.
Revised Text: Update section 11.2.5 Operations and Well-formedness Rules to add: OclVoid = (object : OclAny) : Boolean Redefines the OclAny operation, returning true if object is null. post: result = object.oclIsTypeOf(OclVoid) OclInvalid = (object : OclAny) : Boolean Redefines the OclAny operation, returning true if object is invalid. post: result = object.oclIsTypeOf(OclInvalid)
Actions taken:
November 13, 2003: received issue
October 16, 2009: closed issue

Discussion:
Deferred for timing reasons


Issue 6612: Formal Semantics of OCL 2.0 in Appendix A (ocl2-ftf)

Click
here for this issue's archive.
Source: Modeling Value Group (Mr. Wim Bast, wim.bast(at)modelingvalue.nl)
Nature: Enhancement
Severity: Significant
Summary:
Maybe the completion of the formal semantics of OCL is an issue that is too extensive as part of the finalization process of OCL 2.0. Therefore, I suggest to just add a note in Appendix A concerning the currently still missing parts of the formal semantics, i.e., in particular OCL Messages, Ordered Set, and def-clauses. If you want you can refer to my paper about the Formal Semantics of OCL Messages, presented at the OCL Workshop at UML 2003. It can currently be found at http://i11www.ira.uka.de/~baar/oclworkshopUml03/papers/05_formal_semantics_ocl_messages.pdf

Resolution:
Revised Text: See issue 5971 for disposition.
Actions taken:
November 13, 2003: received issue
November 1, 2005: closed issue

Issue 6615: Keywords "attr" and "oper"? (ocl2-ftf)

Click
here for this issue's archive.
Source: Modeling Value Group (Mr. Wim Bast, wim.bast(at)modelingvalue.nl)
Nature: Enhancement
Severity: Significant
Summary:
Keywords "attr" and "oper" still necessary? Keywords attr and oper are defined in the keywords list, but are not included in the concrete grammar. Are they maybe superfluous? If "attr" is really a keyword, then the well-formedness rule on page 140 that uses a local variable attr must use another variable name.

Resolution:
Revised Text: Strike the keywords “attr” and “oper” from Section 7.4.9 Keywords: and attr context def else endif endpackage if implies in inv let not oper or package post pre then xor
Actions taken:
November 13, 2003: received issue
October 16, 2009: closed issue

Discussion:
Deferred for timing reasons


Issue 6633: What's a collection? (ocl2-ftf)

Click
here for this issue's archive.
Source: HL7 (Mr. Grahame Grieve, grahame(at)healthintersections.com.au)
Nature: Uncategorized Issue
Severity:
Summary:
OCL 2 does not clarify what makes a type a collection. It's clear that
any multiple attributes and associations are collections.  And from
section 3.2, it's clear that parameterised classes may be treated as
OCL collections. However not all parameterised classes can be treated
as collections


This needs further clarification

Resolution:
Revised Text: See issue 5973 for disposition.
Actions taken:
November 20, 2003: received issue
November 20, 2003: received issue
November 1, 2005: closed issue

Issue 6888: Use the "null" keyword instead of verbose "OclUndefined". (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
Use the "null" keyword instead of verbose "OclUndefined".

Resolution:
Revised Text:
Actions taken:
January 7, 2004: received issue
October 16, 2009: closed issue

Discussion:
This suggestion has already been implemented in the final 2.0 version.
Disposition:	Closed, no change


Issue 7341: section 7.4.6 (Re-typing or casting) on p.13 (ocl2-ftf)

Click
here for this issue's archive.
Source: Missouri University of Science and Technology (Dr. Thomas Weigert, weigert(at)mst.edu)
Nature: Clarification
Severity: Significant
Summary:
In section 7.4.6 (Re-typing or casting) on p.13, it is stated that "An object can only be re-typed to one of its subtypes". In other words, in the expression object.oclAsType(A), A must be a subtype of the type of the object. However, in section 7.5.8 (Accessing overridden properties of supertypes) on p.20 an example is given of object.oclAsType(A), where A is a supertype of object. This contradicts the assertion made earlier. In section 11.2.4 there are no constraints given on oclAsType that would rule out the usage shown in the second paragraph. However, in the semantics section on p.A-25 it is only stated that for oclAsType, the the target type must be a subtype of the source type or vice versa, supporting again the usage in the second paragraph. Judging from these, I assume that the restriction given on p.13 is incorrect.

Resolution: Type-casting is more general than the set of known subtypes and supertypes. If the OCL type system can be considered as open (meaning that OCL expressions may be applied to objects of types not known in the context in which it was defined), then it must be permitted to attempt a cast to any other type. UML implements multiple inheritance, so that given any two types, it is always a possibility that an object could be classified by both, even if they do not apparently have any relationship. This is particularly important for constraints defined in type libraries. Because OCL provides type tests oclIsKindOf() and oclIsTypeOf(), it is reasonable that failure to cast result in invalid to indicate an error condition. Note that a type-testing expression such as self.oclAsType(SomeType).oclIsInvalid() is correct, though it may be considered as poor style. The effect of casting is only a parse-time re-typing to provide visibility of features not defined for the original type, and a run-time assertion of the required type of an object. It cannot change the type of an object or coerce an object to an instance of a different type, nor can it provide access to hidden or overidden features of a supertype. For this, a new syntax is required that statically indicates the definition of a feature by the classifier that defines it.
Revised Text: Change Section 7.4.6 Re-typing or Casting: ... object.oclAsType(Type2) --- changes the static type of the expression to Type2 An object can only be re-typed to a type to which it conforms. If the actual type of the object, at evaluation time, is not a subtype of the type to which it is re-typed, then the result of oclAsType is invalid. Casting provides visibility, at parse time, of features not defined in the context of an expression’s static type. It does not coerce objects to instances of another type, nor can it provide access to hidden or overridden features of a type. For this, the feature call is qualified by the name of the type (a path name, if necessary) whose definition of the feature is to be accessed. For example, if class Employee redefines the age() : Integer operation of the Person class, a constraint may access the Person definition as in context Employee inv: self.age() <= self.Person::age() For clarity, the qualified form may only be used with an explicit source expression. In section 9.3 Concrete Syntax, change the OperationCallExpCS preamble to: An operation call has many different forms. A is used for infix, B for using an object as an implicit collection. C is a straightforward operation call, while D has an implicit source expression. E, F and J are like C, D, and I, with the @pre addition. G covers the static operation call. Rule H is for unary prefix expressions. I and J use pathNameCS to permit qualification of operation names in access to redefined operations. And add the [I] and [J] rules: [I] OperationCallExpCS ::= OclExpressionCS ‘.’ pathNameCS ‘::’ simpleNameCS ‘(‘ argumentsCS? ‘)’ [J] OperationCallExpCS ::= OclExpressionCS ‘.’ pathNameCS ‘::’ simpleNameCS isMarkedPreCS ‘(‘ argumentsCS? ‘)’ In the OperationCallExpCS Synthesized attributes section, add the [I] and J] rules: [I] let owner : Classifier = pathNameCS.env.lookupPathName(pathNameCS.ast).referredElement.oclAsType(Classifier) in OperationCallExpCS.ast.referredOperation = owner.lookupOperation (simpleNameCS.ast, if argumentsCS->notEmpty() then arguments.ast->collect(type) else Sequence{} endif) OperationCallExpCS.ast.arguments = argumentsCS.ast OperationCallExpCS.ast.source = OclExpressionCS.ast [J] -- incorporate the isPre() operation. let owner : Classifier = pathNameCS.env.lookupPathName(pathNameCS.ast).referredElement.oclAsType(Classifier) in OperationCallExpCS.ast.referredOperation = owner.lookupOperation (simpleNameCS.ast, if argumentsCS->notEmpty() then arguments.ast->collect(type) else Sequence{} endif) OperationCallExpCS.ast.arguments = argumentsCS.ast OperationCallExpCS.ast.source = OclExpressionCS.ast.withAtPre() In the OperationCallExpCS Inherited attributes section, add: [I] OclExpressionCS.env= OperationCallExpCS.env [I] argumentsCS.env = OperationCallExpCS.env [J] OclExpressionCS.env= OperationCallExpCS.env [J] argumentsCS.env = OperationCallExpCS.env In the OperationCallExpCS Disambiguating rules section, add: [4] [I,J] pathNameCS must be a name of a Classifier in current environment. OperationCallExpCS.env.lookupPathName(pathNameCS.ast).referredElement.oclIsKindOf(Classifier) [5] [I,J] The type of the source expression must conform to the owner type of the referenced operation let owner : Classifier = pathNameCS.env.lookupPathName(pathNameCS.ast).referredElement.oclAsType(Classifier) in OclExpressionCS.ast.type.conformsTo(owner) Change the AttributeCallExpCS preamble to: This production rule results in a PropertyCallExp. In production [A] the source is explicit, while production [B] is used for an implicit source. Alternative C covers the use of a static attribute. Alternative D uses pathNameCS to permit qualification of attribute names in access to redefined attributes. Add rule D: [D] AttributeCallExpCS ::= OclExpressionCS ‘.’ pathNameCS ‘::’ simpleNameCS isMarkedPreCS? Synthesized attributes: [D] let owner : Classifier = pathNameCS.env.lookupPathName(pathNameCS.ast).referredElement.oclAsType(Classifier) in AttributeCallExpCS.ast.referredAttribute = owner.lookupAttribute(simpleNameCS.ast) [D] AttributeCallExpCS.ast.source = if isMarkedPreCS->isEmpty() then OclExpressionCS.ast else OclExpressionCS.ast.withAtPre() endif Inherited attributes: [B] OclExpressionCS.env = AttributeCallExpCS.env Disambiguating rules: [3] [D] pathNameCS must be a name of a Classifier in current environment. AttributeCallExpCS.env.lookupPathName(pathNameCS.ast).referredElement.oclIsKindOf(Classifier) [4] [D] The type of the source expression must conform to the owner type of the referenced attribute let owner : Classifier = pathNameCS.env.lookupPathName(pathNameCS.ast).referredElement.oclAsType(Classifier) in OclExpressionCS.ast.type.conformsTo(owner) Change the AssociationEndCallExpCS preamble to: This production rule represents a navigation through an association end. Rule A is the default, rule B is used with an implicit source, while rule C uses pathNameCS to permit qualification of association end names in access to redefined association ends. Add rule C: [C] AssociationEndCallExpCS ::= pathNameCS ‘::’ simpleNameCS (‘[‘ argumentsCS ‘]’)? isMarkedPreCS? Synthesized attributes: [C] let owner : Classifier = pathNameCS.env.lookupPathName(pathNameCS.ast).referredElement.oclAsType(Classifier) in AssociationEndCallExpCS.ast.referredAssociationEnd = owner.lookupAssociationEnd(simpleNameCS.ast) AssociationEndCallExpCS.ast.source = if isMarkedPreCS->isEmpty() then OclExpressionCS.ast else OclExpressionCS.ast.withAtPre() endif [C] AssociationEndCallExpCS.ast.qualifiers = argumentsCS.ast Inherited attributes: [C] OclExpressionCS.env = AssociationEndCallExpCS.env [C] argumentsCS.env = AssociationEndCallExpCS.env Disambiguating rules: [2] [C] pathNameCS must be a name of a Classifier in current environment. AssociationEndCallExpCS.env.lookupPathName(pathNameCS.ast).referredElement.oclIsKindOf(Classifier) [3] [C] The type of the source expression must conform to the owner type of the referenced association end let owner : Classifier = pathNameCS.env.lookupPathName(pathNameCS.ast).referredElement.oclAsType(Classifier) in OclExpressionCS.ast.type.conformsTo(owner) In Section 11.2.1, change the sentence: "One can also use the oclAsType() operation to explicitly refer to the OclAny properties" by " One can also use qualification by OclAny (name of the type) to explicitly refer to the OclAny properties" NOTE: In the added code, replace occurrences of 'withAtPre()' by 'isPre = true' if issue 9796 is adopted
Actions taken:
May 16, 2004: received issue
October 16, 2009: closed issue

Discussion:


Issue 7456: Remove the composition symbol at the end of PropertyCallExp (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
Remove the composition symbol at the end of PropertyCallExp in the association between Property-
CallExp (rolename appliedProperty) and OclExpression (rolename source). This should be a normal
association.
Composition implies lifetime dependency, therefore this use of composition is incorrect. An OclExpression
exists independent of its (optional) applied property and they have no lifetime dependency.

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
Discussion:
The source expression does not exist independently of the PropertyCallExp. The containment
strategy used by OCL to encode navigation expressions is from right to left (left expressions are
contained by expressions in the right).
Disposition: Closed, no change


Issue 7458: result of applying the collect operation to a Sequence (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
The result of applying the collect operation to a Sequence should be a Sequence, not a Bag. Likewise,
the result of applying the collect operation to an OrderedSet should be a Sequence, not a Bag.

Resolution:
Revised Text: Revised Text: 1) Replace the sentence "An important issue here is that the resulting collection is not a Set, but a Bag" by this one: "An important issue here is that when the source collection is a Set the resulting collection is not a Set, but a Bag. Moreover, if the source collection is a Sequence or an orderedSet, the resulting collection is a Sequence
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
According to the definition of the collect and collectNested iterators in the standard
library, the type of the result depends on the type of the source collection. If the source is
ordered the result is ordered. However there is an error in the 7.6.2 where it is said that a
collect always returns a Bag. The proposed revised text solves the inconsistency.


Issue 7459: There should be an OclUndefinedLiteralExp metaclass (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
There should be an OclUndefinedLiteralExp metaclass, subtype of PrimitiveLiteralExp. The type of
its instances should always be OclVoid.

Resolution:
Revised Text: See revised text of 5972.
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
Resolution:
Resolution of issue 5972 proposes splitting of the notion of OclUndefined in two notions
(NullLiteral and OclInvalid). Two metaclasses named NullLiteralExp and
InvalidLiteralExp are introduced to represent usages of these values within OCL
expressions.


Issue 7460: There should be an OclTypeLiteralExp metaclass (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
There should be an OclStateLiteralExp metaclass, subtype of LiteralExp. It should have an association
with UML::State.

Resolution:
Revised Text: Revised Text: 1) Add StateExp metaclass in figure 5 "the basic structure of the abstract syntax kernel metamodel for expressions". TypedElement Classifier TypeExp 0..1 * +referredType FeaturePropertyCall LiteralExp IfExp MessageExp IteratorExp VariableExp Parameter IterateExp CallExp LoopExp OclExpression 0..1 0..1 +source +appliedElement 1 0..1 +body +loopBodyOwner Variable 0..1 * +referredVariable +referringExp 0..1 * +representedParameter +variable 0..1 * +loopExp +iterator 0..1 0..1 +result +baseExp 0..1 0..1 +initExpression +initializedElemen0..t StateExp State 0..1 * +referredState 2) Add the class description below: """A StateExp is an expression used to refer to a state of a class within an expression. It is used to pass direcly to the pre-defined operation oclInState the reference of a state of a class defined in the UML model.""
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
Resolution: The StateExp metaclass is introduced. This is in line with the observation
that it is not possible to use enumerations to treat type reflection (see issues 6610 and
6531).


Issue 7461: There should be an OclTypeLiteralExp metaclass (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
There should be an OclTypeLiteralExp metaclass, subtype of LiteralExp. It should have an association
with UML::Classifier.

Resolution:
Revised Text: Revised Text: 1) Update figure 5 entitled "the basic structure of the abstract syntax kernel metamodel for expressions" with the new TypeExp metaclass. TypedElement Classifier TypeExp 0..1 * +referredType FeaturePropertyCall LiteralExp IfExp MessageExp IteratorExp VariableExp Parameter IterateExp CallExp LoopExp OclExpression 0..1 0..1 +source +appliedElement 1 0..1 +body +loopBodyOwner Variable 0..1 * +referredVariable +referringExp 0..1 * +representedParameter +variable 0..1 * +loopExp +iterator 0..1 0..1 +result +baseExp 0..1 0..1 +initExpression +initializedElemen0..t StateExp State 0..1 * +referredState 2) Add the following text description. """A TypeExp is an expression used to refer to an existing meta type within an expression. It is used in particular to pass the reference of the meta type when invoking the operations oclIsKindOf, oclIsTypeOf and oclAsType"""
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
Resolution:
The TypeExp metaclass is introduced. This is in line with the observation that it is not
possible to use enumerations to treat type reflection (see issues 6610 and 6531).


Issue 7462: flatten operation (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
It is not clear from the specification whether the flatten operation is meant to be a deep or a shallow
flatten. We prefer a deep flatten, but perhaps both options should be available.

Resolution:
Revised Text: See issue 5970 for disposition.
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Issue 7463: plus (infix) operator (’+’) (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
9. It would be very convenient to allow the plus (infix) operator (’+’) as concrete syntax for the String
concat.

Resolution:
Revised Text: Insert a definition at the beginning of Section 11.5.3 String: + (s : String) : String The concatenation of self and s. post: result = self.concat(s)
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
This is a request to improve the language. Better solved in a RTF.


Issue 7464: tostring operation for Integer, Real and Boolean (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
It would be convenient to have a tostring operation for Integer, Real and Boolean.

Resolution:
Revised Text: dd to Section 11.5.1 Real: toString() : String Converts self to a string value. Add to Section 11.5.2 Integer: toString() : String Converts self to a string value. Add to Section 11.5.3 String: toBoolean() : Boolean Converts self to a boolean value. post: result = (self = ‘true’) Add to Section 11.5.4 Boolean: toString() : String Converts self to a string value. post: if self then ‘true’ else ‘false’ endif
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
This is a request to improve the language. Better solved in a RTF.


Issue 7465: OclMessageArg metaclass that is currently defined, could be removed. (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
11. The OclMessageArg metaclass that is currently defined, could be removed. We propose the configuration
depicted in figure 1, together with the following constraints. Note that a similar set of constraint
must be added to chapter "The Use of Ocl Expressions in UML Models", depending on the
exact alignment with the UML metamodel. Also note that both the first and second constraint of
OclMessageExp on page 54 of the final adopted spec need to be changed: "arguments->forAll( a |
a.getType() ...." should be "arguments->forAll( a | a.type ....".
-- an unspecified value expression may not have an applied property
context UnspecifiedValueExp
10 June 2004,
page 2 of 22
Klasse Objecten
© Copyright Klasse Objecten
inv: self.appliedProperty->isEmpty()
-- an unspecified value expression may not be used anywhere but as
-- argument to an OclMessageExp
context OclExpression
inv: not appliedProperty.oclIsTypeOf(UnspecifiedValueExp)
context LoopExp
inv: not body.oclIsTypeOf(UnspecifiedValueExp)
context VariableDeclaration
inv: not initExpression.oclIsTypeOf(UnspecifiedValueExp)
context LoopExp
inv: iterators->forAll(i | not i.oclIsTypeOf(UnspecifiedValueExp))
context IterateExp
inv: not result.oclIsTypeOf(UnspecifiedValueExp)
context OperationCallExp
inv: arguments->forAll( i | not i.oclIsTypeOf(UnspecifiedValueExp))
context NavigationCallExp
inv: qualifiers->forAll( i | not i.oclIsTypeOf(UnspecifiedValueExp))
context IfExp
inv: not thenExpression.oclIsTypeOf(UnspecifiedValueExp)
context IfExp
inv: not elseExpression.oclIsTypeOf(UnspecifiedValueExp)
context IfExp
inv: not condition.oclIsTypeOf(UnspecifiedValueExp)
context LetExp
inv: not in.oclIsTypeOf(UnspecifiedValueExp)

Resolution:
Revised Text: 1) Remove the class description and well-formedness rules for OclMessageArg. 2) Update the figure 9 (The abstract syntax of Ocl messages) as follows: UnspecifiedValueExp CallOperationAction CallSignalAction
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
Resolution:
OclMessageArg is removed. The link between the message and its arguments
(OclExxpressions) is now direct as it is between OperationCallExp and the arguments.
No explicit constraint to the metaclass UnspecifiedValueExp has been added in order not
to restrict potential usages of this class in OCL language extensions.


Issue 7467: change rollnames (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
1. The keywords ’pre’, ’body’, ’in’ and ’context’ are being used in the OCL expressions themselves to
indicate role names. Actually this is an error. These can be avoided by changing the following
rolenames:
• - ’body’ of AbstractSyntax::Expression::LoopExp
• - ’pre’ of OclDomain::Values::LocalSnapshot
• - ’context’ of OclDomain::Evaluations::OclExpEval
• - ’in’ of AbstractSyntax::Expression::LetExp
• - ’in’of UML14::Core::ParameterDirectionKind
To check the expressions we have changed the above names into the same word beginning with an
upperclass character.

Resolution:
Revised Text: 1) Add the following text at the beginning of section 9.3. Handling conflicts with OCL keywords: As a convention to the concrete syntax, conflicting property or conflicting class names can be aliased using the "_" (underscore) prefix. Inside an OCL expression that is written with the concrete syntax, when a property name or a class name is found to start with a "_", firstly the symbol is lookup in the metamodel. If not found the same symbol with the "_" skipped is tried. 2) In all well-formedness rules add an underscore "_" for all attribute names that conflicts with OCL keywords.
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
Resolution:
As a convention to the concrete syntax, conflicting property or conflicting class names
can be aliased using the "_" (underscore) prefix. Inside an OCL expression that is written
with the concrete syntax, when a property name or a class name is found to start with a
"_", firstly the symbol is lookup in the metamodel. If not found the same symbol with the
"_" skipped is tried.


Issue 7468: The classifier name TupleType is also a reserved word (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
The classifier name TupleType is also a reserved word. In order to check the constraints we have
changed it into TTupleType.

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
Discussion:
TupleType is the name of an OCL metaclass but not a OCL reserved word. In any case,
for reserved word the "_" prefix convention should apply (see proposed resolution for
issue 7467).
Disposition: Closed, no change


Issue 7469: Errors in the abstract syntax chapter 1. -- [1] Integer conforms to real. (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
context Primitive
inv: (self.name = ’Integer’) implies
Primitive.allInstances()->forAll (p | (p.name = ’Real’) implies
(self.conformsTo(p))))
==> one closing bracket ’)’ too many

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
Resolution:
Typo error. The extra unmatched bracket should be removed.
Revised Text:
1) In page 37, replacing:
context Primitive
inv: (self.name = ’Integer’) implies
Primitive.allInstances()->forAll (p | (p.name = ’Real’) implies
(self.conformsTo(p))))
by
context Primitive
inv: (self.name = ’Integer’) implies
Primitive.allInstances()->forAll (p | (p.name = ’Real’) implies
(self.conformsTo(p)))


Issue 7470: The type of body expression must conform to declared type of result variabl (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
context IterateExp
Body.type.conformsTo(result.type)
==> missing ’inv:’

Resolution: This typo has already been corrected in the last OCL 2.0 release. Disposition: Close, no change
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Issue 7471: If message is a send action, arguments must conform to attributes of signal (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
context OclMessageExp
inv: sentSignal->notEmpty() implies
arguments->forall (a | a.getType().conformsTo
(self.sentSignal.signal.feature.oclAsType(StructuralFeature) )
->at (arguments->indexOf (a)).type))
==> should be:
context OclMessageExp
inv: sentSignal->notEmpty() implies
arguments->forAll (a | a.getType().conformsTo
(self.sentSignal.signal.feature
->at (arguments->indexOf
(a)).oclAsType(UML14::Core::StructuralFeature).type) )

Resolution:
Revised Text: 1) In section 8.3.7, in [2] rule of OclMessageExp, replace the OCL code with the following OCL code: context MessageExp inv: sentSignal->notEmpty() implies argument->forAll (a | a.type.conformsTo (self.sentSignal.signal.ownedAttribute ->at (argument->indexOf(a)).type) ) Disposition: Resolved Document ptc/2005-06-05 Page 133
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
Resolution:
In UML2 one can use directly the ownedAttribute role to access the Property which are
typed elements. Thanks to this it is possible to rewrite the rule in such a way that the
downcating is not necessary.


Issue 7472: context Operation (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
context Operation
def: hasMatchingSignature(paramTypes: Sequence(Classifier)) : Boolean =
-- check that operation op has a signature that matches the given
parameter lists
= let sigParamTypes: Sequence(Classifier) = self.allAttributes.type in
(
( sigParamTypes->size() = paramTypes->size() ) and
( Set{1..paramTypes->size()}->forAll ( i |
paramTypes->at (i).conformsTo (sigParamTypes->at (i))
)
)
)
==> remove the ’=’ after Boolean
==> same error occurs in "context Signal def: hasMatchingSignature...."

Resolution:
Revised Text: Revised Text: 1) In section 8.3.8, in OCL code of Operation::hasMatchingSignatures operation remove the '=' before 'let' 2) In section 8.3.8, in OCL code of Signal::hasMatchingSignature operation remove the '=' before 'let'
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
Resolution:
This is a typo error.


Issue 7473: In section 3.3.9 (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
5. In section 3.3.9 the operations "OclExpression::withAtPre() : OperationCallExp" and "OclExpression::
withAsSet() : OperationCallExp" should be prefixed with the keyword ’context’.

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
Resolution:
Typo error.
Revised Text:
1) In section 8.3.9, within 'OclExpression' subsection, insert the prefix "context:" before
OclExpression::withAtPre()
2) In section 8.3.9, within 'OclExpression' subsection, insert the prefix "context:" before
OclExpression::withAsSet()


Issue 7474: context TupleType::make(atts : sequence(Attribute) ) : TupleType (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
post: result.features = atts
post: result.stereotype.name = ’OclHelper’
==> ’sequence’ should be ’OrderedSet’

Resolution:
Revised Text: 1) In section 8.3.9, within the TupleType::make operation definition replace sequence (Attribute) by OrderedSet(Property).
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
Resolution:
Ocl code is changed: OrderedSet used instead of Sequence. Reference to the OclHelper is
removed since not really needed.


Issue 7475: 7. context AttrubuteCallExp (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
inv: type = referredAttribute.type
==> ’AttrubuteCallExp’ should be ’AttributeCallExp’

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
This typo has already been corrected in the last OCL 2.0 release. Now the well-formed rule relates to a PropertyCallExp.

Disposition:	Close, no change


Issue 7476: collection literal expression (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
-- [2] The type of a collection literal expression is determined by the
-- collection kind selection and the common supertype of all elements. Note that
-- the definition below implicitly states that empty collections have OclVoid as
-- their elementType.
context CollectionLiteralExp
inv: kind = CollectionKind::Set implies type.oclIsKindOf (SetType )
inv: kind = CollectionKind::Sequence implies type.oclIsKindOf (SequenceType)
inv: kind = CollectionKind::Bag implies type.oclIsKindOf (BagType )
inv: type.oclAsType (CollectionType).elementType = parts->iterate (p; c
:
Classifier = OclVoid | c.commonSuperType (p.type))
==> should be
context CollectionLiteralExp
inv: kind = CollectionKind::Set implies type =
StandardLibrary::StdLib::Set
inv: kind = CollectionKind::OrderedSet implies type =
StandardLibrary::StdLib::OrderedSet
inv: kind = CollectionKind::Sequence implies type =
StandardLibrary::StdLib::Sequence
inv: kind = CollectionKind::Bag implies type =
StandardLibrary::StdLib::Bag
inv: type.oclAsType
(OclAbstractSyntax::Types::CollectionType).elementType =
parts->iterate (p; c :
Classifier = StandardLibrary::StdLib::OclVoid | c.commonSuperType
(p.type))

Resolution:
Revised Text: In Section 8.3.7, CollectionLiteralExp: Add the following invariant as the second invariant defined on CollectionLiteralExp: inv: kind = CollectionKind::OrderedSet implies type.oclIsKindOf (OrderedSetType )
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
In this case the proposed solution of implying that a CollectionLiteralExp must be the correspondent Collection type of the StdLib is not correct. Set{1, 2, 3} is a CollectionLiteralExp whose kind is CollectionKind::Set and whose type is not Set, but it's Set(Integer). 
The original expression is correct. However, an invariant relating to the OrderedSet type is missing, which must be added.


Issue 7477: The type of the condition of an if expression must be Boolean. (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
context IfExp
inv: self.condition.type.oclIsKindOf(Primitive) and
self.condition.type.name =
’Boolean’
==> ’Primitive’ should be ’UML14::Core::Primitive’

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
This well-formed rule is correctly written in the last OCL 2.0 release.Now Primitive is called PrimitiveType in UML 2.1 and in the context of OCL which includes UML Infrastructure and OCL metamodels, doesn't need to be qualified. In other words, PrimitiveType is not a clashing name in the OCL context, hence doesn't need to be qualified.

Disposition:	Close, no change


Issue 7478: iterator (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
[1] If the iterator is ’forAll’, ’isUnique’, or ’exists’ the type of the
-- iterator must be Boolean.
context IteratorExp
inv: name = ’exists’ or name = ’forAll’ or name = ’isUnique’
implies type.oclIsKindOf(Primitive) and type.name = ’Boolean’
==> ’Primitive’ should be ’UML14::Core::Primitive’

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:


Issue 7479: result type (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
[2] The result type of the collect operation on a sequence type is a sequence,
-- the result type of ’collect’ on any other collection type is a Bag. The type
-- of the body is always the type of the elements in the return collection.
context IteratorExp
inv: name = ’collect’ implies
if source.type.oclIsKindOf(SequenceType) then
type =
expression.type.collectionType->select(oclIsTypeOf(SequenceType))-
>first()
else
type = expression.type.collectionType->select(oclIsTypeOf(BagType))-
>first()
endif
==> should be
context IteratorExp
inv: name = ’collect’ implies if source.type.oclIsKindOf(OclAbstractSyntax::Types::SequenceType) then
self.type = StandardLibrary::StdLib::Sequence
and
self.Body.type = Body.type
else
self.type = StandardLibrary::StdLib::Bag
and
self.Body.type = Body.type
endif

Resolution:
Revised Text: In Section 8.3.7, IteratorExp: Replace the text: [2]The result type of the collect operation on a sequence type is a sequence, the result type of ‘collect’ on any other collection type is a Bag. The type of the body is always the type of the elements in the return collection. context IteratorExp inv: name = ‘collect’ implies if source.type.oclIsKindOf(SequenceType) then type = expression.type.collectionType->select(oclIsTypeOf(SequenceType))->first() else type = expression.type.collectionType->select(oclIsTypeOf(BagType))->first() endif By the following one: [2]The result type of the ‘collect’ operation on a OrderedSet or a Sequence type is a Sequence, the result type of ‘collect’ on any other collection type is a Bag. The type of the body is always the type of the elements in the returned collection. context IteratorExp inv: name = ‘collect’ implies if source.type.oclIsKindOf(SequenceType) or source.type.oclIsKindOf(OrderedSetType) then type = body.type.collectionType->select(oclIsTypeOf(SequenceType))->first() else type = body.type.collectionType->select(oclIsTypeOf(BagType))->first() endif
Actions taken:
June 10, 2004: received issuie
October 16, 2009: closed issue

Discussion:
In OCL context SequenceType, Sequence and Bag are not clashing names, therefore they don't need to qualified. However, the OCL expression of this well-formed rule needs to be revised:
Collecting on an OrderedSet type, should produce a Sequence (see 12945 -issue's resolution).
As the reporter suggested, “body” must be used instead of “expression”. We need to check that the type of the body is always the type of the collected elements.


Issue 7480: 1] The type of the source expression must be a collection. (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
context LoopExp
inv: source.type.oclIsKindOf (CollectionType)
==> ’CollectionType should be ’OclAbstractSyntax::Types::CollectionType’

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
This well-formed rule is correctly written in the last OCL 2.0 release. In the OCL context, CollectionType is no a clashing name, so it doesn't need to be qualified.

Disposition:	Close, no change


Issue 7481: type of each iterator var. must be type of the elements of source collectio (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
context IteratorExp
inv: self.iterators->forAll(type = source.type.oclAsType
(CollectionType).elementType)
==> ’CollectionType should be ’OclAbstractSyntax::Types::CollectionType’

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
This well-formed rule is correctly written in the last OCL 2.0 release. In the OCL context, CollectionType is no a clashing name, so it doesn't need to be qualified.

Disposition:	Close, no change


Issue 7482: parameters of the operation. (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
14. -- [1] If the message is a call action, the arguments must conform to the
-- parameters of the operation.
context OclMessageExp
inv: calledOperation->notEmpty() implies
arguments->forall (a | a.getType().conformsTo
(self.calledOperation.operation.parameter->
select( kind = ParameterDirectionKind::In )
->at (arguments->indexOf (a)).type))
==> ’forall’ should be ’forAll’

Resolution:
Revised Text: In Section 8.3.7, in the first well-formed rules of MessageExp, replace the text “forall” by “forAll”.
Actions taken:
June 14, 2004: received issue
October 16, 2009: closed issue

Discussion:
As the reporter remarks, the forall collection operation is not well-written.


Issue 7483: attributes of the signal. (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
15. -- [2] If the message is a send action, the arguments must conform to the
-- attributes of the signal.
context OclMessageExp
inv: sentSignal->notEmpty() implies
arguments->forall (a | a.getType().conformsTo
(self.sentSignal.signal.feature.oclAsType(StructuralFeature)
->at (arguments->indexOf (a)).type))
==> ’forall’ should be ’forAll’

Resolution:
Revised Text: In Section 8.3.7, In the second well-formed rule of MessageExp, replace the text “forall” by “forAll”
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
As the reporter remarks, the forall collection operation is not well-written.


Issue 7484: ’sentMessage’ should be ’sentSignal’ (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
16. -- [4] An OCL message has either a called operation or a sent signal.
context OclMessageExp
inv: calledOperation->size() + sentMessage->size() = 1
==> ’sentMessage’ should be ’sentSignal’

Resolution:
Revised Text: 1) In Section 8.3.7, sub-section OclMessageExp, rule [2], replace 'sentMessage' by 'sentSignal'.
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
Typo error.


Issue 7485: 5] The target of an OCL message cannot be a collection. (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
context OclMessageExp
inv: not target.type.oclIsKindOf (CollectionType)
==> ’CollectionType should be ’OclAbstractSyntax::Types::CollectionType’

Resolution:
Revised Text: In Section 8.3.7, in the fifth well-formed rule of MessageExp, replace the text “IMessageExp” by “MessageExp”
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
As the reporter remarks, the forall collection operation is not well-written.
In the OCL context, CollectionType is no a clashing name, so it doesn't need to be qualified. However, there is a typo in the expression.


Issue 7486: forall’ should be ’forAll’ (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
18. -- [1] All the arguments must conform to the parameters of the referred operation
context OperationCallExp
inv: arguments->forall (a | a.type.conformsTo
(self.refParams->at (arguments->indexOf (a)).type))
==> ’forall’ should be ’forAll’

Resolution:
Revised Text: In Section 8.3.7, in the first well-formed rule of OperationCallExp, replace the text “forall” by “forAll”
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
As the reporter remarks, the forall collection operation is not well-written.


Issue 7487: the property ’refParams’ is not present in OperationCallExp (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
==> add the following:
context OperationCallExp
def: refParams: Sequence(UML14::Core::Parameter) =
self.referredOperation.Parameter->asSequence()
==> see also number 21.

Resolution:
Revised Text: In Section 8.3.7, In the third well-formed rule of OperationCallExp, replace the text “parameter” by “ownedParameter”.
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
This issue seems to be already been solved, because the property definition is present in the OCL 2.0 specification. However, I have detected a typo with the expression since “parameter” property should be “ownedParameter”


Issue 7488: ’parameter’ should be ’Parameter’ (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
20. -- [1] If the message is a call action, the arguments must conform to the
-- parameters of the operation.
context OclMessageExp
inv: calledOperation->notEmpty() implies
arguments->forAll (a | a.getType().conformsTo
(self.calledOperation.operation.parameter->
select( kind = ParameterDirectionKind::In )
->at (arguments->indexOf (a)).type))
==> ’parameter’ should be ’Parameter’

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
The change suggested by the reporter doesn't apply because the property “parameter” should be “ownedParameter” as it is written in the specification. 
Disposition:	Close, no change.


Issue 7489: message is a call action, (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
21. -- [1] If the message is a call action, the arguments must conform to the
-- parameters of the operation.
context OclMessageExp
inv: calledOperation->notEmpty() implies
arguments->forAll (a | a.getType().conformsTo
(self.calledOperation.operation.Parameter->
select( kind = UML14::Core::ParameterDirectionKind::In )
->at (arguments->indexOf (a)).type))

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue'

Discussion:
Discussion:
It seems that the reporter forgot to relate the problem. No more problems seem to do exist apart from the “forAll” typo resolved in issue 7482.
Disposition:	Close, no change.


Issue 7490: message is a send action, (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
22. -- [2] If the message is a send action, the arguments must conform to the
-- attributes of the signal.
context OclMessageExp
inv: sentSignal->notEmpty() implies
arguments->forAll (a | a.getType().conformsTo
(self.sentSignal.signal.feature.oclAsType(StructuralFeature)
->at (arguments->indexOf (a)).type))
==> should be:
context OclMessageExp
inv: sentSignal->notEmpty() implies
arguments->forAll (a | a.getType().conformsTo
(self.sentSignal.signal.feature
->at (arguments->indexOf
(a)).oclAsType(UML14::Core::StructuralFeature).type) )

Resolution: Discussion: This well-formed rule is correct in the current OCL 2.0 specification. It is a duplicate of the issue 7471. Disposition: See Issue 7471 for disposition
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Issue 7491: type of a TupleLiteralExp (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
23. -- [1] The type of a TupleLiteralExp is a TupleType with the specified parts.
context TupleLiteralExp
inv: type.oclIsKindOf (TupleType) and
tuplePart->forAll (tlep |
type.oclAsType (TupleType).allAttributes()->exists (tp | tlep.attribute
= tp))
and
tuplePart->size() = type.oclAsType (TupleType).allAttributes()->size()
==> should be:
context TupleLiteralExp
inv: type.oclIsKindOf (OclAbstractSyntax::Types::TTupleType)
and
tuplePart->forAll (tlep |
type.allAttributes()->exists (tp | tlep.asAttribute().name = tp.name and
tlep.asAttribute().type = tp.type and
tlep.asAttribute().initExpression = tp.initExpression))
and
tuplePart->size() = type.allAttributes()->size()

Resolution:
Revised Text: n Section 8.3.7, In the first well-formed rule of TupleLiteralExp, replace the text: context TupleLiteralExp inv: type.oclIsKindOf (TupleType) and part->forAll (tlep | type.oclAsType (TupleType).allProperties()->exists (tp | tlep.attribute = tp)) and part->size() = type.oclAsType (TupleType).allProperties()->size() By the following one: context TupleLiteralExp inv: type.oclIsKindOf (TupleType) and part->size() = type.allProperties()->size() and part->forAll (tlep | type.allProperties()->exists (tp | tlep.attribute.name = tp.name and tlep.attribute.type = tp.type))
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
Good remark:
oclAsType(TupleType) is not needed since the allAttributes (allProperties in the current specification) operation is defined on Classifier.
The property owned by the TupleType  and the property owned by the TupleLiteralPart can't be the same property. Therefore to check the correct type of the TupleLiteralExpressions, the name and type of both properties must be the same (note that the prorperty of the TupleType cann't have init expression)


Issue 7492: tuple literal expression (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
24. -- [2] All tuple literal expression parts of one tuple literal expression have
-- unique names.
context TupleLiteralExp
inv: tuplePart->isUnique (attribute.name)
==> should be:
context TupleLiteralExp
inv: tuplePart->isUnique (name)

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
Discussion:
This issue is controversial, because they both seem to be correct: The name of the tuple part can be taken from the TupleLiteralPart itself (it's a TypedElement which has name) or it can be taken from the referred property. However, looking at the Concrete Syntax definition, it doesn't seem that the name of the TupleLiteralPart is initialized from the referred property, so the current well-formed rule is the best one.

Disposition:	Close, no change.


Issue 7493: The type of the attribute is the type of the value expression. (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
25. -- [1] The type of the attribute is the type of the value expression.
context TupleLiteralExpPart
inv: attribute.type = value.type
==> should be removed, the type ’TupleLiteralExpPart’ does not exist.

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
This issue has already been resolved.

Disposition:	See Issue 8814 for disposition


Issue 7494: type of a TupleLiteralExp (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
26. -- [1] The type of a TupleLiteralExp is a TupleType with the specified parts.
context TupleLiteralExp
inv: type.oclIsKindOf (OclAbstractSyntax::Types::TTupleType)
and
tuplePart->forAll (tlep |
type.allAttributes()->exists (tp | tlep.attribute = tp))
and
tuplePart->size() = type.allAttributes()->size()
==> should be
context TupleLiteralExp
inv: type.oclIsKindOf (OclAbstractSyntax::Types::TTupleType)
and
tuplePart->forAll (tlep |
type.allAttributes()->exists (tp | tlep.asAttribute().name = tp.name and
tlep.asAttribute().type = tp.type and
tlep.asAttribute().initExpression = tp.initExpression))
and
tuplePart->size() = type.allAttributes()->size()

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
Discussion:
It seems that this issue is the same issue than the previously resolved issue 7491.

Disposition:	See Issue 7491 for disposition


Issue 7495: context TTupleType::make(atts : sequence(Attribute) ) : TTupleType (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
27. context TTupleType::make(atts : sequence(Attribute) ) : TTupleType
post: result.features = atts
post: result.stereotype.name = ’OclHelper’ ==> ’sequence(Attribute)’ should be ’Sequence(UML14::Core::Attribute)’

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
This operation has been changed in the last OCL 2.0 specification (see issue for 7474 details). Moreover, the suggested qualification is not needed in the OCL context.

Disposition:	Close, no change


Issue 7496: "Bag" (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
28. -- [1] The name of a bag type is "Bag" followed by the element type’s name in
-- parentheses.
context BagType
inv: self.name = ’Bag(’ + self.elementType.name + ’)’
-- [1] The name of a collection type is "Collection" followed by the element
-- type’s name in parentheses.
context CollectionType
inv: self.name = ’Collection(’ + self.elementType.name + ’)’
-- [1] The name of a set type is "OrderedSet" followed by the element type’s name
-- in parentheses.
context OrderedSetType
inv: self.name = ’OrderedSet(’ + self.elementType.name + ’)’
-- [1] The name of a sequence type is "Sequence" followed by the element type’s
-- name in parentheses.
context SequenceType
inv: self.name = ’Sequence(’ + self.elementType.name + ’)’
-- [1] The name of a set type is "Set" followed by the element type’s name in
-- parentheses. context SetType
inv: self.name = ’Set(’ + self.elementType.name + ’)’
==> ’+’ should be replaced by ’concat’ or ’+’ should be allowed as concrete syntax for the String concat
operation.
inv: self.name = ’Bag(’.concat( self.elementType.name).concat(’)’)
inv: self.name = ’Collection(’.concat(
self.elementType.name).concat(’)’)
inv: self.name = ’OrderedSet(’.concat(
self.elementType.name).concat(’)’)
inv: self.name = ’Sequence(’.concat( self.elementType.name).concat(’)’)
inv: self.name = ’Set(’.concat( self.elementType.name).concat(’)’)

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
In the next OCL (2.1) specification, the operator + will be allowed to concat strings (see issue 7463 disposition), therefore, the well-formed rule will be correct.

Disposition:	Close, no change


Issue 7497: referredOperation (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
29. -- [2] The parameters of the referredOperation become attributes of the instance
-- of OclMessageType
context OclMessageType
inv: referredOperation->size() = 1 implies
self.feature = referredOperation.parameter.asAttribute()
==> ’parameter’ should be Parameter
==> ’.asAttribute()’ should be ’->collect(p | p.asAttribute().oclAsType(UML14::Core::Feature) ).asOrderedSet()’

Resolution:
Revised Text: No change due to this issue.
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Discussion:
The problem with the missing asOrderedSet casting is resolved thanks to UML2 since
the Classifier properties are now ordered.


Issue 7498: context TTupleType::... (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
30. context TTupleType::make(atts : Sequence(UML14::Core::Attribute) ) : TTupleType
post: result.features = atts
post: result.stereotype.name = ’OclHelper’
==> should be: context TTupleType::make(atts : OrderedSet(UML14::Core::Attribute) ) :
TTupleType
post: result.feature = atts
post: result.stereotype.name = ’OclHelper’

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
This operation has been changed in the last OCL 2.0 specification (see issue for 7474 details). Moreover, the suggested qualification is not needed in the OCL context.

Disposition:	Close, no change


Issue 7499: context Classifier (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
def: lookupAttribute(attName : String) : Attribute =
self.allAttributes->any(me | me.name = attName)
def: lookupAssociationEnd(name : String) : AssociationEnd =
self.allAssociationEnds->any (ae | ae.name = name)
def: lookupAssociationClass(name : String) : AssociationClass =
self.allAssociationClasses->any (ae | ae.name = name)
def: lookupOperation (name: String, paramTypes: Sequence(Classifier)):
Operation =
self.allOperations->any (op | op.name = name and
op.hasMatchingSignature(paramTypes))
def: lookupSignal (sigName: String, paramTypes: Sequence(Classifier)):
Operation =
self.allReceptions.signal->any (sig | sig.name = sigName and
sig.hasMatchingSignature(paramTypes))
==> all references to operations like allAttributes are missing brackets, and the returnType of lookup-
Signal should be Signal. The whole expression should be:
context Classifier
def: lookupAttribute(attName : String) : Attribute =
self.allAttributes()->any(me | me.name = attName)
def: lookupAssociationEnd(name : String) : AssociationEnd =
self.allAssociationEnds()->any (ae | ae.name = name)
def: lookupAssociationClass(name : String) : AssociationClass =
self.allAssociationClasses()->any (ae | ae.name = name)
def: lookupOperation (name: String, paramTypes: Sequence(Classifier)):
Operation =
self.allOperations()->any (op | op.name = name and
op.hasMatchingSignature(paramTypes))
def: lookupSignal (sigName: String, paramTypes: Sequence(Classifier)):
Signal =
self.allReceptions().signal->any (sig | sig.name = sigName and
sig.hasMatchingSignature(paramTypes))

Resolution:
Revised Text: In section 8.3.8 in which new operations are defined on Classifier (page 56) replace the text: def: lookupSignal (sigName: String, paramTypes: Sequence(Classifier)): Operation By the following one: def: lookupSignal (sigName: String, paramTypes: Sequence(Classifier)): Signal
Actions taken:
June 10, 2004: received issue
October 16, 2009: closed issue

Discussion:
Some  related problems by the reporter have been already corrected. However the return type of the lookupSignal operation is still incorrect. It should be Signal type.


Issue 7547: ’StringValue.iterators (ocl2-ftf)

Click
here for this issue's archive.
Source: OpenModeling (Mr. Jos Warmer, jos.warmer(at)openmodeling.nl)
Nature: Uncategorized Issue
Severity:
Summary:
39. The association between ’StringValue.iterators’ and ’LoopExpEval’ should be ordered on the side
of ’StringValue.iterators’.

Resolution:
Revised Text:
Actions taken:
June 10, 2004: received issue
November 1, 2005: closed issue

Issue 8662: Section: 11.7.2 (ocl2-ftf)

Click
here for this issue's archive.
Nature: Clarification
Severity: Minor
Summary:
It's late in the day but I do not see that the OCL definition for union(s:Set(T)): Set(T) is totally accurate because it does not mention that self and s cannot contain the same element or the union of self and s would be a bag not a set. I am also confused by the last post for bothe asSequenced(): Sequence(T) and asBag(): Bag(T) where the result->count(elem)=1. Should this be result->count(elem)>=1 in both cases because you're writing about sequences and bags?

Resolution:
Revised Text:
Actions taken:
March 29, 2005: received issue
October 16, 2009: closed issue

Discussion:
The submitter is misunderstanding.  For Set union, both sets may have elements in common; the result simply does not have duplicates.  The union is not defined as producing a bag, but another set.

On the other point, conversion of a set to a sequence or a bag cannot arbitrarily replicate elements, so it does not make sense that the result of asSequence() or asBag() on a set should contain multiple occurrences of any element.

Disposition:	Closed, no change


Issue 8663: Section: 11.9.1 exists (ocl2-ftf)

Click
here for this issue's archive.
Source: U. S. Geological Survey (Ms. Jane Messenger, jmessenger(at)usgs.gov)
Nature: Clarification
Severity: Minor
Summary:
Now it is too early in the morning because the statement "Results in true if body evaluates to true for at least one element in the source collection" does not make sense with the OCL notation on the right side of the equals symbol "source->iterate(iterators; result:Boolean = false | result or body)." One says true, the other says false.

Resolution:
Revised Text:
Actions taken:
March 30, 2005: received issue
October 16, 2009: closed issue

Discussion:
The submitter appears to have misread the initialization of the iterate accumulator variable to false as implying that the result of the iterate expression is false.

Disposition:	Closed, no change


Issue 8664: Section: 11.9.2 reject (ocl2-ftf)

Click
here for this issue's archive.
Source: U. S. Geological Survey (Ms. Jane Messenger, jmessenger(at)usgs.gov)
Nature: Clarification
Severity: Minor
Summary:
On the left side of the equals symbol is the word "select" correct or should it be "iterate?"

Resolution:
Revised Text:
Actions taken:
March 30, 2005: received issue
October 16, 2009: closed issue

Discussion:
The formulation of the constraint is correct.  The reject iterator is conveniently defined in terms of select with a negated body.
Disposition:	Closed, no change


Issue 8790: OclAny cannot be an instance of Classifier (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
Classifier is an abstract class. It is then not possible to define the OclAny of the standard library as a direct instance of classifier. 

Suggestion: Define a AnyType metatype

Resolution:
Revised Text:
Actions taken:
May 18, 2005: received issue
October 16, 2009: closed issue

Discussion:
The AnyType metaclass is already defined in the final OCL 2.0 specification.
Disposition:	Closed, no change


Issue 8791: Specific inheritance links at M1 level should be removed (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
Figure 28 defines specific inheritance links between M1 types that are 
not inferred from M2 types. This links should be suppressed since it brings 
confusion and unnecessary complexity to the standard library 
definition. The particular compliance rules of OclVoid and OclAny can be defined independently of the "inheritance" formalism.

Resolution:
Revised Text: 1) Remove Figure 28. 2) In 11.2.1, replace the paragraph: "The type OclAny is the supertype of all types in the UML model and the primitive types in the OCL Standard Library. The collection types from the OCL Standard Library are not subtypes of OclAny. Properties of OclAny are available on each object in all OCL expressions. OclAny is itself an instance of the metatype Classifier. " By: "All types in the UML model and the primitive types in the OCL standard library comply with the type OclAny. Conceptually, OclAny behaves as a supertype for all the types except for the OCL pre-defined collection types. Features of OclAny are available on each object in all OCL expressions. OclAny is itself an instance of the metatype AnyType."
Actions taken:
May 18, 2005: received issue
November 1, 2005: closed issue

Discussion:
Resolution:
Figure 28 is removed in order not to explicitly enforce implementations to realize specific
the compliance rules of OclAny, OclVoid and so on using inheritance mechanism. This
removal does not affect the compliance rules given for the types defined in the standard
library.


Issue 8792: VariableDeclaration should be renamed Variable (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
The concept representing a parameter declaration is not called ParameterDeclaration but Parameter. Similarily, the concept corresponding to variable declaration should be called Variable. Also this concept already exists in UML2 and the name chosen for the metaclass is Variable. 

Also the name property of the variable can be taken from the super class NamedElement instead of having a specific varName attribute.


Resolution:
Revised Text: Resolution: 1) Update all occurrences of VariableDeclaration by Variable, including the diagrams. 2) In the definition of the LetExp metaclass (chapter 8.3.6), change the description of the 'variable' property with the following text: "The Variable introduced by the Let expression"
Actions taken:
May 18, 2005: received issue
November 1, 2005: closed issue

Issue 8793: The container for self and return variables is missing (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
The OCL spec does not define who is the container of the 'self', the 'result' and other variables bound to the parameters of an operation. This makes the OCL instanciation incomplete and invalid.


Resolution:
Revised Text: 1) Replace diagram 29 with the updated version below: OpaqueExpression OclExpression Variable ExpressionInOcl 1 0..1 +bodyExpression +topExpression 0..1 0..1 +contextVariable +selfOwner 0..1 0..1 +resultVariable +resultOwner * 0..1 +parameterVariable +varOwner TypedElement 2) Remove 'contextClassifier' property in the class description.3) In the definition of OclInExpression add the three properties descriitions with the following definitions: """ contextVariable The 'self' variable. The contextual classifier is the type of the 'self'' variable. resultVariable The 'result' variable representing the value to be returned by the operation. parameterVariable The variables representing the owned parameter of the current operation. """
Actions taken:
May 18, 2005: received issue
November 1, 2005: closed issue

Discussion:
The ExpressionInOcl – defined separately in chapter 12 - is used for the containment of
these variables. Explicit links for the containment of the 'self', 'result' and the variables
representing the input parameters of an operation are added to this ExpressionInOcl. This
provides a default way to contain these variables (an extension of the OCL language may
choose another containment strategy for these variables). ExpressionInOCl inherits from
OpaqueExpression which is a class taken from UML. The property contextualClassifier is
removed since it can now be accessed using the type of the 'self' variable.


Issue 8794: make link explicit (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
The link between a variable representing a parameter and the parameter should be made explicit. 

The link between a variable and a parameter is currently not explicitly modelled in the OCL abstract syntax. It depends on name comparison. This adds unnecessary complexity to implementers. 


Resolution:
Revised Text: 1) The diagram 6 is updated with the introduction of the 'representedParameter' link: TypedElement Classifier TypeExp 0..1 * +referredType FeaturePropertyCall LiteralExp IfExp MessageExp IteratorExp VariableExp Parameter IterateExp CallExp LoopExp OclExpression 0..1 0..1 +source +appliedElement 1 0..1 +body +loopBodyOwner Variable 0..1 * +referredVariable +referringExp 0..1 * +representedParameter +variable 0..1 * +loopExp +iterator 0..1 0..1 +result +baseExp 0..1 0..1 +initExpression +initializedElemen0..t StateExp State 0..1 * +referredState 2) The property 'representedParameter' is added to the description of Variable metaclass with the following description:"""The Parameter in the current operation this variable is representing. Any access to the variable represent an access to the parameter value. """
Actions taken:
May 18, 2005: received issue
November 1, 2005: closed issue

Discussion:
Resolution:
An 0..1 'representedParameter' property linking a Variable to a Parameter is added.
Within an OCL expression, a Parameter of an operation is manipulated through the usage
of a variable that is bound to the parameter.


Issue 8809: Should compare the value of the slots and not the objects itself (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
In the well-formedness rules of OclMessageType (section 8.2.2), the self.feature cannot be equal to the result of the asParameter() operation. The rule need to be rewritten so that the value of the slots are compared (the 'name' and 'type' instead of comparing the object themselves).

A similar problem occurs in the well-formedness rule [2] of OclMessageType (section 8.2.2), the self.feature cannot be equal to the result of the 'referredSignal.feature' since in that case the referred features will be contained twice.


Resolution:
Revised Text: 1) Replace the text of well-formedness rule [2] with the following text: context MessageType: inv: referredOperation->size()=1 implies Set{1..self.ownedAttribute->size()}->forAll(i | self.ownedAttribute.at(i).cmpSlots( referredOperation.ownedParameter.asProperty().asOrderedSet().at(i)) 2) Replace the text of well-formedness rule [2] with the following text: context MessageType inv: referredSignal->size() = 1 implies Set{1..self.ownedAttribute->size()}->forAll(i | self.ownedAttribute.asOrderedSet().at(i).cmpSlots( referredSignal.ownedAttribute.asOrderedSet()->at(i))
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Discussion:
A new definition is provided for both rules which uses an additional operation
Property::cmpSlots.


Issue 8810: Inherited or non navigable properties should not appear in class descriptio (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
In the association list of the OclExpression metaclass description, the 'appliedProperty', 'parentOperation' and 'initializedVariable' are non navigable and should be removed. In addition the 'type' property should be inherited from the UML2 metaclass TypedElement.


Resolution:
Revised Text: 1) Remove all the text within the Associations subtitle, including the subtitle (since no property is left).
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Discussion:
The description of the OclExpression class is updated by removing the text referring to
these inherited or non navigable properties.


Issue 8811: Use a uniform convention to name multivalued properties (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
In particular the properties NavigationCallExp::qualifiers, OperationCallEXp::arguments should be renamed NavigationCallExp::qualifier and OperationCallEXp::argument.

Resolution:
Revised Text: 1) In the figures, in the property names of class descriptions and within Ocl code specifications: perform a global replacement of 'qualifiers' word by 'qualifier', 'arguments' by 'argument', 'iterators' by 'iterator', 'parts' by 'part' including role names in figures.
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Discussion:
Usage of 'qualifiers' and 'arguments' are replaced by 'qualifier' and 'argument'.


Issue 8812: The set of possible values of CollectionKind is missing (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
The description of the CollectionKind should indicate the list of possible values

Resolution:
Revised Text: 1) Add the following sentence at the end the current description text. Possible values are Set, OrderedSet, Bag and Sequence.
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Discussion:
A sentence is added in the description to remind on the possible values.


Issue 8813: The naming of the parts properties in literals is not consistent (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
The naming to refer to the parts of tuple literals and collection literals should be uniformized. For tuples it is called 'tuplePart' and for collection literals it is called 'parts'. Also the CollectionLiteralExp::parts and TupleLiteralExp::tuplePart properties is only depicted in the diagrams (missing in the class descriptions)


Resolution:
Revised Text: 1) In the class description of TupleLiteralExp, add the missing 'part' property with the following description: "The parts of the tuple literal expression". 2) Update figure 10 by changing 'tuplePart' as 'part'. For clarity the literals diagrams is splitted in two parts (simple litterals/ colletion and tuple literals). LiteralExp CollectionKind Set OrderedSet Bag Sequence <<enumeration>> TypedElement TupleLiteralExp Property TupleLiteralPart * 0..1 +part 0..1 0..1 +attribute 3) In the class description of CollectionLiteralExp, add the missing 'part' property with the following description: "The parts of the collection literal expression". 4) In all the document, within any Ocl code, replace all occurrences of 'tuplePart' by 'part' 5) In all the document, within any Ocl code, replace all occurrence of 'parts' by 'part'.
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Discussion:
The tuplePart is renamed 'part' and 'parts' (for collections) is renamed 'part'.


Issue 8814: Inconsistency in the way to represent Tuple literal part (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
In the well-formedness rules there is a class named TupleLiteralExpPart but in the diagram VariableDeclaration is strangely used to represent the literal tuple parts.


Resolution:
Revised Text: 1) Update figure 10 (abstract syntax for literal expressions).2) Remove 'type' property in the class description of CollectionLiteralPart. 3) Replace in all the document 'TupleLiteralExpPart' by 'TupleLiteralPart'.
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Discussion:
The ambiguity is solved by choosing the specific TupleLiteralExpPart metaclass
(renamed TupleLiteralPart to use the same naming convention as for
CollectionLiteralPart). In addition, since TupleLiteralPart and CollectionLiteralPart are
typed, both classes inherit from TypedElement (instead of having a direct 'type' property).
This is aligned with the conventions used within the UML metamodel.


Issue 8815: Should avoid using the OclHelper stereotype (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
Referring to the OclHelper stereotype in the well-formedness rules should be avoided since not strictly necessary. It should be possible yo use OCL in UML without using stereotypes

Resolution:
Revised Text: 1) In TupleType::make definition remove the last line: post: result.stereotype.name='OclHelper' 2) In VariableDeclaration::asAttribute, remove the last line: post: result.stereotype.name = 'OclHelper' 3) In Parameter::asAttribute remove the last line post: result.stereotype.name = 'OclHelper' 4) In Parameter::make remove the last line post: result.stereotype.name = 'OclHelper'
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Discussion:
There are a few list of additional operations references that make unnecessary testing of
of the presence of OclHelper like the TupleType::make() operation. Unnecessary
conditions regarding the OclHelper stereotype are removed.


Issue 8816: The Ocl prefix should be avoided as much as possible in metaclass names (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
Except for the abstract OclExpression metaclass which differentiates from the UML class Expression, the other metaclasses OclMessageType, OclMessageExp and OclMessageArg should better be renamed MessageType, MessageExp and MessageArg to improve uniformity and readability of the metamodel.


Resolution:
Revised Text: 1) In all the text of the specification OclMessageType is replaced by MessageType. In particular in figure 5 (OCL Types). 2) In all the text of the specification OclMessageExp is replaced by MessageExp. In particular in figure 9.
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Discussion:
Classes OclMessageType, OclMessageExp are renamed MessageType and MessageExp


Issue 8817: An UnlimitedNaturalExp should be added in the metamodel (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
An UnlimitedNaturalExp should be added in the metamodel to be used to access upper bound values in multiplicity specifications. This will be conformant with UML2 primitive literals

Resolution:
Revised Text: 1) Update Figure 10 with the new metaclass. IntegerLiteralExp integerSymbol : Integer RealLiteralExp realSymbol : Real BooleanLiteralExp booleanSymbol : Boolean StringLiteralExp stringSymbol : String UnlimitedNaturalExp symbol : UnlimitedNatural LiteralExp EnumerationLiteral EnumLiteralExp 0..1 * +literalExp PrimitiveLiteralExp NumericLiteralExp NullLiteralExp InvalidLiteralExp 2) Add the class description with the following text: """An UnlimitedNaturalExp is used to refer to the value of the upper bound multiplicity of a property. """ Disposition: Resolved
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Discussion:
The metaclass is added.


Issue 8818: Reusing TypedElement for UnspecifiedValueExp (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
The type property of UnspecifiedValueExp can be obtained from a superclass (for instance TypedElement or OclExpression

Resolution:
Revised Text:
Actions taken:
May 25, 2005: received issue
October 16, 2009: closed issue

Discussion:
The OCL 2.0 final specification already has UnspecifiedValueExp specializing OclExpression.
Disposition:	Closed, no change


Issue 8819: The superclass of UnspecifiedValueExp is not ModelElement (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
According to figure 9, the UnspecifiedValueExp does not inherits from OclExpression. However this is contradictory with the text description of the metaclass (and it own name).

Resolution:
Revised Text: See issue 8820 for resolution.
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Issue 8820: The composition associations in figure 9 are missing (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
The composition associations in figure 9 are missing. In particular, a message 
expression (OclMessageExp) should contain its arguments, its target expression, are –probably – specified call action. Otherwise the model cannot be properly instanciated

Resolution:
Revised Text: 1) In section 8.3.4, change figure 9 with the diagram below. UnspecifiedValueExp CallOperationAction CallSignalAction OclExpression MessageExp 0..1 +cal ledOperation 0..1 +sentSignal 1 0..1 +target 0..1 +argument {ordered} 2) In section 8.3.4, remove the 'type' property from the description of the UnspecifiedValueExp class. 3) In section 8.3.9, within OclMessageArg subtitle, remove the definition of getType() additional operation. Remove the OclMessageArg – since no additional operations is left for this metaclass.
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Discussion:
This resolution is for the current 8820 issue and for the merged issues 8818, 8819 and
8821.
UnspecifiedValueExp has now OclExpression as base class (issue 8819), and indirectly
TypedElement, which avoids defining a specific 'type' property (issue 8818). Also this
avoids defining the specific 'undefined' property (issue 8821). The missing composition
associations are added.


Issue 8821: The property 'unspecified' can be removed from the metamodel (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
Because UnspecifiedValueExp is a special kind of OclExpression, it is not necessary to define an explicit unspecified property. One can check the type of the OclExpression to see whether we are in the unspecified situation. This also make useless the need to define a specific getType() helper operation for OclMessageArg since the type can direcly be obtained.


Resolution:
Revised Text: See issue 8820 for resolution.
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Issue 8822: The metaclass 'OclMessageArg' can be removed from the metamodel (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
A OclMessageExp can directly represent the arguments without the need of an intermediate class, just as OperationCallExp refer to its arguments

Resolution:
Revised Text: See issue 7465 for disposition
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Issue 8823: Instanciation of collection types (ocl2-ftf)

Click
here for this issue's archive.
Source: France Telecom R&D (Mr. Mariano Belaunde, mariano.belaunde(at)orange.com)
Nature: Uncategorized Issue
Severity:
Summary:
In 8.2 the sentence "Users will never instanciate these types explicitly" is not entirely true. When a OCL writer defines a helper operation that returns a set, he explicitly declares the Set to be returned. Also, according to the OCL metamodel, an expression always has a type (OclExpression::type has multiplicity equal to 1). So when using the metamodel to exchange OCL specifications (XMI exchange) this implies that all used types, including expressions yielding to collection types have to be instanciated for the XMI to be well-formed.


Resolution:
Revised Text: 1) In section 8.2 remove the sentence: "Users will never instanciate these types explicitly"
Actions taken:
May 25, 2005: received issue
November 1, 2005: closed issue

Discussion:
Remove the sentence.