Closed eclipse-ocl-bot closed 1 month ago
By Ed Willink on Jun 27, 2009 01:53
"+" is needed by QVTr and QVTc too.
MDT-OCL must support OCL 2.0 and 2.1 as closely as is practical.
Introducing extensions is very dangerous. Support for language oversights such as an include statement may be appropriate, support for syntactic sugar is not.\ That said, MDT-OCL can provide support that enables extended languages to configure that support and exploit shared fuinctionality.
In the case of "+", there is no syntactic extension. It is just necessary to recognise a sysnonym.
org.eclipse.qvt.declarative.parser.qvt.environment.QVTTopLevelEnvironment overloads lookupOperation to invoke a resolveSynonym method.
We could perhaps introduce a configurable list of synonyms in an OCL Environment. This would follow on from perhaps promoting the CSTFile/CSTRoot/CSTChildEnvironment concepts from QVT Declarative to OCL. [OCL currently uses dynamic rather than nested environments for Let and Loop.]
By Adolfo Sanchez-Barbudo Herrera on Jun 27, 2009 13:48
Hi guys,
By Adolfo Sanchez-Barbudo Herrera on Jun 27, 2009 14:27
BTW,
As far as I know, the version attribute is to flag the version in which the bug is detected, isn' it?.
I have changed the version to 1.3.0 and the target version 2.0.0 so far.
Cheers,\ Adolfo.
By Alexander Igdalov on Jul 08, 2009 10:59
(In reply to comment #2)
Hi guys,
- operator will be included in the OCL Standard Library in the next release. So this will be supported in MDT-OCL2.
Fortunately, this proved to be true:-) See section 11.5.3. Since then the severity is increased from "enhancement" to "normal".
By Laurent Goubet on Jul 08, 2009 11:12
And that's a truly nice addition to OCL :). Thanks for pointing this out.
By Ed Willink on Sep 17, 2010 07:39
Bug 325327 has been marked as a duplicate of this bug.
By Ed Willink on Feb 01, 2011 01:35
The + operator is defined as part of the pivot-based standard library model.
By Ed Willink on May 27, 2011 06:41
Resolved for Indigo is 3.1.0 not 3.2.0.
By Ed Willink on May 29, 2012 13:23
Closing all bugs resolved in Indigo.
| --- | --- | | Bugzilla Link | 281710 | | Status | CLOSED FIXED | | Importance | P3 normal | | Reported | Jun 26, 2009 16:42 EDT | | Modified | May 29, 2012 13:23 EDT | | Version | 1.3.0 | | Blocks | 156363 | | Reporter | Laurent Goubet |
Description
The "+" operator is available in most languages for String concatenation, and is as readable as can be for newcomers and "old" developpers alike. I believe adding this shortcut for "String#concat(String) : String" would be a good addition to the essential OCL grammar. I believe M2M QVTO's extended OCL grammar sports this addition; could it be taken down to MDT OCL?
This should probably be raised as an issue against the OCL specification so that this operations enters the standard instead of remaining a non-standard addition.