Issue 14584: OCL 2.1 9.3 Inferred TupleLiteralExp part type (ocl2-rtf) Source: Model Driven Solutions (Dr. Edward Willink, ed(at)willink.me.uk) Nature: Uncategorized Issue Severity: Summary: Disambiguating rule 1 for TupleLiteralExp requires each VariableDeclaration to have a type and initExpression. However some examples in 7.5.15 omit the type, which is easily inferred from the initializer. However neither 8.3.7 nor 9.3 specifies this inference. Presumably the type is optional and to be inferred when omitted. Resolution: The synthesized attributes for VariableDeclarationCS should infer when possible. Revised Text: In Section 9.3 VariableDeclarationCS Synthesized attributes replace (accommodating Issue 14197's resolution of OclUndefined as invalid). VariableDeclarationCS.ast.type = if typeCS->notEmpty() then typeCS.ast else OclUndefined endif by VariableDeclarationCS.ast.type = if typeCS->notEmpty() then typeCS.ast else if VariableDeclarationCS.ast.initExpression.empty() then VariableDeclarationCS.ast.initExpression.type else null endif endif Actions taken: October 27, 2009: received issue April 25, 2011: closed issue Discussion: End of Annotations:===== ronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAFPJ5krUnw4R/2dsb2JhbADaJoQ/BA Date: Tue, 27 Oct 2009 17:24:33 +0000 From: Ed Willink User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) To: issues@omg.org Subject: OCL 2.1 9.3 Inferred TupleLiteralExp part type X-Plusnet-Relay: 59da1b693e69f1fc0b637a98bc2e7c40 Hi Disambiguating rule 1 for TupleLiteralExp requires each VariableDeclaration to have a type and initExpression. However some examples in 7.5.15 omit the type, which is easily inferred from the initializer. However neither 8.3.7 nor 9.3 specifies this inference. Presumably the type is optional and to be inferred when omitted. Regards X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAHyC50pUXebi/2dsb2JhbADZWoQ/BA Date: Wed, 28 Oct 2009 06:34:42 +0000 From: Ed Willink User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) To: "'ocl2-rtf@omg.org'" Subject: Re: Issue 14584 Inferred TupleLiteralExp part type X-Plusnet-Relay: fc8b0455e67d81196048210d93425d7b Hi Mariano Attached resolution specifies that VariableDeclarationCS should infer a type from an initializer. Regards Ed Willink Ed Willink