Issue 12454: The constraint [1] on the TupleLiteralPart metaclass is overconstrained (ocl2-rtf) Source: Zeligsoft, Inc. (Mr. Christian W. Damus, nobody) Nature: Revision Severity: Significant Summary: The constraint [1] on the TupleLiteralPart metaclass is overconstrained. It requires that the type of the value of a tuple literal part be identical to the corresponding attribute of the tuple type. However, the value type should only be required to conform to the attribute type because tuple literals may optionally specify the part types (in the same fashion as variable declarations). Thus, a more appropriate formulation of this constraint would be: context TupleLiteralPart inv: attribute.type.conformsTo(value.type ) Resolution: Revised Text: In Page 55, Section 8.3.7 Replace [1]The type of the attribute is the type of the value expression. context TupleLiteralPart inv: attribute.type = value.type by: [1]The type of the attribute conforms to the type of the value expression. context TupleLiteralPart inv: attribute.type.conformsTo(value.type) Actions taken: May 14, 2008: received issue October 16, 2009: closed issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 13 May 2008 19:47:06 -0400 To: Subject: Issue/Bug Report -------------------------------------------------------------------------------- Name: Christian W. Damus Company: Zeligsoft mailFrom: cdamus@zeligsoft.com Notification: Yes Specification: OCL Section: 8.3.7 FormalNumber: formal/06-05-01 Version: 2.0 RevisionDate: 01/05/2006 Page: 55 Nature: Revision Severity: Significant HTTP User Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_2; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.1 Safari/525.18 Description The constraint [1] on the TupleLiteralPart metaclass is overconstrained. It requires that the type of the value of a tuple literal part be identical to the corresponding attribute of the tuple type. However, the value type should only be required to conform to the attribute type because tuple literals may optionally specify the part types (in the same fashion as variable declarations). Thus, a more appropriate formulation of this constraint would be: context TupleLiteralPart inv: attribute.type.conformsTo(value.type )