users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: saving, restoring prolog state in binary form


From: Mayuresh
Subject: Re: saving, restoring prolog state in binary form
Date: 10 Jun 2004 19:12:13 +0530

> Try this approach (using gplc to make an executable with all static
> predicates).

Thanks for a detailed reply.


I may need to close and restore the session a no of times. If the
predicates become static they will not be listed the second time around.
I can declare the predicates as dynamic and still use the compilation
approach suggested by you. Does it take away the benefits of compilation
approach?



Actually, this is how I am currently doing it:

I have a gplc compiled binary consisting of just the rules. (This could
be called a meta interpreter, I guess.) The facts are piped through
stdin to this binary at run time. These facts come from some external
source. The predicates used for these facts are known up front and are
declared dynamic in the compiled code.

Now when closing the session I dump the listing. Next time around I
first feed this listing through stdin before starting listening to the
facts from external source.

I find this much faster than consulting the file as you said. But no
compilation is involved either. Could you please comment on this
approach as well?

TIA.
Mayuresh.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]