next up previous contents
Next: Debugging Up: The Tracer Outlined Previous: Activating the Tracer

Interacting with the Tracer

Now we outline the actions that the user can take at one of the interactive ports. In all, there are about 22 different actions that can be taken. We will describe a useful subset of 6 commands.

creep
This is the single stepping command. Use Return to creep. The tracer will move on to the next port. If this is interactive then the user is queried ---otherwise, the tracer prints out the results for the port and moves on.
skip
This moves from the Call or Redo ports to the Exit or Fail ports. If one of the subgoals has a spypoint then the tracer will ignore it.
leap
Go from the current port to the next port of a spied predicate.
retry
Go from the current Fail or Exit port back to the Redo or Call port of the current goal --- i.e. replay the execution over again.
unify
This provides for the user giving a solution to the goal from the terminal rather than executing the goal. This is available at the Call port. This is of use in running programs which are incomplete (providing a form of ``stub'' for a predicate that has not yet been written). Enter a term that should unify with the current goal.
(re)set subterm
This provides the facility to examine a subterm of a complex term. This provides a means for focussing on the part of the datastructure which is of interest. Consider the display at the Call port.
 
   1  		 1  		 Call: 		 foo(a(1,baz),[q,w,e,r,t])?

By selecting the set subterm option with ^ 1 we would see
 
   1  		 1  		 Call: 		 ^ 1 a(1,baz)?

Then we can further select with ^ 2 :
 
   1  		 1  		 Call: 		 ^ 2 baz?

To go back to the parent of a term requires the reset subterm command ( ^).



next up previous contents
Next: Debugging Up: The Tracer Outlined Previous: Activating the Tracer



Paul Brna
Mon May 24 20:14:48 BST 1999