[m-rev.] diff: reset contains_trace_goal if necessary
Ian MacLarty
maclarty at csse.unimelb.edu.au
Fri Nov 10 14:23:05 AEDT 2006
On Fri, Nov 10, 2006 at 12:40:32PM +1100, Mark Brown wrote:
> On 10-Nov-2006, Ian MacLarty <maclarty at csse.unimelb.edu.au> wrote:
> > On Thu, Nov 09, 2006 at 05:22:15PM +1100, Ian MacLarty wrote:
> > > On Thu, Nov 09, 2006 at 04:34:16PM +1100, Mark Brown wrote:
> > > > For example, the goal
> > > >
> > > > ( Cond ->
> > > > trace ...
> > > > ;
> > > > trace ...
> > > > )
> > > >
> > > > should not be replaced with "true" unless both trace goals are compiled
> > > > away.
> > > >
> > > > In effect, trace goals introduce a kind of impurity which is eliminated
> > > > by promise_pure (as with other kinds of impurity), but which is also
> > > > implicitly eliminated at the boundary of each clause. I believe this
> > > > was Zoltan's intent.
> > > >
> > >
> > > That sounds reasonable to me.
> > >
> >
> > Actually no it doesn't. Trace goals are completely outside of the
> > declarative semantics of the program, so they have no effect on purity
> > whatsoever.
>
> There's nothing else to stop trace goals from always being optimised away.
>
We might (ab)use the impurity system in the internal implementation of
trace goals, but at the user level they should have no visible effect on
purity. The user certainly shouldn't have to promise that trace goals
are pure.
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