[PPL-devel] [Xsb-development] Arithmetic evaluation bug in the CVS HEAD version of XSB

Terrance Swift tswift at cs.sunysb.edu
Sun Sep 23 20:02:06 CEST 2007




This is a longstanding bug with XSB's compiler.  I tried fixing
it 4-5 years ago, but my fix caused problems with some
optimizations that XSB performs with arithmetic expressions, so
the fix was never adopted.

But you're right -- it is a big (though localized) bug and we
should fix it.  Do you have a work-around for the immediate
future?

Terry


On Sun, 23 Sep 2007, Roberto Bagnara wrote:

> 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 at 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
>
> --
> 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
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Xsb-development mailing list
> Xsb-development at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xsb-development
>



More information about the PPL-devel mailing list