release plan

things to do c:

uwn https://www.complang.tuwien.ac.at/ulrich/flowlog-prolog/

  1. testing number_chars/2 Because of #3 and #4, I cannot use the current test table, so I resorted to the old one. Please go through it. Problems start with #9, #17, #21.
    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
  1. writeq ignores operators Before improving read-ing, consider writeq-ing. Such that you always write valid syntax. So the first to address would be:

    1. s#1
    2. s#13
    3. s#27
    4. s#35
    5. s#36
  2. 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).
  1. append/3 does not work (Example from the Prolog prologue)
    ?- append([a], Ys, Zs).
    Segmentation fault (core dumped), unexpected.
       Zs = [a|Ys]. % expected, but not found

v4.6.5