I need to send in CLPFD Queries from JPL to SWI-Prolog and receive their executed output into a Java Program. PFA the Code I am using from Java Side using JPL.
Query q = new Query("use_module(library(clpfd)).");
Variable X = new Variable("X");
Variable Y = new Variable("Y");
Now I need to send the CLPFD Query to SWI-Prolog using JPL. The query is as follows.
Arithmetic_Expression#=X*Y+X+1,
[Y, X] ins 0..100500,
Arithmetic_Expression in 1..5\\/10\\/12.
I want to know how to send CLPFD to SWI-Prolog using JPL and get back the executed output. which is as follows:
Arithmetic_Expression in 1..5\/10\/12,
_G576+1#=Arithmetic_Expression,
_G576 in 0..4\/9\/11,
_G606+X#=_G576,
_G606 in 0..11,
X*Y#=_G606,
X in 0..11,
Y in 0..100500.
I want to know if this is doable in JPL and if yes, then can some one share their expertise regarding this?