[m-rev.] diff: allow memo tables to be reset

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Mar 7 17:39:02 AEDT 2005


On 07-Mar-2005, Ian MacLarty <maclarty at cs.mu.OZ.AU> wrote:
> :- pragma memo_transient(p/n, [q1/m1, q2/m2, ..., qk/mk]).
> 
> Which says that the memo tables for q1, q2 etc. should be reset when a 
> top level call to p/n finishes.  The programmer might only want certain 
> memo tables to be reset (e.g. for predicates that are unlikely to be 
> called with the same input for a different call to p).  The compiler 
> might check that q1, q2 etc can be reached from p and give an error if 
> they can't.

But the compiler should also check that q1, q2 etc *can't* be reached
*without* going through p, and that is impossible if those predicates
are in another module, which they can be.

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list