Package jason.stdlib

Class abolish

All Implemented Interfaces:
InternalAction, Serializable

@Manual(literal=".abolish(argument)", hint="removes all beliefs that match the argument.", argsHint="the \"pattern\" for what should be removed.", argsType="literal or variable", examples={".abolish(b(_)): remove all b/1 beliefs, regardless of the argument value and the source of the belief",".abolish(c(_,t)): remove all c/2 beliefs where the second argument is t",".abolish(c(_,_)[source(ag1)]): remove all c/2 beliefs that have ag1 as source",".abolish(_[source(ag1)]): remove any beliefs that have ag1 as source"}, seeAlso={"jason.stdlib.asserta","jason.stdlib.assertz"}) public class abolish extends DefaultInternalAction

Internal action: .abolish.

Description: removes all beliefs that match the argument. As for the "-" operator, an event will be generated for each deletion. Different from the "-" operator, which consider "self" as the default source, .abolish will ignore the source if not informed.

Parameters:

  • + pattern (literal or variable): the "pattern" for what should be removed.

Examples:

  • .abolish(b(_)): remove all b/1 beliefs, regardless of the argument value and the source of the belief.
  • .abolish(c(_,t)): remove all c/2 beliefs where the second argument is t.
  • .abolish(c(_,_)[source(ag1)]): remove all c/2 beliefs that have ag1 as source.
  • .abolish(_[source(ag1)]): remove any beliefs that have ag1 as source.
See Also: