PLOGHELP STATIC                                Robert Duncan, March 1988


    :- op(254, fx, static).

    ?- static _____________PredicateSpec.


Declares all the predicates identified by _____________PredicateSpec to be ______static,
meaning that their definitions will not be changed during the rest of
the program, other than perhaps by reconsulting.

_____________PredicateSpec must be a conjunction of simple specifications of the form

    __Fn/_____Arity

where __Fn is an atom (the functor name of the predicate) and _____Arity an
integer (its arity). For example, the directive:

    :- static search/3, reduce/2.

declares that both search/3 and reduce/2 are static.

The default behaviour of the Prolog compiler is to make all user-defined
predicates static, which means that this declaration is redundant in
most cases. Instead, normal practice is to use the companion declaration
dynamic/1 to override the default behaviour for particular predicates
whose definitions are meant to change, usually because of assert and
retract operations. There can be situations however where, at a certain
point in a program, it is known that a predicate which has previously
been declared dynamic is no longer liable to change; in such cases,
using the static/1 declaration may improve the running speed of that
predicate. See ________PLOGHELP * _______DYNAMIC for more details.


--- ______________________C.all/plog/help/static
--- _________Copyright __________University __of ______Sussex _____1993. ___All ______rights _________reserved.
