Open eclipse-ocl-bot opened 1 month ago
By Adolfo Sanchez-Barbudo Herrera on Jan 25, 2016 12:44
Branch OCL asanchez/486499
Repro:
[1] org.eclipse.ocl.examples.build\src\org\eclipse\ocl\examples\build\GenerateAutoASModels.mwe2\ [2] org.eclipse.ocl.pivot\emf-gen\org\eclipse\ocl\pivot\util\PivotUnqualifiedLookupVisitor.java
By Ed Willink on Jan 25, 2016 17:00
I think that this is the problem you observed before.
Where do additional operations get code generated? Problem is bypassed by inlining. However exported_env is overloaded and so not isFinal and so cannot be inlined. (Perhaps AS2CGVisitor.generateOperationCallExp should fail with an UnsupportedOperationException rather than falling through to an idiotic default.)
Instant Workaround: find a way to avoid the rather limited overload.
Long term workaround: Merge the secondary PivotCS2ASLookup.ocl into the primary Pivot.ocl generation.
Fox: Add a CG capability to simulate virtual dispatch independent of Java class modularization.
By Adolfo Sanchez-Barbudo Herrera on Jan 26, 2016 08:21
Hi Ed,
[I didn't understand the long term workaround].
For the time being, I've removed the contribution which produces the offending code. In terms of the CS2AS DSTL, it's the following language feature which would not be currently supported:
Model {\ named-element\ qualifying Package using ownedPackages;\ same-scope ownedPackages, ownedImports.importedNamespace\ -- NOT SUPPORTED YET , imported ownedImports.importedNamespace;\ exports Package using ownedPackages;\ }
The commented contribution:
imported ownedImports.importedNamespace
declares that the computed lookup environment for Model children should include whatever named element is exported by the ownedImport.importedNamespace.
By Ed Willink on Jan 26, 2016 09:35
(In reply to Adolfo Sanchez-Barbudo Herrera from comment #3)
[I didn't understand the long term workaround].
Merging all the Pivot*.ocl means that all code is generated directly into the Java class avoiding the need for any emulated virtual dispatch.
The commented contribution:
imported ownedImports.importedNamespace
The recent pushes to master fix a number of your issues. Can you please re-comment after rebasing on master.
| --- | --- | | Bugzilla Link | 486499 | | Status | NEW | | Importance | P3 normal | | Reported | Jan 25, 2016 12:29 EDT | | Modified | Jan 26, 2016 09:35 EDT | | Reporter | Adolfo Sanchez-Barbudo Herrera |
Description
Hi Ed,
I've come up with a new idea, to try the Auto-tooling with the OCL project. Since I currently can't replace the revamped PathNameCS (I can't currently get rid of the referredElement cross-reference proxy resolution), what I can do at least is modifying the PathElementCS to include a (derived) name attribute. With that I can have a -valid- new lookup.ocl file generated from the .cs2as description. From the new lookup.ocl file I can then exercise the new lookup infrastructure generation.
The exercise was quite well, excepting a compilation error I don't understand yet in the UnqualifiedLookupVisitor. Perhaps it's better if you look a it.
Repro coming next.