users-prolog
[Top][All Lists]
Advanced

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

Re: Error on --min-pl-bips


From: Daniel Diaz
Subject: Re: Error on --min-pl-bips
Date: Mon, 11 Dec 2000 11:38:14 +0100

Hi,

When you use --min-pl-bips gplc tries to minimizes the number of used 
built-in predicates. Thus unused predicates are not linked. Which predicates 
are used (linked) is determined statically (at compile-time). Thus, predicate 
only referenced inside a meta-predicate will not be included, since for the 
compiler this predicate is a simple data - not a procedure call. I could 
modify the compiler to look inside known meta-predicates (and I plan to do 
it) but this could not solve the following case:

p(X):- findall(_,X,_).

where the value of X will only be known at run-time (vs compile-time).

So GNU Prolog provides a directive (ensure_linked/1) to inform the compiler 
about predicates that are not statically referenced but that should be 
present in the final executable.

To solve you problem simply add:

:- ensure_directive((@>)/2).

somewhere in your source.


address@hidden said:
> The --min-pl-bips option seems to be buggy. If I run my PRogram
> compiled using this option I get an series of  "system_error(cannot_
> catch_throw(error(existence_error(procedure,(@>)/2),findall/3)))"
>
> errors.
>
> I'm using GNU-Prolog 1.2.1 on the latest Cygwin-tools, the same
> problem happens using the Linux based compiler.
>
> Elmar


-- 
===============================================
                 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]