Open axch opened 7 years ago
The branch https://github.com/probcomp/Venturecxx/tree/mite-request-constraint-kernels contains a very brittle and possibly incomplete resolution to the acute problem, in the form of an implementation of the "More custom kernels" proposal described in #653. For all the reasons listed there, this is not sustainable, but may suffice to push the Venture PPEV chapter out the door.
Consider a program like this, that performs inference on an argument to a compound procedure application:
This crashes on trying to extract a node that has already been extracted.
The sequence of events is this:
x
.x
is principal, it registers a proposal kernel and asks scaffold construction to propagate to its children.inc
and registers proposal kernels fory
and the addition.inc
that definesz
due to its request body changing and registers a propagate kernel [*].inc
because its argument changed and registers a proposal kernel (because that's what compound procedures do when asked how to treat updates to their parameters). The proposal kernel takes precedence over the propagation kernel.inc
and unevaluates its body.The pairs of subsequences 3-4 and 5, as well as 6 and 7, may be reordered, but the result is the same.
Fundamentally, this seems to be a consequence of #653, but perhaps there is a solution that will serve for the time being.
[*] Actually, it may register a proposal kernel here too, depending on details of how exactly the code is written, but the crash happens anyway. The collision is not between different kernels at
z
but between unevaluatingz
and trying to extract inside its body as well.