next up previous contents
Next: Special Flags %trace-on% and Up: Tracing and Debugging Previous: Tracing of Alternatives and

     
Local tracing with boundaries

If you want a more focused tracing, you can put anywhere in the grammar a pair of atomic flags whose first character must be a `%' (value of variable *trace-marker*). All the unification done between the 2 flags will be traced, and will produce the same messages as usual.  

          
	  ;; branch 2 of alt passive
	  ((verb ((voice passive)))
	   (prot any)
	   %by-obj%
	   (prot ((cat np)))
	   (by-obj ((cat pp) (prep ((lex `by'))) (np (^ prot))))
	   %by-obj%
	   (pattern (dots verb by-obj dots)))
           ...
          
          

All the unification done between the 2 flags %by-obj% will be traced. You furthermore will have a message:

          
Switching local trace flags on and off:
        TRACING FLAG f
        UNTRACING FLAG f
          
          

You generally want to have only small portions of the grammar put between tracing flags.



 

Michael Elhadad - elhadad@cs.bgu.ac.il