[m-dev.] another trailing problem -- nondet if-then-elses

Fergus Henderson fjh at cs.mu.oz.au
Tue Aug 26 04:22:52 AEST 1997


Fergus Henderson, you wrote:
> One possibility would be to change code generation for if-then-elses
> so that rather than pruning away the choicepoint by restoring the
> previous failure continuation, we could instead change the failure
> continuation to point to code that just does an MR_discard_ticket() and
> then branches to the previous failure continuation.  But doing that
> might be a bit complicated... I haven't had a detailed look at it yet.

Turned out to be easy, so that's what I did.

I realized we have another problem, though.
Committing is potentially unsound, if there are any delayed non-linear
equations still outstanding.  I changed the code to issue a warning
in that case.  It would be better to make it an error, except that some of
the time the warnings will be spurious: doing a commit simply because
a multi/nondet goal occurs inside a cc_multi/cc_nondet context is fine. 
It is only the cases of doing a commit in an if-then-else or negation
or because a goal has no output variables that are dangerous.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list