The Advice Facility

The "advice" facility for program debugging and maintenance makes it possible to associate user-specified goals with any of the ports of a predicate (see dbg-bas-pbx). Advice may not change the relation computed by the advised predicate, but it may switch on or off debugging facilities, or can check that calls are well-formed and that results make sense. Any user-defined predicate may be advised; however, it is not currently possible to put advice on built-ins.