Hi yuce,
The examples you have provided are for 'facts' not for 'rules'.
Actually, my problem is to use two prolog data bases seperately. If I
consult them, swi mixes both the files.
If I have to use the technique as suggested in
http://code.google.com/p/pyswip/wiki/HowToSimulateMultipleKnowledgebases,
it does not accept 'rules'.
In prolog consulting, I tried to kill the prolog session by issuing
the query 'halt'. But after that I could not start a new session using
Prolog().
For example:
----------------
prolog = Prolog()
rr = 'halt'
res = list(prolog.query(rr))
prolog2 = Prolog() # Now won't start a new session
Could you suggest any work around or trick to overcome these problems?
BTW, in the example at
http://code.google.com/p/pyswip/wiki/HowToSimulateMultipleKnowledgebases
I get error when I execute it (in 64-bit linux)
To make it run, I have to change the following line (and other similar
lines)
call(assertz(parent("john", "bob")), test1)
to
call(assertz(parent("john", "bob")), module=test1)
Could you please check and correct the example?
Cheers,
Sandeep