JPL - Java waiting for a certain solution from a prolog query

Im struggling to get this done. I have an User Interface in Java that controls a system using JPL, prolog.

Firstly i run a simple query assert(goal( work_1 )). When the process is done it just asserts done( work_1 ). To process the next goal goal( do(work_2 ) I must wait for the fact done( work_1 ).

`for (String s : t) {

runQuery("assert(goal(" + s + "))"); //start process


//Here the User Interface should block until done(A) and A == s


/*while (!active) {

Map[] Q = Query.allSolutions("done(Goal)");

for (Map sol : Q) {


Read More »

By: StackOverFlow - Friday, 9 November

Related Posts