# US 2021/0334676 A1 · System and method for differential testing of evolving rules

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0334676 A1
- Document ID: US20210334676A1
- Status: Published application
- Kind: A1
- Application number: 16/858,652
- Filed: 2020-04-26
- Published: 2021-10-28
- Earliest claimed: 2020-04-26
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Saurabh Sinha; Tara Astigarraga; Hao Chen; Lian Xue Hu; Federico Eduardo Carpi; Juan Ariel Brusco Cannata
- Web page: https://patentgrep.com/patent/US20210334676A1

## CPC

- G06N 5/04: Inference or reasoning models
- G06F 16/219: {Managing data history or versioning (querying versioned data G06F16/2474; querying temporal data G06F16/2477)}
- G06F 16/2358: {Change logging, detection, and notification (replication G06F16/27)}
- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06Q 10/10: Office automation; Time management
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR

## Abstract

A computer implemented method for testing rules by a computing device including selecting a current version of a rule and prior version of the rule, comparing the prior version of the rule and the current version of the rule to each other to identify a type of change made in the current version of the rule with respect to the prior version of the rule, and testing the prior version of a rule and the current version of the rule using a common data set, the testing being based on the identified type of change. The test result is provided to a user.

## Claims

### Claim 1

A computer implemented method for testing rules by a computing device, comprising:
selecting a current version of a rule and prior version of the rule;
comparing the prior version of the rule and the current version of the rule to each other to identify a type of change made in the current version of the rule with respect to the prior version of the rule;
testing the prior version of the rule and the current version of the rule using a common data set, the test being based on the identified type of change; and
providing a result of the test to a user.

### Claim 2 (depends on 1)

The computer implemented method of claim 1, wherein the rule includes a guard part and a command part, the method further comprising:
determining whether the type of change is an addition of a condition, a deletion of a condition, or a modification of a condition to a guard part of the current version of the rule with respect to the prior version of the rule.

### Claim 3 (depends on 2)

The computer implemented method of claim 2, wherein, when the change is determined to be an addition to the guard part of the current version of the rule with respect to the prior version of the rule, an expected result of the testing is fewer instances from running the common data set on the new version of the rule than from running the common data set on the new version of the rule, the method further comprising:
comparing the result of the testing to an expected result of the testing; and
flagging the result of the testing for the user if it is determined that the expected result is not met.

### Claim 4 (depends on 2)

The computer implemented method of claim 2, wherein, when the type of change is a deletion to the guard part of the current version of the rule with respect to the prior version of the rule, an expected result of the testing is more instances resulting from running the common data set on the new version of the rule than resulting from running the common data set on the prior version of the rule, the method further comprises:
comparing the result of the differential testing to the expected result of the testing; and
flagging the result of the testing for the user if it is determined that the expected result is not met.

### Claim 5 (depends on 1)

The computer implemented method of claim 1, wherein the rule includes a guard part and a command part, the method further comprising:
determining whether the type of change is to the command part of the current version of the rule;
identifying a first dependent rule dependent on the prior version of the rule;
identifying a second dependent rule dependent on the current version of the rule; and
testing the prior version of the rule and the first dependent rule and testing the current version of a rule and the second dependent rule, using the common data set.

### Claim 6 (depends on 5)

The computer implemented method of claim 5, wherein the first dependent rule and the second dependent rule are the same.

### Claim 7 (depends on 1)

The computer implemented method of claim 1, wherein the rule includes a guard part and a command part, the method further comprising selecting the current version of the rule by:
comparing a current version of the rule and a prior version of the rule to determine whether the guard part or the command part of the current version of the rule is changed with respect to the prior version of the rule; and
selecting the current version of the rule from a set of rules in which the guard part of the current version of the rule or the command part of the current version of the rule is changed with respect to the prior version of the rule.

### Claim 8

A computing device comprising:
a processing device;
a storage device coupled to the processing device;
sandbox testing engine code stored in the storage device, wherein execution of the code by the processing device causes the computing device to:
select a current version of a rule and prior version of the rule;
compare the prior version of the rule and the current version of the rule to each other to identify a type of change made in the current version of the rule with respect to the prior version of the rule;
test the prior version of a rule and the current version of the rule using a common data set, the testing being based on the identified type of change; and
provide a result of the test to a user.

### Claim 9 (depends on 8)

