
SICStus Prolog + Java/Prolog + Jasper
Dear all,
I am working with SICStus Prolog.
SICStus Prolog offers the possibility to call Prolog from Java and visa
versa using the so-call Jasper library.
The Jasper library is based on the native interface. A saved program file is
accessed for the call of Prolog from Java.
My question are following:
+ I cannot assert a clause, when I call Prolog from Java. I use an
"open_query"-statement, which I close with "query_cut" or
"query_close", alteratively
for example "assert(a)" is always accepted, but "listing(a)"
cannot find a fact "a"
However, I can use the assert inside of a clause or use the
query "assert(a), listing(a)" without any errors.
What can I do in order to be able to assert and retract clauses and facts?
How can I save (make persistent) my changes of the database?
+ I want to use always the last version of my saved prolog file.
How can I make shure that I open (restore) always the last version?
Is there a chance to check this in Java?
+ I am using services written in Java. Serveral running services are sharing
the same (Java Virtual Machine) JVM.
A service calls Prolog.
Does anybody knows a problem if I call Java again from Prolog, which has
to use the same JVM, then?
Many thanks for your help!
Reinhold Kloos