Bart Demoen wrote:
should be easy to fix: seems like is_var does not deref
I have checked: none of the is_*() functions seems to dereference. However, other interface functions do dereference. Notice also that, while cinterf.h contains the declaration of p2p_deref() along with the rather obscure comment ** p2p_deref: prolog_term -> prolog_term !! uncommon p2p_deref() is never mentioned in the XSB manuals. So the questions are: how is one supposed to use the foreign language interface? Calling p2p_deref() before any invocation of is_*()? Are there other interface functions that require the client code to call p2p_deref() for proper operation? All the best Roberto -- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it