Here are some new test cases, the case3/3 facts have
changed. I added some hand picked test cases, from the
Ciao Prolog blooper, including some negative bigints:
cases.p.log (38,8 KB)
Interestingly other Prolog systems are also pray to the
same blooper. In total I found that 3 Prolog systems have
this blooper, whereas Trealla only for 50%. Here are now
the number of failures from the new test cases:
% case3, trealla: 5
% case3, ciao: 10
% case3, sicstus: 10
For ECLIPSe Prolog and Scryer Prolog can’t say exactly
whats going on, the count changed from 35 to 33 for case3/3
for both Prolog systems. Otherwise no problems seen, for example
JavaScript and Python platform of Dogelog Player do still fine.
Edit 20.10.2022
Maybe should modify the case/3 a little bit, to first check
whether the below implicit float conversion is also present in a
Prolog system. It would affect other test cases if they
don’t have an explicit float/1 call and compare to a float.
This can happen when for example (/)/2 or (**)/2 automatically
yields an integer when the result is integral. So far I didn’t notice
some problems, but I am not 100% sure what the Prolog
systems do. The implicit conversion is required by ISO core standard:
The change in the test case would simply be from
this here, i.e. counting this here:
?- case(N, X, Y), Y =\= float(X).
To count this here. But preferable also have some
negative test cases, not only (=\=)/2
but also (=:=)/2:
?- case(N, X, Y, eq), Y =\= X.
?- case(N, X, Y, nq), Y =:= X.