Checking the consistency of the rules - Gnorion/BizVR GitHub Wiki

Checking the consistency of the rules

There are a number of ways that rules can be inconsistent (or ambiguous)

In this example both rules have the same conditions but conflicting actions:

image

In this example the conditions for the rules are different but they overlap for large square things

image

It can be harder to spot overlaps when numeric ranges are involved.

In this example the conflict occurs when length and height are both 10:

image

Finding these types of conflict is usually not too difficult - when the conflicting rules are in the SAME decision table.

Conflicts Between Rules in Different Tables

But what if they are in different tables. For example consider these two tables:

image

image

The conflict occurs because
Attribute group is set to 'A' by rule R1 DT01 and 'C' by rule R1 DT02 when (height <50) or (width <50) and length in (50..100]

Actually there are some other conflicts - can you find them?

Conflicting Actions

In this example the conditions do not overlap, but the actions (within each rule) are in conflict:

image

  • R1 DT03 attribute price is set to both 10 and 5 when this rule is executed
  • R2 DT03 attribute price is set to both 10 and 15 when this rule is executed

Conflicting Conditions

Its also possible to create conditions that are in conflict - meaning the rule can never execute.

image

R1 DT01: condition length in[0..100] excludes >100