[m-dev.] tabling, trailing and impure references

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Aug 4 14:28:16 AEST 2003


On 04-Aug-2003, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> In the long term, we might do something a bit more clever with regard
> to garbage collection of memo tables.  However, if we do ever do
> that, I think we should provide something which keeps the old behaviour,
> at least for the zero-arity case.  So I think it would be reasonable
> for you to rely on it.  I think at worst you might at some point in
> the future have to change the pragma name from "pragma memo" to
> something else.

I agree.

> > Question 2:	The reference manual says: "if you enable the use of
> > 		trailing ... then any use of tabling will result in a
> > 		"Sorry, not implemented" error at runtime."
> > 		
> > 		I get no such error from the above example in grade
> > 		asm_fast.gc.tr.  Does this mean the reference manual is
> > 		out of date, or have I just been lucky?
> 
> I think that only applies to minimal model (and/or model_non) tabling.

That is correct.

> I think the reference manual may be incorrect and/or out of date.

It is ambiguous. The ambiguity is supposed to be resolved by the previous
several paragraphs all being about minimal model tabling. Since that seems
not to be sufficient, I will reword that paragraph.

> The "sorry, not implemented" error which is referred to in the
> documentation was in library/private_builtin.m, in the code
> for table_resume/1:
> 
>  | #ifdef MR_USE_TRAIL
>  |        /*
>  |        ** We ought to save the trail state here --
>  |        ** this is not yet implemented.
>  |        */
>  |        fatal_error(""Sorry, not implemented: ""
>  |                ""can't have both tabling and trailing"");
>  | #endif
> 
> But this code was deleted in revision 1.19:

It wasn't really deleted; it was moved to runtime/mercury_grade.h, to ensure
that the incompatibility is detected at compile time, not runtime.

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