[m-rev.] for test and review by Peter: fix mantis 391

Peter Wang novalazy at gmail.com
Mon Aug 17 14:51:30 AEST 2015


On Sun, 16 Aug 2015 04:24:19 +1000 (AEST), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> On Sat, 15 Aug 2015 18:59:05 +1000 (AEST), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> > > As the goal in the .opt file has already been transformed perhaps the
> > > state parameters can just be omitted?
> > 
> > We could omit the state parameters, but that won't solve the problem.
> > Mutables are local to their defining module, and so are their get and
> > set predicates, so whether you put those get and set calls directly
> > into the .opt file, or let the module that reads the .opt file recreate
> > those calls when it processes the trace goal, the result will be
> > the same: an attempt to access an inaccessible predicate.
> > Unless of course we opt-export the mutables' access predicates.
> > We would need to teach the compiler to either do that, or to
> > veto the opt-export of the predicate body containing that trace goal.
> 
> Come to think of it, we may already have code to do the former.
> I haven't checked, but if we do, then the attached diff should at least
> partially fix the problem. (I don't know offhand whether the calls to the
> semipure get and impure set predicates would cause a purity error.)

I see you pushed it.  I've added a test case.

Peter



More information about the reviews mailing list