Patent ID: 8910134

Claim:
A computer-implemented method for automatically transforming operations performed on data in a directed graph, the method comprising: obtaining a computer-represented graph of nodes, wherein the nodes in the graph include a set S of nodes and a set T of nodes, and wherein the nodes in the set S are connected to the nodes in the set T by directed edges; obtaining a graph analysis computer program relating to the computer-represented graph, wherein the graph analysis program operates on data associated with the nodes in the computer-represented graph; detecting in the graph analysis computer program a neighborhood iterating operation over the nodes in the computer-represented graph by scanning the graph analysis computer program, wherein the neighborhood iterating operation iterates over the nodes in the set S and the nodes in the set T that are neighbors of the nodes in the set S to compute a value of a function based on data associated with the nodes of the set S and the set T; applying a neighbor-flipping transformation to the neighborhood iterating operation to generate a transformed neighborhood iterating operation, wherein the transformed neighborhood iterating operation iterates over the nodes in the set T and the nodes in the set S that are neighbors of the nodes in the set T to compute the value of the function; and wherein the method is performed by a computer system.