Methods for enhancing program analysis
First Claim
Patent Images
1. A computer-implemented method for checking a model of a program, comprising:
- receiving a graph having a set of vertices and a successor function;
initializing sets of path edges, sets of summary edges, and a work list;
removing a vertex having a type from the work list; and
analyzing the vertex based on the type so as to determine the reachability status of the vertex in the set of vertices, wherein analyzing includes updating a set of path edges associated with the vertex by using a transfer function associated with the vertex, wherein updating includes executing the following acts;
receiving a vertex argument and a path edge argument, forming a union of the set of path edges associated with the vertex argument and the path edge argument if the path edge argument is not a subset of the set of path edges associated with the vertex argument, and inserting the vertex argument into the work list.
2 Assignments
0 Petitions
Accused Products
Abstract
Methods are discussed that enhance program analysis. One aspect of the invention includes a method for checking a model of a program. The method includes a control-flow graph having vertices from the model, applying a transfer function to each vertex to form a set of path edges, and analyzing the set of path edges of a vertex. The set of path edges includes valuations that are implicitly represented so as to inhibit an undesired explosion in the valuations that would hinder the act of analyzing.
41 Citations
24 Claims
-
1. A computer-implemented method for checking a model of a program, comprising:
-
receiving a graph having a set of vertices and a successor function;
initializing sets of path edges, sets of summary edges, and a work list;
removing a vertex having a type from the work list; and
analyzing the vertex based on the type so as to determine the reachability status of the vertex in the set of vertices, wherein analyzing includes updating a set of path edges associated with the vertex by using a transfer function associated with the vertex, wherein updating includes executing the following acts;
receiving a vertex argument and a path edge argument, forming a union of the set of path edges associated with the vertex argument and the path edge argument if the path edge argument is not a subset of the set of path edges associated with the vertex argument, and inserting the vertex argument into the work list. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A computer-implemented method for generating a trace for a model of a program, comprising:
-
forming a control-flow graph having vertices from the model;
applying a transfer function to each vertex to form a set of path edges;
analyzing the set of path edges of a vertex;
tagging a unit length that the trace takes to reach the vertex from another vertex;
iterating the act of applying, analyzing, and tagging so as to form at least one trace to a vertex that is reachable in the model, wherein the at least one trace includes multiple unit lengths that form a length of the at least one trace; and
finding a shortest trace having a length, wherein the shortest trace is a subset of the at least one trace, wherein finding includes finding a predecessor vertex that has the length minus a unit length and iterating the act of finding the predecessor to find another predecessor vertex that has the length minus an additional unit length until no predecessor vertex can be found. - View Dependent Claims (13, 14)
-
-
15. A computer-implemented method for generating a trace for a model of a program, comprising:
-
forming a set of rings associated with each vertex of the model;
finding a ring such that a set of path edges of a reachable vertex exists; and
analyzing the reachable vertex based on a type of the reachable vertex so as to generate a trace from the entry of the main procedure of the program to the reachable vertex, wherein analyzing includes analyzing two cases if the reachable vertex is not an index of the first statement in a procedure containing the reachable vertex, wherein analyzing includes analyzing one of the two cases if a statement of the reachable vertex is not a skip statement immediately following a procedure call, wherein analyzing includes finding a predecessor vertex of the reachable vertex such that two conditions exist. - View Dependent Claims (16, 17)
-
-
18. A computer-implemented method for generating a trace for a model of a program, comprising:
-
forming a set of rings associated with each vertex of the model;
finding a ring such that a set of path edges of a reachable vertex exists; and
analyzing the reachable vertex based on a type of the reachable vertex so as to generate a trace from the entry of the main procedure of the program to the reachable vertex, wherein analyzing includes analyzing two cases if the reachable vertex is not an index of the first statement in a procedure containing the reachable vertex, wherein analyzing includes analyzing the other of the two cases if a statement of the reachable vertex is a skip statement immediately following a procedure call, wherein analyzing includes finding a predecessor vertex of the reachable vertex such that two conditions exist. - View Dependent Claims (19, 20)
-
-
21. A computer-implemented method for generating a trace for a model of a program, comprising:
-
forming a set of rings associated with each vertex of the model;
finding a ring such that a set of path edges of a reachable vertex exists; and
analyzing the reachable vertex based on a type of the reachable vertex so as to generate a trace from the entry of the main procedure of the program to the reachable vertex, wherein analyzing includes analyzing a predecessor vertex of the reachable vertex if the reachable vertex is an index of the first statement in the procedure containing the reachable vertex, wherein a statement associated with the predecessor vertex is a call to a procedure containing the reachable vertex, wherein analyzing includes finding a predecessor vertex according to two conditions, wherein one of the two conditions includes that the predecessor vertex be an element of a set of call vertices, and wherein the other of the two conditions includes an existence of a path edge to the predecessor vertex in the set of path edges associated with the predecessor vertex at a ring one unit less than the ring of the reachable vertex. - View Dependent Claims (22)
-
-
23. A computer-implemented method for checking a model of a program, comprising:
-
receiving a graph having a set of vertices and a successor function;
initializing sets of path edges, sets of summary edges, and a work list, wherein initializing includes setting each set of the sets of path edges to the empty set, wherein each set of the sets of path edges is associated with a vertex in the set of vertices, wherein initializing includes setting each set of the sets of summary edges to the empty set, wherein each set of the summary edges is associated with a vertex in a set of call vertices, wherein the set of call vertices is a subset of the set of vertices that represents call statements in the program;
removing a vertex having a type from the work list; and
analyzing the vertex based on the type so as to determine the reachability status of the vertex in the set of vertices, wherein analyzing includes updating a set of path edges associated with the vertex by using a transfer function associated with the vertex.
-
-
24. A computer-implemented method for generating a trace for a model of a program, comprising:
-
forming a set of rings associated with each vertex of the model;
finding a ring such that a set of path edges of a reachable vertex exists; and
analyzing the reachable vertex based on a type of the reachable vertex so as to generate a trace from the entry of the main procedure of the program to the reachable vertex, wherein analyzing includes analyzing a predecessor vertex of the reachable vertex if the reachable vertex is an index of the first statement in the procedure containing the reachable vertex, wherein a statement associated with the predecessor vertex is a call to a procedure containing the reachable vertex, wherein analyzing includes finding the predecessor vertex and lifting a valuation associated with the reachable vertex to a path edge in the set of path edges associated with the predecessor vertex.
-
Specification