PLOGHELP ABOLISH                                Robert Duncan, July 1993

Abolishing the definition of a predicate.

    ?- abolish(Fn, Arity).


abolish/2 removes all trace of a definition for the predicate Fn/Arity.
Fn must be an atom (the functor name of the predicate) and Arity an
integer (its arity). You cannot abolish a system predicate.

Abolishing a predicate means:

    o   removing its procedure definition from the database

    o   cancelling any declared attributes

    o   removing any spy-point

abolish/2 will succeed for any valid predicate specification, even if
the predicate is currently undefined. Afterwards, predicate_info/2 will
report the predicate as:

    [undefined]

and calling it will raise an 'UNDEFINED PREDICATE' error.

abolish/2 differs from retractall/1 in that the latter merely retracts
all the clauses for a predicate: afterwards, the predicate will be
defined and dynamic but with no clauses, and calling it will always
fail.

The predicate prolog_abolish/2 is like abolish/2 but will also abolish
system predicates: see PLOGHELP * PROLOG_ABOLISH.


See also:

PLOGHELP * PREDICATE_INFO
    Reporting the status of a predicate.

PLOGHELP * RETRACTALL
    Retracting all the clauses for a predicate.

PLOGHELP * UNKNOWN
    Changing the action taken when undefined predicates are called.


--- C.all/plog/help/abolish
--- Copyright University of Sussex 1993. All rights reserved.
