
abolish +SpecList

   Remove the definition and/or declaration of the predicates specified in
SpecList.



Arguments
   +SpecList           Sequence of expressions of the form Atom/Integer.

Type
   Predicate Database and Compiler

Description
   Removes the predicates specified in SpecList defined or declared in the
   caller module.


   This leaves the predicates in the same state as if they had never been
   defined or declared.  abolish/1 is different from retract_all/1 in that
   retract_all/1 leaves the predicates with no clauses (call of the
   predicate will fail) whereas abolish/1 makes the predicates undefined.


   abolish/1 is also used to abolish import links (created with
   import_from/2).


   Error 60 (``accessing an undefined procedure'') is raised when no
   predicate of name SpecList is visible.  Error 100 (``abolishing a non
   local procedure'') is raised if the visible predicate SpecList is
   defined or declared in a different module than the caller module.  Error
   66 is produced if an attempt is made to abolish a system predicate.


   When a predicate is abolished, another predicate might become visible.
   This may lead to type conflict (e.g.  a tool becomes visible after a
   local non-tool is abolished when a call to a non-tool was already
   compiled).  This will raise error 62 but the the predicate will be
   abolished anyway !.  This inconsistent state is allowed so that the user
   can abolish an instance version of a predicate to be replace it by
   another imported version while an incompatible global instance exists.
   This facility should be used carefully !


   abolish/1 satisfies the logical update semantics.  Abolishing a
   predicate will not, in any way, affect previous calls to it (when
   backtracking).




Resatisfiable
      No

Fail Conditions
      None



Exceptions
     4 --- SpecList is not instantiated
     5 --- SpecList is instantiated, but not to a sequence of    expressions of the form Atom/Integer
    60 --- SpecList is undefined
    62 --- Abolishing SpecList creates a type conflict    Error 66 --- SpecList is a built-in
   100 --- SpecList is not defined in the caller module

Examples
      Logical semantics :

   If the following clauses are in the database :
p(1) :- abolish(p/1).
p(2).

   The call p(X). will produce all the solutions visible when it started
   executing :
[eclipse]: p(X).

X = 1     More? (;)

X = 2
yes.





See Also
   retract_all / 1
