Rule-based method for testing of programming segments
First Claim
1. A method for determining a set of flow paths in a code listing as being the most likely ones to fail, the method comprising the steps of:
- (a) converting said code listing to a directed acyclic graph (DAG) representation, said DAG including nodes and directed edges, each node representing a basic block of unconditional code statements, a basic block being a code listing that terminates at an exit point once commencing at a starting point, a said exit point being an exit code statement or a conditional code statement, each edge representing an action taken upon the occurrence of a condition in a said conditional code statement;
(b) loading as facts into a knowledge base, said nodes and directed edges from said DAG and unconditional code statements from each said basic block'"'"'s code listing;
(c) loading as rules into said knowledge base, conditional statements from said code listing and determined complexity indicator values for conditional and unconditional code statements;
(d) assigning a weight in each node based upon a combination of complexity indicator values for conditional and unconditional code statements associated with a said node; and
(e) determining a set of ranked flow paths through said code listing by employing said facts and rules, said flow paths ranked in order by analysis of each flow path'"'"'s nodal weights, those flow paths with weights indicating greater complexity being those most likely to fail.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for determining a set of f low paths in a code listing that are most likely to fail comprises the steps of: converting the code listing to a directed acyclic graph representation, the representation including nodes and directed edges, each node representing a basic block of unconditional code statements. The method loads, as facts into a knowledge base, representations of the nodes and edges, and unconditional statements from the basic blocks. The method also loads, as rules into the knowledge base, conditional statements and complexity indicator values for conditional and unconditional statements. Weights are assigned to each node based upon complexity indicator values for statements associated with the node. A determination is then made of a set of flow paths through the code listing, each path ranked in order of assigned weights, those flow paths with larger assigned weights being assumed as those paths most likely to fail.
-
Citations
19 Claims
-
1. A method for determining a set of flow paths in a code listing as being the most likely ones to fail, the method comprising the steps of:
-
(a) converting said code listing to a directed acyclic graph (DAG) representation, said DAG including nodes and directed edges, each node representing a basic block of unconditional code statements, a basic block being a code listing that terminates at an exit point once commencing at a starting point, a said exit point being an exit code statement or a conditional code statement, each edge representing an action taken upon the occurrence of a condition in a said conditional code statement; (b) loading as facts into a knowledge base, said nodes and directed edges from said DAG and unconditional code statements from each said basic block'"'"'s code listing; (c) loading as rules into said knowledge base, conditional statements from said code listing and determined complexity indicator values for conditional and unconditional code statements; (d) assigning a weight in each node based upon a combination of complexity indicator values for conditional and unconditional code statements associated with a said node; and (e) determining a set of ranked flow paths through said code listing by employing said facts and rules, said flow paths ranked in order by analysis of each flow path'"'"'s nodal weights, those flow paths with weights indicating greater complexity being those most likely to fail. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A data processing system that identifies a set of flow paths in a code listing as being the most likely ones to fail, said system comprising:
-
means for converting said code listing to a directed acyclic graph (DAG) representation, said DAG including nodes and directed edges, each node representing a basic block of unconditional code statements that ends with an exit code statement or a conditional code statement and each edge representing an action taken upon the occurrence of a condition in a conditional statement that terminates a basic block; memory means, coupled to said means for converting, for including a knowledge base having facts and rules, said facts including said nodes and directed edges from said DAG and unconditional statements from each said basic block'"'"'s code listing, said rules including conditional statements from said code listing and determined complexity indicator values for said conditional and unconditional statements; and means coupled to said memory means for assigning a weight to each node based upon a combination of complexity indicator values for conditional and unconditional statements associated with said node, said data processing system determining a set of ranked flow paths through said code listing by employing said facts and rules, said flow paths ranked in order by analysis of each flow path'"'"'s nodal weights, those flow paths with weights indicating greater complexity being those most likely to fail. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19)
-
Specification