[Top][All Lists]

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

Non-determinant foreign predicate

From: mcculloch
Subject: Non-determinant foreign predicate
Date: Sat, 5 Jan 2013 08:07:32 -0800 (PST)

I am writing an interface to mongoDB from GNU Prolog using mongo's C driver. 
I want a non-determinant predicate to access query data via a C routine that
takes care of its own pointer called a cursor.  The cursor structure is
defined outside of the foreign function, so I don't need to call
Pl_Get_Choice_Buffer or Pl_Get_Choice_Counter.  I will call
Pl_No_More_Choice, but only when the cursor has reached the end of its data.

Does anyone know how prolog knows that a foreign predicate is
non-determinate.  Is it the "choice_size" in the foreign command, or is it
something else?  I need my foreign predicate to be non-determinate even if
it doesn't need to use a buffer.


View this message in context:
Sent from the Gnu - Prolog - Users mailing list archive at

reply via email to

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