[m-rev.] diff: reset contains_trace_goal if necessary
Ian MacLarty
maclarty at csse.unimelb.edu.au
Thu Nov 9 15:59:50 AEDT 2006
On Thu, Nov 09, 2006 at 03:02:07PM +1100, Mark Brown wrote:
> On 06-Nov-2006, Zoltan Somogyi <zs at csse.unimelb.edu.au> wrote:
> > @@ -2657,6 +2670,84 @@
> >
> > %-----------------------------------------------------------------------------%
> >
> > +:- pred goal_contains_trace(hlds_goal::in, hlds_goal::out,
> > + contains_trace_goal::out) is det.
> > +
> > +goal_contains_trace(GoalExpr0 - GoalInfo0, GoalExpr - GoalInfo,
> > + ContainsTrace) :-
> > + (
>
> ...
>
> > + ;
> > + GoalExpr0 = scope(Reason, SubGoal0),
> > + goal_contains_trace(SubGoal0, SubGoal, ContainsTrace),
> > + GoalExpr = scope(Reason, SubGoal)
>
> It appears that this goal feature propagates outside promise_pure scopes.
> I realise this behaviour follows what is in the reference manual, but is
> this really what we want?
>
> I think that a goal which is explicitly promised pure should be able to
> be optimised away even if it contains trace goals, in the same way that
> a pure call can be optimised away even if there are trace goals in its
> definition.
>
> Any comments?
>
I agree, but I don't see what the difference between this and what I said
earlier is.
Ian.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list