eclipse-qvtd / org.eclipse.qvtd

Eclipse Public License 2.0
0 stars 0 forks source link

[qvtp2qvts] Operation dependency analysis does not follow casts #231

Open eclipse-qvtd-bot opened 16 hours ago

eclipse-qvtd-bot commented 16 hours ago

| --- | --- | | Bugzilla Link | 506752 | | Status | REOPENED | | Importance | P3 normal | | Reported | Oct 30, 2016 14:34 EDT | | Modified | Nov 16, 2016 10:17 EDT | | Depends on | 507620 | | Reporter | Ed Willink |

Description

Bug 506751 provides a repro in which

context cs::exprList -- a helper\ def : createActualParams() : OrderedSet(as::ActualParameterExpression) =\ self.exps->collect(x | \ as::ActualParameterExpression { value = x.ast.oclAsType(as::Expression) } )->asOrderedSet()

correctly analyzes the expressions but the eventual dependencies are on x.ast, rather than x.ast.oclAsType(as::Expression)

i.e. needlessly pessimistic.

eclipse-qvtd-bot commented 16 hours ago

By Ed Willink on Oct 31, 2016 15:55

DependencyAnalyzer has no code for special functions. Consequently oclAsType() is analyzed as an ordinary function.

eclipse-qvtd-bot commented 16 hours ago

By Ed Willink on Nov 04, 2016 15:44

oclAsType() special cased.

Full fix requires OCL Commit "[unrelated] Return referredType at TypeExp.typeValue" available on OCL master.

Pushed to master fo M4.

eclipse-qvtd-bot commented 16 hours ago

By Ed Willink on Nov 10, 2016 15:40

For the Bug 506751 repro, the fix doesn't just retype the ast node, it removes its predecessors too.

eclipse-qvtd-bot commented 16 hours ago

By Ed Willink on Nov 16, 2016 10:17

Took another short at this, and again it didn't work.

Bug 507620 offers a more promising way forward that eliminates duplication.