eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[cg] CSE re-use #1839

Open eclipse-ocl-bot opened 2 weeks ago

eclipse-ocl-bot commented 2 weeks ago

| --- | --- | | Bugzilla Link | 516751 | | Status | REOPENED | | Importance | P3 normal | | Reported | May 16, 2017 14:15 EDT | | Modified | May 31, 2022 11:34 EDT | | See also | 575412 | | Reporter | Ed Willink |

Description

The CommonSubexpressionEliminator is difficult to understand and requires custom Place classes for each distinct interesting CG node. It cannot be re-used for AS as perhaps required for QVTr override altewrntor optimization.

Suggest restructuring as queries on a small number of predicate queries to be implemented by interesting CG/AS/... nodes. Whether the implementation is by mix-in/helper/visitor should be a free implementation choice.

eclipse-ocl-bot commented 2 weeks ago

By Ed Willink on Aug 15, 2021 03:13

The Bug 520440 symbolic evaluation introduces a new CommonSubexpressionAnalysis that uses the unmodified OCL AST and supports mayBeNull/mayBeInvalid queries.

This provides a much more promising way forward.

This bug has been marked as a duplicate of bug 575412

eclipse-ocl-bot commented 2 weeks ago

By Ed Willink on May 31, 2022 11:34

(In reply to Ed Willink from comment #1)

This provides a much more promising way forward.

This bug has been marked as a duplicate of bug 575412

Bug 575412 is re-use of the Symbolic Analysis.

Re-use of the CSE can be independent.

However the Symbolic Analysis CSE uses the AS, where CG requires a CSE on the CG.\ (If the CG uses an AS CSE, the low level synthesis og CG will not be CSEed.)

The new CSE is about 1500 lines. Cloning from AS to CG seems better than templating to polymorphize an AS/CG CSE.