Hi.
I have written a small example to try CLP(R) and the Java/Prolog interface.
Here is the prolog code.
:- module(_, [exemple/1], []). :- use_package(clpr).
exemple(X):-X .=. 0, X .>. 0.
Here is the main part of the Java code.
PLVariable currentSolution = new PLVariable(); PLTerm t = new PLStructure(":", new PLTerm[] {new PLAtom("exemple"), new PLStructure ("exemple", new PLTerm[] {currentSolution} )}); PLGoal goal = new PLGoal(plServer,t); try{goal.useModule("exemple");}catch(Exception e){} try { goal.query(); goal.nextSolution(); ...
That doesn't work (I get an error message from windows, saying that ciaoengine.exe encountered a problem). It seems that happened for the execution of nextSolution.
I'm on WindowsXP and I'm using the 1.9p44 version of Ciao.
Hanh-Missi Tran ============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------