[m-rev.] for review: specify tabling extra arguments by address
Peter Wang
novalazy at gmail.com
Fri Nov 16 14:46:37 AEDT 2007
On 2007-11-16, Zoltan Somogyi <zs at csse.unimelb.edu.au> wrote:
> On 16-Nov-2007, Peter Wang <novalazy at gmail.com> wrote:
> > Add an optional argument to the `specified' attribute of `pragma memo' that
> > allows the user to choose to table arguments introduced by the polymorphism
> > transformation by address instead of by value. e.g.
...
> > + (
> > + MoreArgs = [],
> > + Attribute = attr_strictness(specified(MaybeArgMethods,
> > + hidden_arg_value)),
> > + MaybeTermAttribute = ok1(Term - Attribute)
> > + ;
> > + MoreArgs = [Arg2],
> > + (
> > + Arg2 = term.functor(
> > + term.atom("hidden_arg_addr"), [], _)
> > + ->
> > + Attribute = attr_strictness(specified(MaybeArgMethods,
> > + hidden_arg_addr)),
> > + MaybeTermAttribute = ok1(Term - Attribute)
> > + ;
> > + Msg = "expected hidden argument tabling method",
> > + MaybeTermAttribute = error1([Msg - Arg2])
> > + )
>
> And here an explicit hidden_arg_value should also be accepted.
I've followed your suggestions. The new test case should have been
called specified_hidden_arg.m, now fixed.
Peter
--------------------------------------------------------------------------
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