0

I want to make a query to use Prolog in java through JPL, I want to call a predicate like this in java:

predicate_test([X,Y,Z]):-
     a_predicate(X),
     another_predicate(Y).

I make the query in java to invoque "predicate_test" like this:

   Query q4=null;
    try{
        q4 = new Query("predicate_test(Percept).");
        System.out.println(q4.query());
    }
    catch(PrologException pl){

        System.out.println(pl.getMessage());
    }

I get this message from the catch block

PrologException: error(existence_error(predicate_test, /(schedule, 1)), context(:(system, /('$c_call_prolog', 0)), _37))

Whats wrong with my approach?

Thanks in advance

Naty Bizz
  • 2,262
  • 6
  • 33
  • 52

0 Answers0