I retract my claim that Scryer Prolog has dethroned
anything. Its still in a quite bad state.
It also shows that generating annonymous variables,
has also some use cases, where its not only an arbitrary
feature but rather a necessity.
Take this real world example, from a file case.pl:
:- dynamic(sys_get_code_list/6).
sys_get_code_list(-1, _, _, _, [], _) :- !.
sys_get_code_list(H, H, _, _, [H], _) :- !.
sys_get_code_list(H, _, 1, _, [H], _) :- !.
sys_get_code_list(H, D, 0, S, [H|L], F) :- !,
sys_get_code(S, J, F),
sys_get_code_list(J, D, 0, S, L, F).
sys_get_code_list(H, D, M, S, [H|L], F) :-
sys_get_code(S, J, F),
N is M-1,
sys_get_code_list(J, D, N, S, L, F).
If I use Scyer Prolog listing/1 I get,
I added the dynamic manually:
:- dynamic(sys_get_code_list/6).
sys_get_code_list(-1,A,B,C,[],D) :-
!.
sys_get_code_list(A,A,B,C,[A],D) :-
!.
sys_get_code_list(A,B,1,C,[A],D) :-
!.
sys_get_code_list(A,B,0,C,[A|D],E) :-
!,
sys_get_code(C,F,E),
sys_get_code_list(F,B,0,C,D,E).
sys_get_code_list(A,B,C,D,[A|E],F) :-
sys_get_code(D,G,F),
H is C-1,
sys_get_code_list(G,B,H,D,E,F).
If I put the generated code into a file case2.pl,
I suddently get a lot of warnings:
$ target/release/scryer-prolog
?- [case2].
% Warning: singleton variables A, B, C, D at line 1 of case2.pl
% Warning: singleton variables B, C, D at line 3 of case2.pl
% Warning: singleton variables B, C, D at line 5 of case2.pl
true.
Mild Shock schrieb:
Hi,
Interestingly Scryer Prolog does many things right.
I find the following test case:
/* Scryer Prolog 0.9.4-403 */
?- length(L,2), f(L) = R, S = [_A].
L = [_B, _C],
R = f([_B, _C]),
S = [_A].
While SWI-Prolog still makes the following error. The
newly generated _A and _B are not checked whether they
already appear in the answer elsewhere, causing a name clash:
/* SWI-Prolog 9.3.22 */
?- length(L,2), f(L) = R, S = [_A].
= [_A, _B],
R = f([_A, _B]),
S = [_A].
Other Prolog systems that avoid the clash as well are
Trealla Prolog, and since today Dogelog Player.
Bye
Mild Shock schrieb:
Hi,
>
It is time for the 2025 Prolog Awards.
Are you excited yet?
>
https://9gag.com/gag/aPAXyEP
>
Here is the list:
>
1. Place: Scryer Prolog, it uses rustyline,
very convenient:
>
app<tab> gives append
a<tab><tab> cycles through letter a predicates
length(foo) shows the matching braket in blue
Etc..
>
-1. Place: SWI-Prolog, has no line edit at all
>
Bye