-----Original Message----- From: Jesus Correas Fernandez [mailto:jcorreas(a)clip.dia.fi.upm.es] Sent: Monday, December 25, 2000 2:46 PM To: larner(a)parc.xerox.com Cc: ciao-users(a)clip.dia.fi.upm.es Subject: Re: Doing assert from java?
Hi Dan,
Hello, Thanks for the response and Happy Holidays!
we've been trying your code here, but we couldn't find the problems you describe in your message.
I can successfully run the queens example (using both the Javasoft JDK and the Microsoft VM) in the library\ javall\Examples\java2pl directory, both as distributed and integrated into my program -- so I believe my general usage is alright.
Everything seems OK, but did you try using the JDK with your code?
OK, I'll try it under the JDK.
The VM is the only thing that can work differently in this case. We tested your code with the JDK 1.2.2 VM and it ran perfectly. We created the query and executed query(), nextSolution(), and terminate() on it; then we created another query to test the assertion, and everyting worked fine. Please, let us know if you have any problem trying this.
Since I sent that last email, I've had some partial success -- but it's really odd. If I run prolog_server inside emacs, and have it connect to the java code in the Microsoft VM (as opposed to letting java start the prolog executable), I can get much further -- that is, the assert seems to work while tracing through the prolog_server execution, but then when I do a query I only get back a single binding (after doing 2 asserts). My code is currently modified strangely (I was trying all sort of things to get a clue on what was happening), and it will take me a while to get back to a stable situation.
Something really strange is going on -- I'd suggest you don't loose any sleep over this for now -- let me hack at it for a while to see if I can get a better understanding of the real cause of the problem. When I do, I'll get back to you with the results of my investigation. [I know what it's like to not be able to reproduce someone's problem!]
Finally, thank you for your comments about closing the PLConnection object. We have found them very interesting, and we will work on that.
OK, (so much for 'portable' java ?-))))
-- Dan