users-prolog
[Top][All Lists]
Advanced

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

Re: source code limits


From: Daniel Diaz
Subject: Re: source code limits
Date: Mon, 29 Jun 2015 09:35:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Le 26/06/2015 10:22, Fred Bapst a écrit :
Before trying to discover the details by myself, I was wondering whether someone
has an idea of the actual limits concerning the following aspects of Prolog
input files (ours are automatically generated by a translator; we try to attack
fd optimization problems with thousands of boolean variables and constraints):

- maximal size of list literals ([a,b,c,d...])
- maximal number of goals in a rule body
- maximal number variables appearing in a rule
- maximal number of fd variables
- maximal size of expressions inside constraints (3*A+4*B+2*C+...#<Z)
- maximal number of constraints
- maximal arity of a term

I bet those limits correspond to some constants/macros in the sources of
gprolog; it would be great to point us to the right place, so that we can adapt
and rebuild our own version.

Thanks in advance.

_______________________________________________
Users-prolog mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/users-prolog

Hi Fred,

there are 2 different aspects: the compiler and the runtime.

The compiler is not very well optimized for large source files. More precisely for predicates containing a lot of clauses or for large nested terms. A workaround consists in writing a data file which is read by your Prolog code (using open, read_term, close). There is a little overhead but generally acceptable.

The runtime has its own limits. Some can be discovered with current_prolog_flag/2 predicate (try current_prolog_predicate(X,Y)). Some can be adjusted (this requires to recompile gprolog). See src/BipsPl/b_params.h (e.g. MAX_VAR_IN_TERM = 32768). If you modify this file please do a
make clean
make

Daniel



--
Ce message a ete verifie par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a ete trouve.




reply via email to

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