Cannot consult/1 after listing/1 (Was: Scryer Prolog has dethroned SWI-Prolog)

Liste des GroupesRevenir à l prolog 
Sujet : Cannot consult/1 after listing/1 (Was: Scryer Prolog has dethroned SWI-Prolog)
De : janburse (at) *nospam* fastmail.fm (Mild Shock)
Groupes : comp.lang.prolog
Date : 28. May 2025, 11:09:28
Autres entêtes
Message-ID : <1016nco$28f4$1@solani.org>
References : 1 2 3 4 5 6
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0 SeaMonkey/2.53.20
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
 

Date Sujet#  Auteur
2 Apr 25 * Streamable DOM and obsolete put_code/[1,2]11Mild Shock
2 Apr 25 +* Re: Streamable DOM and obsolete put_code/[1,2]9Mild Shock
2 Apr 25 i`* Re: Streamable DOM and obsolete put_code/[1,2]8Mild Shock
5 Apr 25 i `* Space Junk might fall on your head [Scryer Prolog WASM] (Was: Streamable DOM and obsolete put_code/[1,2])7Mild Shock
5 Apr 25 i  +- Editor’s Draf, 10 January 2025 - Trusted Types (Was: Space Junk might fall on your head [Scryer Prolog WASM])1Mild Shock
25 May 25 i  +* *** 2025 Prolog Awards *** (Was: Space Junk might fall on your head [Scryer Prolog WASM])4Mild Shock
26 May 25 i  i`* Scryer Prolog has dethroned SWI-Prolog (Was: *** 2025 Prolog Awards ***)3Mild Shock
26 May 25 i  i +- Nevertheless I have bad news for Prolog (Was: Scryer Prolog has dethroned SWI-Prolog)1Mild Shock
28 May 25 i  i `- Cannot consult/1 after listing/1 (Was: Scryer Prolog has dethroned SWI-Prolog)1Mild Shock
5 Jun 25 i  `- Tau-Prolog Code Mirror Integration has Flaws (Was: Space Junk might fall on your head)1Mild Shock
7 Apr 25 `- Code Generation with write/[1,2] [Some Testcases] (Was: Streamable DOM and obsolete put_code/[1,2])1Mild Shock

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal