Patent ID: 8893102
Filing Date: 2014-11-18
Classification: G06F

Abstract:
1. A method for static analysis to identify a potential program property, comprising: obtaining a plurality of source code; constructing a control flow graph (CFG) corresponding to the plurality of source code, by: extracting, from at least one of the plurality of control structures, a first edge predicate for the first directed graph edge and a second edge predicate for the second directed graph edge, wherein the first edge predicate evaluates to TRUE if the first directed graph edge is taken, and wherein the second edge predicate evaluates to TRUE if the second directed graph edge is taken; assigning a first Boolean flow value corresponding to the potential program property to a selected node of the plurality of graph nodes; backward traversing the CFG from the selected node to a target node of the CFG; computing, by a computer processor and while backward traversing the CFG, a plurality of disjoint predicate expressions representing flow values corresponding to the potential program property at the plurality of directed graph edges, wherein the plurality of disjoint predicate expressions comprises a first disjoint predicate expression for the first directed graph edge, a second disjoint predicate expression for the second directed graph edge, and a third disjoint predicate expression for the third directed graph edge, wherein the third disjoint predicate expression is computed by: computing, by the computer processor and based on the plurality of disjoint predicate expressions, a resulting disjoint predicate expression representing a resulting flow value at the target node; and identifying, based on the resulting disjoint predicate expression, the potential program property in the source code, wherein identification of the potential program property indicates that source code corresponding to the traversed portion of the CFG can be subjected to at least one selected from a group consisting of redundant code reduction and an optimization technique.