• Observed while watching FAIL/REDO ports (Was: The Ghosts in my Cabinet:

    From Mild Shock@21:1/5 to Mild Shock on Thu Jul 10 12:46:51 2025
    I made the observation while looking at
    debugger traces, choice point elimination,
    driven by indexes, also determines what
    FAIL/REDO ports a debugger shows.

    What is amazing Scryer Prolog, which has
    a tamer version of multi-argument indexing, a
    kind of skip indexing, they describe
    it on their GitHub homepage, can do it:

    /* Scryer Prolog 0.9.4-415 */
    ?- app(X,Y,[1]).
    X = [], Y = [1]
    ; X = [1], Y = [].

    And the ghost from my cabinet, formerly
    Jekejeke Prolog, which does a little bit more
    than skip indexing, but still not the same deep
    indexing as in SWI-Prolog can also do it:

    /* Jekejeke Runtime 1.7.3 */
    ?- app(X,Y,[1]).
    X = [], Y = [1];
    X = [1], Y = [].

    Mild Shock schrieb:
    I am currently doing a re-evaluation of an old
    Prolog system, checking what features I could adopt.
    This is unlike the current trend where people have
    turned their focus on GUIs, like XPCE,

    or a are stuck in an endless loop of parser
    problems, like in Trealla. But I would nevertheless
    share my finding. Take this simple example of
    a list append:

    app([], X, X).
    app([X|Y], Z, [X|T]) :- app(Y, Z, T).

    ECLiPSe Prolog gives me, only one redo question
    in the top-level:

    /* ECLiPSe Prolog 7.1beta #13 */
    [eclipse 2]: app(X,Y,[1]).

    X = []
    Y = [1]
    Yes (0.00s cpu, solution 1, maybe more) ? ;

    X = [1]
    Y = []
    Yes (0.00s cpu, solution 2)

    In SWI-Prolog I find, two redo questions
    in the top.level:

    /* SWI-Prolog 9.3.25 */
    ?- app(X,Y,[1]).
    X = [],
    Y = [1] ;
    X = [1],
    Y = [] ;
    false.

    I know SWI-Prolog handles lists differently
    than other Prolog terms during indexing. Could
    this be the reason? Or maybe that the call is
    not “hot” enough, so it doesn’t get JIT-ed.

    ECLiPSe Prolog does it on the very first call,
    and I assume its due to a kind of index on
    the 3rd argument.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Thu Jul 10 13:26:51 2025
    Hi,

    Shocking revelation, I found two significant
    bugs in my age old indexer code base yesterday.
    How can an eGovernment ever trust any Prolog
    system? These were bugs that typically go

    unnoticed by lets say a Rust type system.
    Would possibly require deep axiomatization
    or heavy fuzzy testing of the code, or a
    combination of both.

    LoL

    Bye

    Mild Shock schrieb:
    I made the observation while looking at
    debugger traces, choice point elimination,
    driven by indexes, also determines what
    FAIL/REDO ports a debugger shows.

    What is amazing Scryer Prolog, which has
    a tamer version of multi-argument indexing, a
    kind of skip indexing, they describe
    it on their GitHub homepage, can do it:

    /* Scryer Prolog 0.9.4-415 */
    ?- app(X,Y,[1]).
       X = [], Y = [1]
    ;  X = [1], Y = [].

    And the ghost from my cabinet, formerly
    Jekejeke Prolog, which does a little bit more
    than skip indexing, but still not the same deep
    indexing as in SWI-Prolog can also do it:

    /* Jekejeke Runtime 1.7.3 */
    ?- app(X,Y,[1]).
    X = [], Y = [1];
    X = [1], Y = [].

    Mild Shock schrieb:
    I am currently doing a re-evaluation of an old
    Prolog system, checking what features I could adopt.
    This is unlike the current trend where people have
    turned their focus on GUIs, like XPCE,

    or a are stuck in an endless loop of parser
    problems, like in Trealla. But I would nevertheless
    share my finding. Take this simple example of
    a list append:

    app([], X, X).
    app([X|Y], Z, [X|T]) :- app(Y, Z, T).

    ECLiPSe Prolog gives me, only one redo question
    in the top-level:

    /* ECLiPSe Prolog 7.1beta #13 */
    [eclipse 2]: app(X,Y,[1]).

    X = []
    Y = [1]
    Yes (0.00s cpu, solution 1, maybe more) ? ;

    X = [1]
    Y = []
    Yes (0.00s cpu, solution 2)

    In SWI-Prolog I find, two redo questions
    in the top.level:

    /* SWI-Prolog 9.3.25 */
    ?- app(X,Y,[1]).
    X = [],
    Y = [1] ;
    X = [1],
    Y = [] ;
    false.

    I know SWI-Prolog handles lists differently
    than other Prolog terms during indexing. Could
    this be the reason? Or maybe that the call is
    not “hot” enough, so it doesn’t get JIT-ed.

    ECLiPSe Prolog does it on the very first call,
    and I assume its due to a kind of index on
    the 3rd argument.



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Thu Jul 10 14:05:44 2025
    Hi,

    Is there an easier certification with a Prolog
    system that is written 100% in Prolog itself. Maybe
    or maybe not, I don't know, it feels a little bit

    like having implemented a Prolog system by taking
    the declarative specification of in the appendix
    of the ISO core standard, except I didn't use the

    always declarative style of the ISO appendix. It
    doesn't make any sense practically for a declarative
    style and have later some Prolog system which is either

    inefficient because the choice points explode or
    something impractical without I/O effects like the
    html//1 thingy in SWI-Prolog.

    Bye

    Mild Shock schrieb:
    Hi,

    Shocking revelation, I found two significant
    bugs in my age old indexer code base yesterday.
    How can an eGovernment ever trust any Prolog
    system? These were bugs that typically go

    unnoticed by lets say a Rust type system.
    Would possibly require deep axiomatization
    or heavy fuzzy testing of the code, or a
    combination of both.

    LoL

    Bye

    Mild Shock schrieb:
    I made the observation while looking at
    debugger traces, choice point elimination,
    driven by indexes, also determines what
    FAIL/REDO ports a debugger shows.

    What is amazing Scryer Prolog, which has
    a tamer version of multi-argument indexing, a
    kind of skip indexing, they describe
    it on their GitHub homepage, can do it:

    /* Scryer Prolog 0.9.4-415 */
    ?- app(X,Y,[1]).
        X = [], Y = [1]
    ;  X = [1], Y = [].

    And the ghost from my cabinet, formerly
    Jekejeke Prolog, which does a little bit more
    than skip indexing, but still not the same deep
    indexing as in SWI-Prolog can also do it:

    /* Jekejeke Runtime 1.7.3 */
    ?- app(X,Y,[1]).
    X = [], Y = [1];
    X = [1], Y = [].

    Mild Shock schrieb:
    I am currently doing a re-evaluation of an old
    Prolog system, checking what features I could adopt.
    This is unlike the current trend where people have
    turned their focus on GUIs, like XPCE,

    or a are stuck in an endless loop of parser
    problems, like in Trealla. But I would nevertheless
    share my finding. Take this simple example of
    a list append:

    app([], X, X).
    app([X|Y], Z, [X|T]) :- app(Y, Z, T).

    ECLiPSe Prolog gives me, only one redo question
    in the top-level:

    /* ECLiPSe Prolog 7.1beta #13 */
    [eclipse 2]: app(X,Y,[1]).

    X = []
    Y = [1]
    Yes (0.00s cpu, solution 1, maybe more) ? ;

    X = [1]
    Y = []
    Yes (0.00s cpu, solution 2)

    In SWI-Prolog I find, two redo questions
    in the top.level:

    /* SWI-Prolog 9.3.25 */
    ?- app(X,Y,[1]).
    X = [],
    Y = [1] ;
    X = [1],
    Y = [] ;
    false.

    I know SWI-Prolog handles lists differently
    than other Prolog terms during indexing. Could
    this be the reason? Or maybe that the call is
    not “hot” enough, so it doesn’t get JIT-ed.

    ECLiPSe Prolog does it on the very first call,
    and I assume its due to a kind of index on
    the 3rd argument.




    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)