skip to main content
Corticon Studio: Rule Modeling Guide : Logical analysis and optimization : Optimizing Rulesheets : The compress tool

Try Corticon Now
The compress tool
Corticon Studio helps improve performance by removing redundancies within Rulesheets. There are two types of redundancies the Compress Tool detects and removes:
1. Rule or sub-rule duplication. The Compress Tool will search a Rulesheet for duplicate columns (including sub-rules that may not be visible unless the rule columns are expanded), and delete extra copies. Picking up where we left off in New Rule Added by Completeness Check, let's add another rule (column #4), as shown in the following figure:
Figure 234. New Rule (#4) Added
While these 4 rules use only 2 Conditions and take just 2 Actions (an assignment to riskRating and a posted message), they already contain a redundancy problem. Using the Expand Tool this redundancy is visible in the following figure:
Figure 235. Redundancy Problem Exposed
Clicking on the Compress Tool
has the effect shown in the following figure:
Figure 236. Rulesheet After Compression
Looking at the compressed Rulesheet in this figure, we see that column #4 has disappeared entirely. More accurately, the Compress Tool determined that column 4 was a duplicate of one of the sub-rules in column 1 (1.2) and simply removed it. Looking at the Rule Statement section, we see that the rule statement for rule 4 has been renumbered to match the surviving rule.
Compression does not, however, alter the text of the rule statement; that task is left to the rule writer.
It is important to note that the compression does not alter the Rulesheet's logic; it simply affects the way the rules appear in the Rulesheet – the number of columns, Values sets in the columns, and such. Compression also streamlines rule execution by ensuring that no rules are processed more than necessary.
2. Combining Values sets to simplify and shorten Rulesheets. Recall our shipping charge example. By using the Compress Tool, Rulesheet columns are combined wherever possible by creating Values sets in Condition cells. For example, rule 6 in the figure Compressed Shipping Charge Rulesheet (highlighted below) is the combination of rule 6 and 8 from Rulesheet with Renumbered Rules.
Figure 237. Compressed Shipping Charge Rulesheet
Value sets in Condition cells are equivalent to the logical operator OR. Rule 6 therefore reads:
In deployment, The Server will execute this new rule 6 faster than the previous rule 6 and 8 together.