Information about the State of the Program

KEY listing Lists in the current output stream all the clauses in the current interpreted program. listing(A) If A is just an atom, then the interpreted procedures for all predicates of that name are listed as for listing/0. The argument A may also be a predicate specification of the form Name/Arity in which case only the clauses for the specified predicate are listed. Finally, it is possible for A to be a list of predicate specifications of either type, e.g. | ?- listing([concatenate/3, reverse, go/0]). current_atom(Atom) Generates (through backtracking) all currently known atoms, and returns each one as Atom. current_functor(Name,Functor) Generates (through backtracking) all currently known functors, and for each one returns its name and most general term as Name and Functor respectively. If Name is given, only functors with that name are generated. current_predicate(Name,Functor) Similar to current_functor, but it only generates functors corresponding to predicates for which there currently exists an interpreted procedure.