Issue 7466: rewrite well-formedness (ocl2-rtf) Source: Klasse Objecten (Dr. Jos Warmer, j.warmer(at)klasse.nl) Nature: Uncategorized Issue Severity: Summary: We would like to be able to rewrite well-formedness rules like: context IfExp inv: self.condition.type.oclIsKindOf(Primitive) and self.condition.type.name = ’Boolean’ as context IfExp inv: self.condition.type.oclIsKindOf(Primitive) and This is more clear that the first expression where the matching is done by name. Because the metamodel resides on a level higher than the standard library, we need a way to get access to the standard library elements. One solution is to define a package ’StandardLibrary’ that contains a Classifier called ’StdLib’, that holds the following attributes: • + Collection: CollectionType; • + Set: SetType; • + OrderedSet: OrderedSetType; • + Sequence: SequenceType; • + Bag: BagType; • + String: Primitive; • + OclMessage: OclMessageType; • + OclVoid : VoidType; Other solutions might be possible, but the above has been proven to work in the Octopus tool. Resolution: Revised Text: Actions taken: June 10, 2004: received issue Discussion: Discussion: This issue will be deferred. There is a question of representing formally the standard library as an ordinary UML package, which is not going to be solved for OCL 2.1 release. Disposition: Deferred End of Annotations:===== s is issue # 7466 rewrite well-formedness We would like to be able to rewrite well-formedness rules like: context IfExp inv: self.condition.type.oclIsKindOf(Primitive) and self.condition.type.name = .Boolean. as context IfExp inv: self.condition.type.oclIsKindOf(Primitive) and This is more clear that the first expression where the matching is done by name. Because the metamodel resides on a level higher than the standard library, we need a way to get access to the standard library elements. One solution is to define a package .StandardLibrary. that contains a Classifier called .StdLib., that holds the following attributes: . + Collection: CollectionType; . + Set: SetType; . + OrderedSet: OrderedSetType; . + Sequence: SequenceType; . + Bag: BagType; . + String: Primitive; . + OclMessage: OclMessageType; . + OclVoid : VoidType; Other solutions might be possible, but the above has been proven to work in the Octopus tool.