The computing device of claim 8, wherein the rule includes a guard part and a command part, and execution of the code by the processing device further causes the computing device to determine whether the type of change is an addition of a condition, a deletion of a condition, or a modification of a condition to the guard part of the current version of the rule with respect to the prior version of the rule.

### Claim 10 (depends on 9)

The computing device of claim 9, wherein, when the change is determined to be an addition to the guard part of the current version of the rule with respect to the prior version of the rule, an expected result of the test is fewer instances from running the common data set on the new version of the rule than from running the common data set on the new version of the rule, and execution of the code by the processing device further causes the computing device to:
compare the result of the test to expected results of the testing; and
flag the result of the testing for the user if it is determined that the expected result is not met.

### Claim 11 (depends on 9)

The computing device claim 9, wherein, when the type of change is a deletion to the guard part of the current version of the rule with respect to the prior version of the rule, an expected result of the test is more instances resulting from running the common data set on the new version of the rule than resulting from running the common data set on the prior version of the rule, and execution of the code by the processing device further causes the computing device to:
compare the result of the test to expected result of the testing; and
flag the result for the user if it is determined that the expected result is not met.

### Claim 12 (depends on 9)

The computing device claim 9 wherein the rule includes a guard part and a command part and when it is determined that the type of change is to the command part of the current version of the rule, execution of the code by the processing device further causes the computing device to:
identify a first dependent rule dependent on the prior version of the rule;
identify a second dependent rule dependent on the current version of the rule; and
test the prior version of the rule and the first dependent rule and test the current version of a rule and the second dependent rule, using the common data set.

### Claim 13 (depends on 12)

The computing device of claim 12, wherein the first dependent rule and the second dependent rule are the same.

### Claim 14 (depends on 8)

The computing device claim 8, wherein the rule includes a guard part and a command part and execution of the code by the processing device further causes the computing device to select the current version of the rule by:
comparing a current version of the rule and a prior version of the rule to determine whether the guard part or the command part of the current version of the rule is changed with respect to the prior version of the rule; and
selecting the current version of the rule from a set of rules in which the guard part of the current version of the rule or the command part of the current version of the rule is changed with respect to the prior version of the rule.

### Claim 15

A non-transitory computer readable storage medium tangibly embodying a computer readable program code having computer readable instructions that, when executed, causes a computing device to test rules by:
selecting a current version of a rule and prior version of the rule;
comparing the prior version of the rule and the current version of the rule to each other to identify a type of change made in the current version of the rule with respect to the prior version of the rule;
testing the prior version of a rule and the current version of the rule using a common data set, the testing being based on the identified type of change; and
providing a result of the test to a user.

### Claim 16 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein the rule includes a guard part and a command part and execution of the computer readable instructions causes the computing device to:
determine whether the type of change is an addition of a condition, a deletion of a condition, or a modification of a condition to a guard part of the current version of the rule with respect to the prior version of the rule.

### Claim 17 (depends on 16)

The non-transitory computer readable storage medium of claim 16, wherein, when the change is determined to be an addition to the guard part of the current version of the rule with respect to the prior version of the rule, an expected result is fewer instances from running the common data set on the new version of the rule than from running the common data set on the new version of the rule, and execution of the computer readable instructions causes the computing device to:
compare the result of the testing to the expected result of the testing; and
flag the result for the user if it is determined that the expected result is not met.

### Claim 18 (depends on 16)

The non-transitory computer readable storage medium of claim 16, wherein, when the type of change is a deletion to the guard part of the current version of the rule with respect to the prior version of the rule, an expected result of the testing is more instances resulting from running the common data set on the new version of the rule than resulting from running the common data set on the prior version of the rule, and execution of the computer readable instructions causes the computing device to:
compare the result of the testing to the expected result of the testing; and
flag the result for the user if it is determined that the expected result is not met.

### Claim 19 (depends on 15)

The non-transitory computer readable storage medium of claim 15, wherein the rule includes a guard part and a command part and execution of the computer readable instructions causes the computing device to:
determine whether the type of change is to a command part of the current version of the rule;
identify a first dependent rule dependent on the prior version of the rule;
identify a second dependent rule dependent on the current version of the rule; and
test the prior version of the rule and the first dependent rule and test the current version of a rule and the second dependent rule, using the common data set.

### Claim 20 (depends on 19)

The non-transitory computer readable storage medium of claim 19, wherein the first dependent rule and the second dependent rule are the same.
