Patent ID: 8856765

Claim:
A method for analyzing a pointer in an analysis target program or a partial program thereof by processing by a computer, the method comprising the computer executing the steps of: creating a flow-insensitive point-to graph for the program in memory by a compiler, with a compiling target method as a target, the point-to graph being a graph with variables, or variables and at least one of methods and objects as nodes and with objects pointed to by the variables as edges, wherein on condition that an object for which it is desired to detect an access position is identified, creating a first flow-insensitive point-to graph for a first method generating the identified object; and detecting whether or not the object for which it is desired to detect the access position escapes to a first caller method or a first callee method, using the first point-to graph, the detecting step comprising preparing a first load node in the first point-to graph and updating the first point-to graph on condition that a field of at least one object in the first point-to graph is (i) reachable from the first caller method or the first callee method and (ii) in a state of not pointing to the object in the first point-to graph, wherein the first load node is used to detect whether or not the object for which it is desired to detect the access position escapes in the updated first point-to graph; and on condition that the object for which it is desired to detect the access position does not escape to the first caller method or the first callee method, detecting a position to access the object for which it is desired to detect the access position, by following the updated first point-to graph if the first load node is prepared and by following the first point-to graph if the first load node is not prepared.