Patent ID: 7853930

Claim:
A method for annotating an object reference graph for analysis, the method comprising: using a processor for identifying information relevant to at least one memory leak in a computer program; receiving the object reference graph comprising nodes and edges, wherein each of the nodes of the object reference graph represents at least one object in the computer program; forming a spanning tree by traversing the object reference graph beginning at root nodes, in a depth-first manner, while identifying the nodes according to their edge relations; defining ownership relations between the nodes using an immediate dominator analysis; eliminating redundant dominant nodes; iteratively ordering the nodes in the spanning tree according to a containment policy, in order to generate a data stream, wherein the data stream comprises the ordered nodes and at least one edge that represents a relationship between nodes not found in the object reference graph, and wherein the containment policy identifies annotations to be generated to represent the nodes and edges in the data stream; naming the ordered nodes according to their order in the spanning tree; and annotating the nodes in the data stream with the analysis information to produce an annotated output data stream for subsequent analysis, wherein said annotated output data stream preserves the analysis information in a way which allows scalable post-processing of said annotated output data stream to uncover a source of the at least one memory leak.