skip to main content
Corticon Studio: Rule Modeling Guide : Logical analysis and optimization : Traditional means of analyzing logic : Flowcharts

Try Corticon Now
A flowchart that captures these two rules might look like the following:
Figure 216. Flowchart with 2 Rules
Upon closer examination, the flowchart reveals two problems with our rules: what Action(s) should be taken if either test fails, in other words, if Person.age>55 or if Person.smoker=false? The rules built in Simple Rules for Profiling Insurance Policy Applicants do not handle these two cases. But there is also a third, subtler problem here: what happens if both Conditions are satisfied, specifically when Person.age<=55 and Person.smoker=true? When Person.age<=55, we want Person.riskRating to be given the value of low. But when Person.smoker=true, we want Person.riskRating to be given the value of high.
We have discovered a dependency between our rules – they are not truly separate and independent evaluations because they both assign a value to the same attribute. So the flowchart we began with turns out to be an incorrect graphical representation of our rules, because the decision flow does not truly follow two parallel and independent paths. Let's try a different flowchart:
Figure 217. Flowchart with 2 Dependent Rules
In the flowchart in Flowchart with 2 Dependent Rules, we have acknowledged an interdependence between the two rules, and have arranged them accordingly. However, a few questions still exist. For example, why did we choose to place the smoker rule before the age rule? By doing so we are giving the smoker rule an implicit priority over the age rule because any smoker will immediately be given a riskRating value of High regardless of what their age is. Is this what the business intends, or are we as modelers making unjustified assumptions?
We call this a problem of logical conflict, or ambiguity because it's simply not clear from our two rules, as they have been written, what the correct outcome should be. Does one rule take priority over the other? Should one rule take priority over the other? This is, of course, a business question, but the rule writer must be aware of the dependency problem and resulting conflict in order to ask the question in the first place. Also, notice that there is still no outcome for a non-smoker older than 55. We call this a problem of logical completeness and it must be taken into consideration, no matter which flowchart we use.
The point we are making is that discovery of logical problems in sets of rules using the flowcharting method is very difficult and tedious, especially as the number and complexity of rules in a decision (and the resulting flowcharts) grows.