0

我想通过 JPL 查询以在 java 中使用 Prolog,我想在 java 中调用这样的谓词:

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

我在java中进行查询以调用“predicate_test”,如下所示:

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

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

我从 catch 块中收到此消息

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

我的方法有什么问题?

提前致谢

4

0 回答 0