Hi Dan,
I found that I could run the program successfully when I ran the prolog server independently (not exec'ed from Java).
I tested your code using an independent Prolog server. You're quite right about the actual problem, but I think the Prolog server messages should be redirected to null or a log file, rather than reading them from the Java side. We will change this in the Prolog server and send you the changes.
By the way, I was surprised to find that you can't reuse structure safely because the constructors copy their args. For example, I
Yes, the structure argument array is copied by the constructor. The only elements that can be modified once the object is created are PLVariable bindings, to provide and return Prolog side variable bindings. You can do the following:
PLVariable plX = new PLVariable(); fooArgs[0] = plX; ... plX.bind(new PLInteger(444)); ...
fooArgs[0] = new PLVariable(777);
Anyway, I suggest you use the PLVariable constructor with no arguments; the argument refers to the variable number in the internal representation of the Prolog variable, and it should only be used for very special purposes. The constructor with no arguments generates this internal number automatically.
Thanks for the Ciao system! Now that I've gotten things working,
Thank you for using it.
I was also wondering: is the mailing list is archived anywhere?
You can find the ciao-users mailing list archive here:
http://www.clip.dia.fi.upm.es/Mail/ciao-users/
Regards,
Jesus & the Ciao Prolog Team.