eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[cs2as] collection bounds ignored for OCLstdlib #1815

Open eclipse-ocl-bot opened 1 month ago

eclipse-ocl-bot commented 1 month ago

| --- | --- | | Bugzilla Link | 512758 | | Status | NEW | | Importance | P3 normal | | Reported | Feb 27, 2017 06:28 EDT | | Modified | Jun 30, 2017 06:54 EDT | | See also | 511782, 496148, 518709 | | Reporter | Ed Willink |

Description

oclAsSet() has interesting collection bounds but they are not parsed correctly.

The problem is that CS2ASConversion.installPivotTypeWithMultiplicity fails to climb the TemplateParameterSubstitutionCS ancestry to discover the multiplicity on the binding rather than on the bound type.

This seems yet further evidence that the multiplicity term is poorly positioned in the grammar. See also Bug 511782, Bug 496148.

Note also that this area was revisited on the still pending branch investigating pattern support.

Rework the multiplicity grammar.

eclipse-ocl-bot commented 1 month ago

By Ed Willink on Feb 28, 2017 07:23

Workaround:

Additional TemplateParameterSubstitutionHelper classes can fix up collection operation return types, and the fixup can be offered via PivotHelper.setType.