[PPL-devel] x still a variable after a successful call to c2p_list(x)?
Roberto Bagnara
bagnara at cs.unipr.it
Sun Jul 28 19:32:18 CEST 2002
Dear all,
I am sure I am missing something but I don't know what.
After a quite long debugging session, I have the following
fragment in my C++ code:
prolog_term x = p2p_new();
if (is_var(x) == FALSE)
abort(); // This statement does not get executed.
if (c2p_list(x) == FALSE)
abort(); // This statement does not get executed.
// Hey, how can `x' still be a variable?
if (is_var(x) == TRUE)
abort(); // This statement IS executed.
`x' is initialized to a fresh variable (so that the first
call to abort() is not executed), then the call to c2p_list()
is successful (so that the second call to abort() is not executed),
but afterwards `x' is still bound to a variable (and the third
call to abort() is executed).
Any idea why that happens?
All the best
Roberto
P.S. I am using XSB 2.5
$ xsb
[xsb_configuration loaded]
[sysinitrc loaded]
[packaging loaded]
XSB Version 2.5 (Okocim) of March 11, 2002
[i686-pc-linux-gnu; mode: optimal; engine: slg-wam; gc: indirection; scheduling: local]
| ?-
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it
More information about the PPL-devel
mailing list