[Top][All Lists]

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

Re: Bug re: \+ operator

From: Daniel Diaz
Subject: Re: Bug re: \+ operator
Date: Mon, 08 Jan 2001 10:20:45 +0100


when asking gplc to produce an executable with minimal built-in predicates, 
you should explicitly mention dynamically referenced predicates (i.e. via a 
meta-call) using the ensure_linked/1 directive. So simply add in your source:

:- ensure_linked(is/2).

address@hidden said:
> 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.

> Thanks, Jules R. Altfas.

                 Daniel Diaz
University of Paris 1      INRIA Rocquencourt
75013 Paris FRANCE      78153 Le Chesnay FRANCE
        web: http://pauillac.inria.fr/~diaz
        email: address@hidden

reply via email to

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