bug-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Maybe this is another bug?


From: Dave Sworin
Subject: Maybe this is another bug?
Date: Fri, 27 Jun 2008 07:27:12 -0700 (PDT)

Hello,

 

    It seems that if I put the following (bad) code in a file and try to compile it, that gprolog goes into an infinite loop.  I have only tried this on Fedora Core 4.  A predicate without arguments is fine, but not with empty parentheses.  This is fine with me.  However, I am an old C programmer and did this by accident in a much larger file.  I'm not sure this is a bug, but maybe you want to fix it.  By-the-way, the problem does not occur if a predicate does not preceed it in the file.  For example, without the predicate mypred/1 below, the bug does not occur.  Can you reproduce this problem also?

 

Dave

----------------------------------------------

 

mypred(ARG1) :-
    ARG1 is 2 + 4.

 

test_case() :-
    true.

 

----------------------------------------------
address@hidden infinite_loop_bug]$ gprolog
GNU Prolog 1.3.0
By Daniel Diaz
Copyright (C) 1999-2007 Daniel Diaz
| ?- ['testcase.pl'].
compiling /home/daves/.../testcase.pl for byte code...
/home/daves/.../testcase.pl:5:11: syntax error: _expression_ expected
<== USER TYPED CONTROL-C HERE BECAUSE CPU METER WAS AT 100%
Prolog interruption (h for help) ? a
execution aborted
| ?-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]