make quad should be engine dependant to get full
coverage and results
make quad will run 3 loops, one for each engine by
default"strings" rather than
[s, t, r, i, n, g, s]countall/2number_chars/2 is good test because it tests the
parserread(G_0), G_0. or …call_with_inference_limitcall_with_time_limit/3
time_out/3 https://sicstus.sics.se/sicstus/docs/3.12.7/html/sicstus/Timeout.htmldif/2 (scryer:dif.pl)CLP(B)clpzuwn
https://www.complang.tuwien.ac.at/ulrich/flowlog-prolog/ ulrich@gupu:/opt/gupu/flowlog$ ./flowlog
Flowlog (pthreads)
Type 'help.' for help, 'halt.' to exit.
?- number_chars(1,[_,[]]).
error(instantiation_error,/(number_chars,2)), unexpected.
type_error(character,[]). % expected, but not found
?- number_chars(N,['3',.]).
N = 3.0, unexpected.
syntax_error(...). % expected, but not found
?- number_chars(N,[-,' ','1']).
flowlog: fatal error (240): flowlog: unexpected token while parsing term
writeq ignores operators Before improving read-ing,
consider writeq-ing. Such that you always write valid
syntax. So the first to address would be:
select/3 not conforming Since 2011 select/3 is defined without any errors. Just with two clauses. (Actually, it was commonly defined like that since at least 1983. C&M:1981 did not use it) Thus the following is not conforming:
?- select(X, Xs, Ys).
false, unexpected.
?- select(X, Xs, Xs).
false, unexpected. % see p.p.5.4
?- select(X,Xs,[1,2,3]).
false, unexpected.
% this is the expected answer:
Xs = [X,1,2,3]
; Xs = [1,X,2,3]
; Xs = [1,2,X,3]
; Xs = [1,2,3,X].
?- select(X, [Y|nonlist], Xs).
error(type_error(list,[_G0|nonlist]),/(select1,3)), unexpected.
This type error would make sense, if the template and modes subclause would indicate ?list for the second argument, but it reads in p.p.5.2
select(?term, ?term, ?term)
?- Xs = [a|Xs], ( true ; catch(select(X, Xs, Ys), Err, true ) ).
Xs = [a,a,a,a,a|...]
; Xs = [a,a,a,a,a|...], error(representation_error(term),/(select1,3)), unexpected.
% expected behaviour:
sto,
false % occurs-check
| sto,
Xs = [a|Xs] % rational trees
; Xs = [a|Xs], X = a, Ys = [a|Ys]
; Xs = [a|Xs], X = a, Ys = [a|Ys]
; ..., ad_infinitum
| sto,
representation_error(term).
?- append([a], Ys, Zs).
Segmentation fault (core dumped), unexpected.
Zs = [a|Ys]. % expected, but not found
v4.6.5