Figure 5.9 KnowledgeWorks Gspy Window
Spy Windows display graphically the actions or subgoals a rule (either forward or backward chaining) will invoke when it fires. A Spy Window may be obtained by choosing Rule > Gspy from the Rule Browser or by choosing Spy > Gspy in the KnowledgeWorks Listener. Spying can be cancelled by choosing Works > Exit > Window from the window itself or by choosing Spy > NoSpy or Spy > NoSpy All from the KnowledgeWorks Listener.
Left-clicking on one of the graph nodes in the top pane of the Spy Window displays the full text of the box in the pane below. Right-clicking on a box and choosing Gspy from the resulting menu brings up a Spy Window for the goal in the box.
When the rule being displayed fires, execution stops and the buttons at the bottom of the KnowledgeWorks Listener allow the rule to be single-stepped. Clicking on Creep steps through the rule, and Leap advances to the end of the rule (unless any of the intervening goals invoke another rule which has been spied). When single-stepping, a highlight marks the action or goal being performed. When execution is suspended in this manner, any of the KnowledgeWorks tools or browsers may be used.
More details on single stepping through rules are in Appendix A, Common Prolog.