Availability:built-in
compile_predicates(:ListOfPredicateIndicators)Compile a list of specified dynamic predicates (see dynamic/1
and
assert/1)
into normal static predicates. This call tells the Prolog environment
the definition will not change anymore and further calls to assert/1
or retract/1
on the named predicates raise a permission error. This predicate is
designed to deal with parts of the program that are generated at runtime
but do not change during the remainder of the program execution.95The
specification of this predicate is from Richard O'Keefe. The
implementation is allowed to optimise the predicate. This is not yet
implemented. In multithreaded Prolog, however, static code runs faster
as it does not require synchronisation. This is particularly true on SMP
hardware.