GNU prolog is not so reliable as SWI-prolog



The following codes is test in swi-prolog and can run smoothly .
You can test that .
==========================================================
Welcome to SWI-Prolog (Multi-threaded, Version 5.2.13)
Copyright (c) 1990-2003 University of Amsterdam.
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.

For help, use ?- help(Topic). or ?- apropos(Word).

1 ?- assertz((treat(0):-!)).

Yes
2 ?- assertz((treat(N):-!,write(' '),write(N),N1 is N-1,treat(N1))).

N = _G540
N1 = _G549

Yes
3 ?- treat(1000000).
=============================================

But the same codes' job just can't be finished in GNU prolog ,
You can try the following.
==============================================
GNU Prolog 1.2.16
By Daniel Diaz
Copyright (C) 1999-2002 Daniel Diaz
| ?- assertz((treat(0):-!)).

yes
| ?- assertz((treat(N):-!,write(' '),write(N),N1 is N-1,treat(N1))).

yes
| ?- treat(1000000).

==============================================
One reason that makes me trasferred from Turbo prolog is
the stack limitation . If a prolog of window version still gets
severe limited in the stack size , I don't think it worth my attention.

.



Relevant Pages

  • Re: GNU prolog is not so reliable as SWI-prolog
    ... SWI-Prolog comes with ABSOLUTELY NO WARRANTY. ... But the same codes' job just can't be finished in GNU prolog, ... Copyright 1999-2002 Daniel Diaz ... the stack limitation. ...
    (comp.lang.prolog)
  • Unget in SWI-prolog ?
    ... The codes that I gave for eof in the message ... just work find in GNU prolog, ... named unget_char in SWI-prolog. ...
    (comp.lang.prolog)
  • :- at the beginning for assertional coding
    ... code he wroks out in the toplevel by using assertz/1 or ... If the programmer just save his codes, ... SWI-Prolog comes with ABSOLUTELY NO WARRANTY. ...
    (comp.lang.prolog)
  • Re: Tail recursion
    ... recAdd_(NewN, NewC, R). ... I tested it on SWI-Prolog as well, ... GNU Prolog can either consult a program (with if file.pl ... in SWI and in GNU. ...
    (comp.lang.prolog)
  • Re: Tail recursion
    ... I tested it on SWI-Prolog as well, and it worked with MUCH higher values on that, namely, 30 million, and that's when I stopped testing. ... The optimization seems to have taken place, but there's an interesting difference in the output: GNU Prolog, if it doesn't fail, just spits out the value; SWI-Prolog, on the other hand, spits out the value and then requires me to press; as if there were more values. ... GNU Prolog can either consult a program (with if file.pl ... GNU Prolog (unlike SWI) has a bound on the integers it works with ...
    (comp.lang.prolog)