Handling Overlapping Ranges - Gnorion/BizVR GitHub Wiki

Handling Overlapping Ranges

Suppose we have a table like this where the conditions for age overlap in the region [50..60]. Its not actually a conflict since the values for gender serve to distinguish the cases.

image

How Does VV determine Missing rules

  1. determine any missing values for the conditions
  2. compute the set of all possible combinations of all the attributes and conditions used in the ruleset
  3. eliminate from the set any combinations that are covered by the specified rules

Currently VV will produce this result

It constructs missing rules from the other conditions of each attribute in the table. Unfortunately when there are overlapping ranges this results in a partially correct assessment.

if age<60 and gender='male' then result not specified in ruleset DT1
if age>50 and gender='female' then result not specified in ruleset DT1

Preferred result

if age<=50 and gender='male' then result not specified in ruleset DT1
if age>=60 and gender='female' then result not specified in ruleset DT1

Why does this occur?

It occurs because there is an overlap between >50 and <60

How do we resolve it?

1. Put the rules in separate tables

image image

if age>=60 and gender='female' then result not specified in ruleset DT1
if age<=50 and gender='male' then result not specified in ruleset DT2

2. Model as non-overlapping ranges

This has the advantage of making it clearer that there is an area of overlap in age which is distinguished by means of gender

image

if age<=50 and gender='male' then result not specified in ruleset DT1
if age>=60 and gender='female' then result not specified in ruleset DT1

3. Figure out a way for VV to handle this automatically

VV will first identify any gaps in the conditions age>50 and age<60 - because they overlap there are no gaps Currently VV generates all combinations of age (>50 and <60) and gender (male,female) = 4 Then it will eliminate the conditions already covered leaving the incorrect conclusion.

VV needs to take some additional action when there is overlap in the conditions.

It first needs to create a set of non-overlapping ranges

So <60, >50 will become <=50, (50..60), >=60 (which is what we have in #2 above which was done manually)

Overlapping Ranges Test Cases

⚠️ **GitHub.com Fallback** ⚠️