Next Prev Up Top Contents Index

2.6.1 Monitoring Forward Chaining Rules

 

Figure 2.7 KnowledgeWorks Rule Monitor

One of the problems with forward chaining rules is determining why they are (or are not) being matched. To deal with this KnowledgeWorks has Monitor Windows for forward chaining rules. To bring up a Monitor Window, select the DEFAULT-CONTEXT in the Rule Browser, click on PLAY and choose Rule > Monitor . A window appears displaying in the top half the conditions of the rule. Both are highlighted meaning they are matched (as single conditions without reference to any variable bindings across conditions) in the object base. You can click on these conditions to toggle whether they are selected. The message would change from "Number of instantiations matching selected conditions: <n>" to "No instantiations matching selected conditions" depending on whether objects can be found in the object base to match all the highlighted conditions at once (this takes account of variables bound across conditions).

By selecting the All Unfired Instantiations button, you can list any unfired instantiations of the rule. In this case there is one unfired instantiation. Clicking on this and then choosing Instantiations > Inspect will bring up an inspector displaying the variable bindings in the instantiation.

You can have any number of monitor windows (though at most one per rule). At times (during rule execution, for example) the object base may change. Monitor windows can be updated by choosing choosing Works > Refresh from the monitor window menu bar, or Memory > Update Monitor Windows from the KnowledgeWorks Listener. When you are single-stepping through rules (see below) Monitor windows are updated automatically.


LispWorks KnowledgeWorks and Prolog User Guide - 15 Jul 2003

Next Prev Up Top Contents Index