PLOGHELP PROLOG_ABOLISH                    Robert Duncan, September 1988


    ?- prolog_abolish(Name, Arity).


Predicate for deleting definitions from the database.

'prolog_abolish/2' is similar to 'abolish/2', in that it removes from
the database any definition of a predicate with a given functor name and
arity. The difference is that 'prolog_abolish/2' will remove definitions
of system predicates, something which cannot be done by other means. As
with 'abolish/2', the argument -Name- must be an atom and the argument
-Arity- an integer >= 0.

The ability to abolish system predicates would appear to be useful in
two circumstances. Firstly, it means that procedures which have been
inadvertently compiled with the 'system predicate' option switched on
(see PLOGHELP * SYSTEM_PREDICATE) can still be deleted or redefined.
Secondly, it means that built-in predicates can be redefined, perhaps to
conform to the behaviour provided by other Prolog systems.

Be warned that the abolition (and redefinition) of a system predicate
only affects calls to that predicate which are compiled after the
abolition has been done. Calls made from existing procedures will
continue to access the original definition. Also, of course, once a
built-in predicate has been abolished it is impossible to restore its
original definition, so you should be very careful about doing this. To
avoid accidents, use the standard 'abolish/2' except where there are
definite reasons for doing otherwise.


-- RELATED DOCUMENTATION ----------------------------------------------

PLOGHELP * ABOLISH
    Standard method of abolishing definitions

PLOGHELP * SYSTEM_PREDICATE
    How to declare system predicates


--- C.all/plog/help/prolog_abolish
--- Copyright University of Sussex 1988. All rights reserved. ----------
