eclipse-qvtd / org.eclipse.qvtd

Eclipse Public License 2.0
0 stars 0 forks source link

[schedule] support speculative creation #192

Open eclipse-qvtd-bot opened 17 hours ago

eclipse-qvtd-bot commented 17 hours ago

| --- | --- | | Bugzilla Link | 498295 | | Status | NEW | | Importance | P3 normal | | Reported | Jul 21, 2016 12:01 EDT | | Modified | Nov 05, 2018 10:30 EDT | | Depends on | 498400, 532429, 540797 | | Blocks | 515236 | | Reporter | Ed Willink |

Description

The Forward2Reverse example has two mutually dependent mappings requiring potentially intractable static analysis to break the chicken-egg loop.

It would appear to be necessary to perform speculative creation of trace/output objects to allow creation-dependent guards to evaluate. If these guards fail the speculative creations must be discarded before incorporation in any result / cache.

cf ATL does speculative creation but doesn't classify it as such and so fails to discard its consequences.

eclipse-qvtd-bot commented 17 hours ago

By Ed Willink on Aug 05, 2016 09:49

(In reply to Ed Willink from comment #0)

If these guards fail the speculative creations must be discarded before incorporation in any result / cache.

Partitioning into

The combination of navigation-to-null predicates, failed speculation provides many of the functionalities of GT's Negative Application Conditions.

For very awkward cases, it may be necessary to have a global arbitration between speculation and speculated to determine whether global speculation has a globally consistent solution. Perhaps the realized outputs are distinguished as corrolaries since a successfully speculated trace objects guarantees the creation of the realized outputs. A predicate on a corrolary can be pruned from the residual global predicate satisfaction analysis.

eclipse-qvtd-bot commented 17 hours ago

By Ed Willink on Aug 06, 2016 11:35

Introduction of speculation and speculated phases has been done as part of Bug 498400. This bug addresses the residual awkward case of speculations whose predicates involve predicated rather than loaded inputs. Fortunately this doesn't seem to be a common requirement.

eclipse-qvtd-bot commented 17 hours ago

By Ed Willink on Aug 07, 2016 05:12

(In reply to Ed Willink from comment #2)

residual awkward case of speculations whose predicates involve predicated

The speculation partition is a valid partial execution creating the middle trace object wrt the loaded/constant inputs. Partial since all predicated predicates are ignored (and no middle-creations or assignments are performed.)

Any subsequent use of the middle trace object speculation that continues to ignore the predicated predicates is unsound. (Current code exploits the rarity of this case.) Therefore every use of a speculated middle should also express the missing predicated predicate at the point of use. This leaves everything consistently defined by dependencies so that the scheduler should find a static schedule where possible or dynamic otherwise.


Alternatively if we try to avoid the repetition of expressing the predicated predicate in every use, we could could have a Boolean state for a speculated middle. false after the loaded-only speculation, true after a further predicated-too speculation. This avoidance costs an additional speculation mapping, requires evaluate-time support for this Boolean state and may have deadlocks if the inter-predicated predicate dependencies are unhelpful requiring a true execution.


expressing the predicated predicate in every use seems much simpler and their are not that many users of each middle. Rather than avoiding the overhead it may be better to look for a more general global dependency pruning/sharing to optimize this and other bloats.

But, is every overall solution guaranteed not to deadlock while speculation discovers it?

eclipse-qvtd-bot commented 17 hours ago

By Ed Willink on Mar 14, 2018 04:58

(In reply to Ed Willink from comment #0)

potentially intractable static analysis to break the chicken-egg loop.

Bug 532429 outlines a compile-time speculation analysis that may often render run-time support redundant.

eclipse-qvtd-bot commented 17 hours ago

By Ed Willink on Nov 05, 2018 10:30

Bug 540797 identifies deficiencies in the globalSuccess trace property determination.