[m-dev.] for review: new version of accumulator introduction algorithm
Peter Ross
petdr at cs.mu.OZ.AU
Tue Jan 18 14:32:20 AEDT 2000
On 15-Jan-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 15-Jan-2000, Peter Ross <petdr at cs.mu.OZ.AU> wrote:
> > On 15-Jan-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > > On 13-Jan-2000, Peter Ross <petdr at cs.mu.OZ.AU> wrote:
> > > > library/list.m:
> > > > Add the law
> > > > :- promise all [L,H,T] ( L = [H|T] <=> list__append([H], T, L)).
> > >
> > > Hmm, shouldn't that be
> > >
> > > :- promise all [L,H,T] ( list__append([H], T, L) <=> L = [H|T] ).
> > >
> > > ? I know that logically these two are the same, but as Lee (?)
> > > pointed out, for rewrite rules the compiler also needs some hint
> > > about which side is more efficient, and traditionally rewrite
> > > rules replace the LHS with the RHS rather than vice versa.
> > >
> > Good idea.
> >
> > However, I thought that we were going to use a different syntax for
> > rewrite rules, something like
> >
> > :- promise list__append([H], T, L) == L = [H|T].
>
> Yes. But since we don't support that yet, in the mean time
> it would IMHO still be a good idea to swap the order
> (and perhaps to add a comment).
>
Done.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list