All Manuals > KnowledgeWorks and Prolog User Guide > 5 The Programming Environment

5.9 Monitor Windows

KnowledgeWorks Rule Monitor

Monitor Windows allow the preconditions of forward chaining rules to be monitored. They may be obtained by choosing Rule > Monitor or by choosing Spy > Monitor Rule from the KnowledgeWorks Listener.

The top part of the window is the Select instantiations pane, as described below. The lower part displays a list of either fired or unfired instantiations. This list is not kept up to date if the rulebase is executing with debugging turned off. To examine a binding in a displayed instantiation, select the corresponding line and choose Instantiations > Inspect. This shows the objects themselves in a LispWorks Inspector tool, so double-clicking on one of the entries will cause that entry to be inspected. See the LispWorks IDE User Guide for more details.

The Show Inferencing State dropdown allows you to choose which named inferencing state is used to find the instantiations.

When the All Unfired Instantiations button is selected, the unfired instantiations are displayed.

When the Matching Selected Conditions button is selected, the instantiations that match all of the selected preconditions are displayed. The topmost shows the preconditions of the rule. Any conditions that are matched by the object base are highlighted. This highlighting means the condition is matched without reference to any of the other conditions. A message indicates the number of instantiations matching the highlighted preconditions. A group of preconditions matched individually (hence highlighted) may not be matched together if, for instance, variables were bound across them.

If a rule has the conditions, for example:

(person ?person1 father ?person)
(person ?person2 son ?person)
(test (not (eq ?person nil)))

these would be displayed in the top pane of the Rule Monitor Window. The first two would be highlighted if the object base contained a person object. But instantiations would only be displayed if there was a person object with the same father value as some (other) person object has son.

The selection of conditions may be toggled by left-clicking. So in the above example the last condition could be selected also by clicking on it, and there would be no instantiations displayed if the only consistent value of ?person was nil.

5.9.1 Forward Chaining History

KnowledgeWorks Forward Chaining History

The Forward Chaining History may be viewed by choosing KnowledgeWorks > FC History. This displays the rules which the forward chaining engine has fired. The left pane lists sequentially the contexts which have been executed, with the cycle number in which they were entered. These can be clicked on to show in the right pane, the history for that context. The rules in it are listed down the left, and the cycle numbers along the top, forming a two dimensional grid.

Each position in the grid indicates the status of the rule in that cycle. A colored box indicates that the rule fired. A half-colored box indicates that the rule fired, but that the invocation of the backward chainer on the right-hand side failed at some point. There can only be one colored or half-colored box per cycle. An outlined box indicates that the rule was in the conflict set but was not chosen to fire. Absence of any icon indicates that the rule was not even in the conflict set.

If the forward chaining history is displayed while a rule is executing (for example, while the rule is being single stepped) a half-colored box is displayed as execution is not complete.

The Rule menu can be used in the same way as in the Rule Browser, described in 5.7 The Rule Browser. It applies to the selected rule in the FC Cycles pane.

The Show Inferencing State dropdown allows you to choose which named inferencing state is examined.

This tool is not available when debugging is turned off.


KnowledgeWorks and Prolog User Guide (Unix version) - 01 Dec 2021 19:35:49