[m-dev.] for review: a new way of handling failure
Zoltan Somogyi
zs at cs.mu.oz.au
Fri Oct 31 11:29:34 AEDT 1997
> > corrfr (it gives the frame corresponding to the label in the redoip slot).
>
> I think it would be better to call this `redofr'.
I agree.
> > One implication of the change is that when execution resumes after a redo(),
> > we can no longer assume that curfr = maxfr.
>
> Hmm... this is a worry. There may be many places where we make that
> assumption.
These places are all in the code that requires rewriting as part of this
change.
> > <ul>
> > <il> Best case.
> > Before the code generator enters a goal that is being committed across,
> > it saves the value of maxfr,
> > pushes a new entry on the resume point stack indicating
> > the resume point for getting control back if the goal has no solutions
> > and sets the redoip slot of the top frame (which is this frame)
> > to the stack continuation in that resume point.
>
> I think the remark in parentheses above is wrong. Why is it guaranteed
> that the top frame will be the same as the current frame?
Because a case is not best case unless curfr_is_maxfr=yes. This is also true
for middle case; only in worst case is it not guaranteed to be the case.
Zoltan.
More information about the developers
mailing list