
Paul Broome wrote:
As I'm sure you know, the is/2 predicate is nonlogical. This difference is also in previous versions of XSB. In this instance, there is a simple alternate:
[broome@localhost bin]$ ./xsb-bits64 [xsb_configuration loaded] [sysinitrc loaded]
XSB Version 3.1 (Incognito) of August 10, 2007 [x86_64-unknown-linux-gnu; mode: optimal; engine: slg-wam; gc: indirection; scheduling: local]
| ?- [user]. [Compiling user] side_step_term_as_arithmetic_argument_bug(Term,N) :- call(N is Term). end_of_file. [user compiled, cpu time used: 0.0090 seconds] [user loaded]
| ?- side_step_term_as_arithmetic_argument_bug(1+1+1,N).
N = 3;
no | ?- End XSB (cputime 0.02 secs, elapsetime 74.23 secs)
I hope this helps.
Dear Paul,
thanks for the workaround. However, I don't understand how the fact that the is/2 predicate is nonlogical matters. Do you agree with me that the behavior I indicated witnesses a (big) XSB bug? All the best,
Roberto