PLOGHELP CLAUSES Robert Duncan, February 1988 :- op(254, fx, clauses). ?- clauses PredicateSpec. Declares that a textual record should be kept of the clauses used to define the predicates identified by PredicateSpec. 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: :- clauses elaborate/3, match/2. declares that text should be kept for the predicates elaborate/3 and match/2. The textual record of clauses is needed by predicates such as listing/1 and clause/2 and under normal circumstances is kept for all predicates defined by the user. However, in the interests of space efficiency it is possible to change the behaviour of the Prolog compiler so that it automatically discards the text of each predicate it defines; this is done by means of the predicate prolog_no_clauses/1. If this behaviour has been selected, the "clauses" declaration can be used to override it for any predicate whose textual form needs to be kept. In such a case, the declaration must precede the definitions of the predicates concerned since the textual form of clauses cannot be recovered once discarded. A wider discussion of this topic can be found in PLOGHELP * NO_CLAUSES. --- C.all/plog/help/clauses -------------------------------------------- --- Copyright University of Sussex 1988. All rights reserved. ----------