CLPFD in SWI-Prolog interface with Java -
I am trying to use JPL to pass SWI-Prolog (CLPFD) from Java to a query. I get the following exception while running the program in java.
query = arithmetic_exension # = X * Y + X + 1, [Y, X] INS 0..100500, Arithmetic Actions 1..5 / 10/12. Exception in thread "main" JPL: PrologException: error (syntax_error (operator_expected), string ('Arithic_exation # = X * Y + X + 1, [Y, X] INS 0..100500, Arithmetic Actions 1..5 Jpl. Query.get1 (query.java:336) at jpl.Query.getSubstWithNameVars (query.java:390) on jpl.Util.textToTerm (Util.java:163)) Jpl.Query. (Query.java.188)
As you can see, my Java program is generating queries in the form of a range of 1..5 / 10/12, but SWI-Prolog is taking it 1..5 As sure as 10/12/12 Why is it happening? I think that this may be the cause of my error, can anyone help me with this error?
I am adding / because in my Java program the windows make queries Will be given \ '\ "and thus my query will be generated as 1..5
The status of the error is 21st character, thus
Arithmetic_Expression # = X * Y + X + 1, [Y, X] IN 0. 100500, Arithmetic_Expression 1..5 / 10/12 123456789012345678901 ^^ Obviously, you have not called use_module (library (CLPFD)) , However, after this, the next error Will be: Error: Domain Error: `clpfd_domain 'expected,` 1..5 / 10/12' found It is not clear if you What does / 10/20 mean by In any case, I suggest that you learn prologue and CLPFD before using it in Java.
Comments
Post a Comment