[m-dev.] for review: new version of accumulator introduction algorithm

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Jan 15 10:54:24 AEDT 2000


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.


-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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