Re: GNU prolog is not so reliable as SWI-prolog



newser.bbs@xxxxxxxxxxxxxxxxx escreveu:

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.
Did you read the GNU Prolog Error message and consulted with the users manual?

--
Cesar Rabak
.



Relevant Pages

  • GNU prolog is not so reliable as SWI-prolog
    ... The following codes is test in swi-prolog and can run smoothly. ... But the same codes' job just can't be finished in GNU prolog, ... the stack limitation. ...
    (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)
  • Strange clause/2 predicate behaviour in SWI-Prolog
    ... The following behaviour of clause/2 in SWI-Prolog is very strange, ... In GNU Prolog the same query gives: ... Copyright 1999-2002 Daniel Diaz ... Shouldn't the same query give the same answer in both systems? ...
    (comp.lang.prolog)
  • tell listing failure in GNU prolog
    ... I try to save databease in GNU prolog, ... Copyright 1999-2002 Daniel Diaz ... | ?- listing. ... SWI-Prolog comes with ABSOLUTELY NO WARRANTY. ...
    (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)