Rule selection engine
First Claim
1. A computer-implemented method for processing rules, the method comprising:
- providing a static data structure (125) and a dynamic data structure (135) for processing rules,wherein the static data structure represents rules in a rules base and the dynamic data structure includes storage locations for working data produced by processing external facts according to the rules represented in the static data structure,wherein each rule in the rules base is specified according to a set of condition elements, and for each rule the static data structure includes a data vector (256) for said rule such that each element (257) of said vector is associated with a different one of the condition elements according to which the rule is specified, andthe dynamic data structure includes a corresponding vector of storage locations (242) for said rule such that each storage location (243) of said vector corresponds to a different one of the elements (257) of the data vector (256) for said rule in the static data structure (125) and is associated with a different one of the condition elements according to which the rule is specified;
processing a plurality of facts, including accepting a current fact (200) and storing values resulting from evaluation of condition elements that depend on the current fact in storage locations (243) of the dynamic data structure (135) associated with said condition elements; and
determining whether a rule of the rules base is applicable by comparing the elements (257) of the data vector (256) in the static data structure (125) for said rule with the values stored in the corresponding storage locations (243) in the dynamic data structure (135) for said rule.
1 Assignment
0 Petitions
Accused Products
Abstract
A rules-based system makes use of a specification that is similar to those used in earlier systems, such as in OPS5, but does not require the computational complexity of implementations such as Rete. In some such implementations, matching of the applicable rules given a set of facts is simplified by providing preallocated storage locations for the Boolean values of the condition elements for each rule. The Boolean values are set by direct processing of each of the facts. These preallocated storage locations are arranged to allow efficient evaluation of the overall condition of each of the rules in a manner that is significantly more efficient than implementations of earlier rule-based systems.
-
Citations
4 Claims
-
1. A computer-implemented method for processing rules, the method comprising:
-
providing a static data structure (125) and a dynamic data structure (135) for processing rules, wherein the static data structure represents rules in a rules base and the dynamic data structure includes storage locations for working data produced by processing external facts according to the rules represented in the static data structure, wherein each rule in the rules base is specified according to a set of condition elements, and for each rule the static data structure includes a data vector (256) for said rule such that each element (257) of said vector is associated with a different one of the condition elements according to which the rule is specified, and the dynamic data structure includes a corresponding vector of storage locations (242) for said rule such that each storage location (243) of said vector corresponds to a different one of the elements (257) of the data vector (256) for said rule in the static data structure (125) and is associated with a different one of the condition elements according to which the rule is specified; processing a plurality of facts, including accepting a current fact (200) and storing values resulting from evaluation of condition elements that depend on the current fact in storage locations (243) of the dynamic data structure (135) associated with said condition elements; and determining whether a rule of the rules base is applicable by comparing the elements (257) of the data vector (256) in the static data structure (125) for said rule with the values stored in the corresponding storage locations (243) in the dynamic data structure (135) for said rule. - View Dependent Claims (2, 3, 4)
-
Specification