To help identify inadvertent loops, Corticon Studio provides a Check for Logical Loops tool in the Corticon Studio toolbar. The tool contains a powerful algorithm that analyzes dependencies between rules on the same Rulesheet, and reports discovered loops to the rule modeler. For the Loop Detector to notice mutual dependencies, a Rulesheet must have looping enabled using one of the choices described earlier.

Clicking the Check for Logical Loops icon displays a window that describes the mutual dependencies found on the Rulesheet. To illustrate loop detection, a few of the same examples will be used.

Figure 1. Example of an infinite single-rule loop

When applied to a Rulesheet containing just the single-rule loop shown in this figure, the Check for Logical Loops tool displays the following window:

Figure 2. Checking for logical loops in a Rulesheet
Figure 3. A single-rule loop detected by the Check for Logical Loops tool

The Check for Logical Loops tool first lists rules where mutual dependencies exist. Then, it lists the distinct, independent loops in which those rules participate, and finally it lists where self-triggering rules exist (if any). In this simple single-rule loop example, only one rule contains a mutual dependency, and only one loop exists in the Rulesheet.

Note: The Check for Logical Loops tool does not automatically fix anything, it just points out that your rules have loops, and gives you an opportunity to remove or modify the offending logic.