Issue 14577: OCL 2.1 11.7 Inflexible Collection operation signatures (ocl2-rtf) Source: Model Driven Solutions (Dr. Edward Willink, ed(at)willink.me.uk) Nature: Uncategorized Issue Severity: Summary: The Collection(T)::product(c2 : Collection(T2)) signature carefully uses T2 to distinguish self and argument element types. The same distinction is missing from Collection(T)::"="(c : Collection(T)) Collection(T)::"<>"(c : Collection(T)) Collection(T)::includesAll(c : Collection(T)) Collection(T)::excludesAll(c : Collection(T)) Set(T)::union(s : Set(T)) Set(T)::union(b : Bag(T)) etc etc The current definition makes at least one of Set{1.0}->excluding(1.0) = Set{1}->excluding(1) Set{1}->excluding(1) = Set{1.0}->excluding(1.0) invalid through lack of a suitable collection operation. For some operations, such as union, a T2 conforms to T well-formedness constraint is appropriate, but for others, such as removeAll, T2 and T can be independent. Resolution: Revised Text: Actions taken: October 26, 2009: received issue Discussion: End of Annotations:===== ronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAK8G5ErUnw4R/2dsb2JhbADUNYQ/BA Date: Sun, 25 Oct 2009 15:09:09 +0000 From: Ed Willink User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) To: issues@omg.org Subject: OCL 2.1 11.7 Inflexible Collection operation signatures X-Plusnet-Relay: 8f189e430388b7dcc0d4bf4fca0c0dce Hi The Collection(T)::product(c2 : Collection(T2)) signature carefully uses T2 to distinguish self and argument element types. The same distinction is missing from Collection(T)::"="(c : Collection(T)) Collection(T)::"<>"(c : Collection(T)) Collection(T)::includesAll(c : Collection(T)) Collection(T)::excludesAll(c : Collection(T)) Set(T)::union(s : Set(T)) Set(T)::union(b : Bag(T)) etc etc The current definition makes at least one of Set{1.0}->excluding(1.0) = Set{1}->excluding(1) Set{1}->excluding(1) = Set{1.0}->excluding(1.0) invalid through lack of a suitable collection operation. For some operations, such as union, a T2 conforms to T well-formedness constraint is appropriate, but for others, such as removeAll, T2 and T can be independent. Regards Ed Willink