For Programmers: Free Programming Magazines  


Home > Archive > Prolog > July 2004 > Interprolog - receiving multiple results from XSB









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Interprolog - receiving multiple results from XSB
Luis

2004-07-15, 8:59 pm

Hi all.

I've been trying to do some programming with Interprolog but I find
the documentation somewhat brief in some aspects; and this is one of
them.

If I got it well, PrologEngine.deterministicGoal() only returns one
solution. So in my case, with the following knowledge base


band(bush).
band('system of a down').

sings('gavin rossdale').
sings('serj tankian').

(...)


and the Java instruction


Object[] guren = engine.deterministicGoal("sings(X)","[string(X)]");


guren[0] will have "gavin rossdale".

So far so good.
Now my question is how do I get the other results?

From the Interprolog API documentation I got the feeling I should use
PrologEngine.handleCallback() but this function's comments don't say
too much... "Handling of javaMessages and deterministicGoals. This is
where most things happen."

I also saw several references to JavaMessage and in this article
(http://www.cs.ucy.ac.cy/compulog/de...interprolog.htm)
there's the suggestion of using ipObjectSpec. However, not only the
example is somewhat old, as it doesn't work...


Any ideas or anyone has some other (better :)) reference to
Interprolog documentation?

Tnx,
Luis
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com