Method and Apparatus for Software Simulation
First Claim
1. A method of software simulation of a target software without actually running or testing the target software, the method comprising the steps of:
- reading a first set of configuration files that contain details of the code to be simulated, the simulation parameters, and output format;
reading a second set of configuration files that contain details of the rules to be applied to the code being simulated;
loading rules which describe the expected behavior of the software, the rules being loaded from said configuration files;
reading said target software program code;
constructing a program model, which is a memory representation of program structure of the target software;
attaching the loaded rules to specific nodes in the program model in accordance with the rules;
running a plurality of simulation algorithms on the target software program without running the target software, to check for defects and obtain metrics and other attributes of the target software code,generating an output with defects and other results reported by the plurality of algorithms; and
displaying the output on an interface.
0 Assignments
0 Petitions
Accused Products
Abstract
A software simulation method and program storage device for software defect detection and obtaining insight into software code is disclosed, where simulation consists of executing target software program code for multiple input values and multiple code paths at the same time, thus achieving 100% coverage over inputs and paths without actually running the target software. This allows simulation to detect many defects that are missed by traditional testing tools. The simulation method runs a plurality of algorithms where a plurality of custom defined and pre-defined rules are verified in target software to find defects and obtain properties of the software code.
-
Citations
55 Claims
-
1. A method of software simulation of a target software without actually running or testing the target software, the method comprising the steps of:
-
reading a first set of configuration files that contain details of the code to be simulated, the simulation parameters, and output format; reading a second set of configuration files that contain details of the rules to be applied to the code being simulated; loading rules which describe the expected behavior of the software, the rules being loaded from said configuration files; reading said target software program code; constructing a program model, which is a memory representation of program structure of the target software; attaching the loaded rules to specific nodes in the program model in accordance with the rules; running a plurality of simulation algorithms on the target software program without running the target software, to check for defects and obtain metrics and other attributes of the target software code, generating an output with defects and other results reported by the plurality of algorithms; and displaying the output on an interface. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51)
-
-
52. A method of constructing a program model further comprising of chunking to split said target program into chunks, where maximum chunk size is specified in a configuration file, wherein chunking of programs further comprises of:
-
measuring size of each class file to be simulated; creating set of chunks containing all classes to be simulated; grouping classes interacting closely in same chunk; ensuring size of classes in each chunk is close to desired said maximum chunk size; creating a tree for directory structure containing said classes to be simulated; labeling nodes of the tree with size of classes; using code package as the starting point of each chunk; creating one chunk for each package; splitting chunks with total size exceeding said maximum chunk size; combining small chunks into larger chunks by a depth-first-traversal on the tree of packages; processing children nodes of each package node; merging child subtree into package nodes chunk if total size is less than said maximum chunk size; removing merged child nodes from tree; rearranging classes of all chunks interacting more closely with classes in a different chunk in post-processing pass; creating a graph with each class as a node; adding edges between two interacting classes; assigning weightage to each edge based on total number of method calls between classes; compute the total interaction weight from of all edges from each class in each chunk; moving a class to a chunk, if chunk with maximum weight is not the class'"'"'s current owner chunk; and continuing movement of classes until chunks have a size which exceeds said maximum chunk size by a certain threshold.
-
-
53. A method of constructing a program model comprising of:
-
constructing a Simulation Call Graph (SCG) for entire program; constructing a Method Flow Graph (MFG) for each method; and linking Call-Site-Basic-Block of caller to said MFG of each callee for each cell site node in said SCG.
-
-
54. A program storage device readable by computer, tangibly embodying a program of instructions executable by said computer to perform a method of software simulation of a target software without actually running or testing the target software, the method comprising the steps of:
-
reading a first set of configuration files that contain details of the code to be simulated, the simulation parameters, and output format; reading a second set of configuration files that contain details of the rules to be applied to the code being simulated; loading rules which describe the expected behavior of the software, the rules being loaded from said configuration files; reading said target software program code; constructing a program model, which is a memory representation of program structure of the target software; attaching the loaded rules to specific nodes in the program model in accordance with the rules; running a plurality of simulation algorithms on the target software program without running the target software, to check for defects and obtain metrics and other attributes of the target software code, generating an output with defects and other results reported by the plurality of algorithms; and displaying the output on an interface.
-
-
55. A program storage device readable by computer, tangibly embodying a program of instructions executable by said computer to perform a method of constructing a program model, the method comprising the steps of:
-
constructing a Simulation Call Graph (SCG) for entire program; constructing a Method Flow Graph (MFG) for each method; and linking Call-Site-Basic-Block of caller to said MFG of each callee for each cell site node in said SCG.
-
Specification