Simulated program execution error detection method and apparatus
First Claim
1. A method for simulating execution of a computer program to detect programming errors in said computer program, said computer program containing at least one function, said function containing one or more statements, said method comprising:
- retrieving a representation of said computer program;
traversing a first control flow path through said function wherein said first control flow path comprises a first sequence of said statements, wherein said traversing comprises;
maintaining a first structural memory model for said function over said first control flow path;
manipulating said first structural memory model to simulate execution of said first sequence of said statements;
detecting an invalid condition in said first structural memory model; and
reporting said invalid condition in said first structural memory model.
5 Assignments
0 Petitions
Accused Products
Abstract
A computer program error detection system that detects errors in a computer program by simulating execution of program statements. An internal format structure is retrieved along with a list of all functions defined by the computer program. The internal format structure is analyzed to determine all function calls and the function call ordering. External behavior models corresponding to the discovered function calls are retrieved and stored in a model table. One or more control flow paths are traversed through the computer program. For each path traversed, a structural memory model is maintained to represent the effect of the simulated execution of statements along the control flow path. A statement is simulated by executing a built in model of the operation. A function call is emulated by executing an external behavior model corresponding to the called function. Execution of an external behavior model causes the structural model memory to be updated to reflect execution of the called function. Information describing the manipulation of the memory model is logged for automodelling purposes. Invalid conditions in the structural memory model are detected and reported. The information logged for automodelling purposes is scanned after analysis of each path to build an outcome for that path. After individual path analysis completes, the different outcomes are processed, duplicates are removed, and an external behavior model representing the computer program under analysis is generated.
182 Citations
41 Claims
-
1. A method for simulating execution of a computer program to detect programming errors in said computer program, said computer program containing at least one function, said function containing one or more statements, said method comprising:
-
retrieving a representation of said computer program; traversing a first control flow path through said function wherein said first control flow path comprises a first sequence of said statements, wherein said traversing comprises; maintaining a first structural memory model for said function over said first control flow path; manipulating said first structural memory model to simulate execution of said first sequence of said statements; detecting an invalid condition in said first structural memory model; and reporting said invalid condition in said first structural memory model. - 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. A method for simulating execution of a computer program to detect programming errors in said computer program, said computer program containing at least one function, said function containing zero statements, said method comprising:
-
retrieving a representation of said computer program; traversing a control flow path through said function wherein said control flow path comprises zero statements, wherein said traversing comprises; maintaining a structural memory model for said function over said control flow path; logging information describing said function to produce a logged data; and automodelling said function to generate an external behavior model corresponding to said function, wherein said automodelling comprises; scanning said logged data to produce an outcome for said control flow path. - View Dependent Claims (24)
-
-
25. A method for simulating execution of a computer program to detect programming errors in said computer program, said computer program containing one or more statements, said method comprising:
-
retrieving a representation of said computer program; traversing a first control flow path through said computer program wherein said first control flow path comprises a first sequence of said statements, wherein said traversing comprises; maintaining a first structural memory model for said computer program over said first control flow path; manipulating said first structural memory model to simulate execution of said first sequence of said statements; detecting invalid conditions in said first structural memory model; and reporting said invalid conditions in said first structural memory model. - View Dependent Claims (26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39)
-
-
40. An error detection processor for detecting errors in a computer program, said computer program comprising one or more statements, said error detection processor comprising:
-
a structural memory model which represents the behavior of said computer program upon a simulation; an analysis engine which traverses a control flow path through said computer program, wherein said control flow path is comprised of a sequence of said statements; a statement unit which simulates the effect of said statements in the said control flow path; and an error generation unit which reports invalid conditions detected within said structural memory model after said simulation. - View Dependent Claims (41)
-
Specification