Limits in Quintus Prolog

This section describes the limits pertaining to atoms, functors, predicates, and other structures in Quintus Prolog.

Atoms cannot have more than 65532 characters.

Functors and predicates cannot have arities greater than 255.

There are no limits (apart from memory space) on the number of procedures or clauses allowed.

Prolog floating point numbers have 64 bit precision and conform to the IEEE 754 standard. The range of Prolog integers is -2147483648 (-2^31) to 2147483647 (2^31-1), both inclusive.

The size of a compiled clause is limited to 2^15 (32,768) bytes of compiled code.

There are internal limits on the size of compiled clauses, which are difficult to relate to properties visible to the user. These are 512 "temporary variables" (which only occur in the head goal), and 255 "permanent variables" (non-temporaries, which occur in goals in the body). The compiler will generate warnings if these limits are exceeded. There is no limit on the number of "symbols" (variables, atoms, numbers, or functors) in a compiled clause.

There are no restrictions on the number of variables or symbols in dynamic or interpreted clauses.

Prolog itself has no limit on the number of input/output streams that can be open at any one time. But the underlying Operating System might. For instance, some default configurations of UNIX might allow only 64 streams to be open at one time. Three of these streams are reserved for standard input, standard output, and error output respectively. These three streams are always open. Standard input and output normally refer to your terminal, but can be redirected from outside Prolog by means of operating system facilities. The error stream nearly always refers to the terminal, but can also be redirected.

Virtual memory for Prolog's data areas must come from the low 1 gigabyte of virtual memory. The maximum size of Prolog's data areas is also 1 gigabyte. Prolog expands its data areas as necessary. These areas can be contracted again by calling the built-in predicate trimcore/0. This predicate is automatically called on completion of every goal typed at the top level.