[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pl_Query_End(PL_RECOVER) but unrecoverable query

From: Bowie Owens
Subject: Pl_Query_End(PL_RECOVER) but unrecoverable query
Date: Thu, 23 Oct 2003 14:47:47 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007

Hi everyone,

I am trying to use SWIG 1.3 to access the GNU Prolog 1.2.17 C API in
Java 1.4.2 on RedHat Linux 8.0. I have the following code:

               int x = gprolog.Mk_Variable();
               int c = gprolog.Find_Atom("write");
               int[] arg = { x };
               int res = gprolog.Pl_Query_Call(c, 1, arg);
               while (res == 1) {
                       System.out.println("found solution");
                       res = gprolog.Pl_Query_Next_Solution();
               if (res == 2) {
               } else {

When I execute the code I get output indicating that a single solution
has been found but when the Pl_Query_End call is executed I get "Fatal
Error: Pl_Query_End(PL_RECOVER) but unrecoverable query". Any thoughts
on what is going wrong would be most appreciated.

I have tried this with GNU Prolog 1.2.16 and still get the same result.
I have essentially the same code working under Python. However, I may
have messed up the typemaps for Java <-> C.

Bowie Owens

CSIRO Mathematical & Information Sciences
phone  : +61 3 9545 8055
fax    : +61 3 9545 8080
mobile : 0425 729 875
email  : address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]