[m-rev.] diff: reset contains_trace_goal if necessary

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Nov 9 16:14:00 AEDT 2006


On Thu, 9 Nov 2006, Mark Brown wrote:

> On 09-Nov-2006, Peter Schachte <schachte at csse.unimelb.edu.au> wrote:
>> On Thu, Nov 09, 2006 at 02:37:44PM +1100, Mark Brown wrote:
>>> An alternative (and
>>> better) way of helping users debug this problem would be to give a warning
>>> whenever a promised pure goal is optimised away.
>>
>> What's dubious about optimising a promised pure goal away?
>
> Because the promise might be incorrect, and if it is the result of
> optimising it away can be quite confusing.  Note that if the programmer
> has gone to all the trouble of calling an impure predicate with its
> intended side-effects, and then promises that there are no side-effects,
> I think this is likely to be a bug.
>
>> Would you
>> also warn about optimising away a pure goal that does nothing but call
>> a promised pure predicate?
>
> I'd be inclined to give a warning for any goal being optimised away.
> We already warn for duplicate calls (although the warning is not on
> by default).

That's only because it would cause problems with array operations.
When arraysare really unique as opposed to be pretend unique we can
turn it on by default.

Julien.
--------------------------------------------------------------------------
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