YAP 7.1.0

The following predicates are available to control the debugging of programs: More...

Detailed Description

The following predicates are available to control the debugging of programs:

Outputs status information about the debugger which includes the leash

mode and the existing spy-points, when the debugger is on

Class Documentation

◆ spy/1

class spy/1

spy( + P )

Sets spy-points on all the predicates represented by P P can either be a single specification or a list of specifications Each one must be of the form Name/Arity or Name In the last case all predicates with the name Name will be spied As in C-Prolog, system predicates andpredicates written in C, cannot be spied

◆ nospy/1

class nospy/1

nospy( + P )

Removes spy-points from all predicates specified by P The possible forms for P are the same as in spy P

Definition at line 1 of file spy.yap.

◆ leash/1

class leash/1

leash(+ M)

Sets leashing mode to M The mode can be specified as:

  • full prompt on Call, Exit, Redo and Fail
  • tight prompt on Call, Redo and Fail
  • half prompt on Call and Redo
  • loose prompt on Call
  • off never prompt
  • none never prompt, same as off

The initial leashing mode is full

The user may also specify directly the debugger ports where he wants to be prompted If the argument for leash is a number N, each of lower four bits of the number is used to control prompting at one the ports of the box model The debugger will prompt according to the following conditions:

  • if N/\ 1 =\= 0 prompt on fail
  • if N/\ 2 =\= 0 prompt on redo
  • if N/\ 4 =\= 0 prompt on exit
  • if N/\ 8 =\= 0 prompt on call

Therefore, leash(15) is equivalent to leash(full) and leash(0) is equivalent to leash(off)

Another way of using leash is to give it a list with the names of the ports where the debugger should stop For example, leash([call,exit,redo,fail]) is the same as leash(full) or leash(15) and leash([fail]) might be used instead of leash(1)