Patent ID: 6308321
Filing Date: 2001-10-23
Classification: G06F

Abstract:
A method of generating a program control flow definition from the program code, comprising:maintaining a block worklist which comprises a list of all known blocks within the program and which defines a control flow for the computer program; andmaintaining a block entry worklist which comprises a list of all known block entry points whose blocks are unknown; andanalyzing each block entry point in the block entry worklist by placing a block beginning with the block entry point into the block worklist when an end of the block is encountered, and by placing new block entry points determined by the block end into the block entry list, while using constant propagation to determine computed block entry points, such that when there are no more block entry points, the block worklist represents a control flow graph of the program, the step of analyzing further comprisinga) determining entry points in the program;b) following code from an entry point to a branch or jump instruction to define a code block;c) from the block branch or jump instruction, identifying another entry point and repeating step b for each entry point having a known value to create a partial control flow definition;d) for entry points having unknown values, performing a constant propagation analysis on the partial control flow definition to convert unknown entry point values to known values; ande) from entry points determined in step d, repeating steps b and c to extend the control flow definition.