bug-prolog
[Top][All Lists]
Advanced

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

Re: Bug re: \+ operator


From: Paulo Moura
Subject: Re: Bug re: \+ operator
Date: Thu, 28 Dec 2000 23:34:00 +0000

On Monday, December 25, 2000, at 09:36 PM, Jules Altfas wrote:

>  
> Hello, 
>  
> If you already know about this problem, good! 
>  
> In gprolog 1.2.5, I used the following goal: 
>        
>       ..., 
>       \+ (0 is (Y mod 4)), 
>       ..., 
>  
> Obviously, if "Y mod 4" is other than 0, it should succeed.  When I ran 
> this in the top-level interpreter, in fact it worked as expected, but not 
> when compiled.  In the compiled version, this goal would succeed but I 
> always got the message: 
>  
> 
>       
> "system_error(cannot_catch_throw(error(existence_error(procedure,(is)/2),(\+)/1)))"
>  
>  
> This didn't seem to be a problem in gprolog 1.2.4.  I was able to use a 
> work-around in 1.2.5 for compiled code with 
>        
>       ..., 
>       M is (Y mod 4), 
>       M \= 0, ... 
>  
> At any rate, I really like the compiler and appreciate all the hard work 
> that's gone into it. 

Are you compiling your programs using the option to remove unused built-in 
predicates? That will explain the exception that you are getting: I believe 
that the current version of GNU Prolog does not look inside meta-predicates 
such as \+/2 to see what built-ins are called in your program.

Hope this helps,

Paulo



-----------------------------------------------------------
Paulo Jorge Lopes de Moura
Dep. of Informatics                   Office 4.32 Ext. 3251
University of Beira Interior          Phone: +351 275319700
6201-001 Covilhã                      Fax:   +351 275319732
Portugal

mailto:address@hidden
http://www.ci.uc.pt/logtalk/pmoura.html
-----------------------------------------------------------


reply via email to

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