[m-dev.] trace goal `state' parameters

Julien Fischer juliensf at csse.unimelb.edu.au
Sat Mar 17 07:16:57 AEDT 2007

On Fri, 16 Mar 2007, Peter Wang wrote:

> On 2007-03-16, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>> Currently trace goals support a "state" parameter that allows one to specify
>> the name of a mutable and the name of a state variable that is used to
>> thread the value of the mutable through the body of the trace goal.  This
>> arrangement is currently a bit delicate w.r.t intermodule optimization.  If
>> the clause containing the trace goal ends up in the .opt file there is no
>> guarantee that the predmode decls for the mutable access preds will also end
>> up there.
> Out of interest, why not?  Isn't it the same as if the user wrote the
> get_* and set_* calls manually?

Actually, looking at it a little more closely it should work**.  I was
under the (incorrect) impression that the part of the trace goal 
expansions that handles the state parameters occurs later than it 
actually does.  If the expanded version of trace goal occurs in the .opt
file then all should be well.

** procedures containing trace goals don't seem to currently end up
in .opt files at all, presumably because they show up as impure when
intermod.m is selecting clauses to opt export.

mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au

More information about the developers mailing list