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

Zoltan Somogyi zoltan.somogyi at runbox.com
Sun Aug 16 04:24:19 AEST 2015


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

Zoltan.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.expanded
Type: application/octet-stream
Size: 761 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20150816/e4c5e27c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.expanded
Type: application/octet-stream
Size: 2825 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20150816/e4c5e27c/attachment-0001.obj>


More information about the reviews mailing list