Jump to content

Prolog: removing a module

- - - - -

  • Please log in to reply
No replies to this topic

#1
ageof

ageof

    Newbie

  • Members
  • Pip
  • 6 posts
Hello.
I have a Prolog program with modules. For instance, when consulting code, I do this:
m1:consult('prog.pl').
m2:consult('prog.pl').
(Yes, in this example I consult twice the same program... it's only an example).

If predicate "p/1" is defined in "prog.pl", I could query this:
m1: p(X).
As well as:
m2: p(X).
OK?

The problem comes when I try to remove one of my modules (m1, for instance). How can I do that? I tried "m1:clean", "m1:clear", etc... but I don't know even if it is possible.
Any idea?

I need the program to be entirely written in standard-prolog, so "abolish/1" from SICStus is not allowed. I want to run the program in SWI-prolog.

Thank you.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users