Sometimes it is useful to let the user application catch certain events that occur during XSB execution. For instance, when the user asserts or retracts a clause, etc. XSB has a general mechanism by which the user program can register hooks to handle certain supported events. All the predicates described below must be imported from xsb_hook.