Abstract interpretation with a congruence abstract domain and/or a heap succession abstract domain
First Claim
Patent Images
1. A computer system comprising:
- computer memory and a central processing unit; and
a tool stored in the computer memory and executable by the central processing unit, wherein the tool comprises;
plural base domains comprising respective pluralities of base domain variables, wherein at least one of the plural base domains supports analysis of different functions than an other of the plural base domains; and
a congruence domain parameterized by the plural base domains, wherein the congruence domain is configured to infer symmetric relationships, reflexive relationships, transitive relationships, and whether expressions evaluate to a same base domain value;
wherein the tool further comprises at least one equivalence graph mapping alien expressions to the base domain variables, and wherein the equivalence graph tracks equalities between terms and maps equal expressions to a same value, wherein the expressions comprise program text variables or program functions; and
wherein the tool implementing the congruence domain operates in conjunction with the plural base domains to query the plural base domains for a replacement expression for a given expression, wherein the replacement expression does not mention a particular variable.
2 Assignments
0 Petitions
Accused Products
Abstract
Techniques and tools are described for analyzing software. For example, an analysis tool performs abstract interpretation with a congruence abstract domain and/or a heap succession abstract domain. For the congruence abstract domain, the tool tracks equivalence classes between alien expressions and base domain variables. For the heap succession abstract domain, the tool tracks updates to a heap. In either case, to preserve information after updates, the tool may identify an expression having an unreachable value then determine an equivalent expression that lacks the unreachable value.
32 Citations
16 Claims
-
1. A computer system comprising:
-
computer memory and a central processing unit; and a tool stored in the computer memory and executable by the central processing unit, wherein the tool comprises; plural base domains comprising respective pluralities of base domain variables, wherein at least one of the plural base domains supports analysis of different functions than an other of the plural base domains; and a congruence domain parameterized by the plural base domains, wherein the congruence domain is configured to infer symmetric relationships, reflexive relationships, transitive relationships, and whether expressions evaluate to a same base domain value; wherein the tool further comprises at least one equivalence graph mapping alien expressions to the base domain variables, and wherein the equivalence graph tracks equalities between terms and maps equal expressions to a same value, wherein the expressions comprise program text variables or program functions; and wherein the tool implementing the congruence domain operates in conjunction with the plural base domains to query the plural base domains for a replacement expression for a given expression, wherein the replacement expression does not mention a particular variable. - View Dependent Claims (2, 3, 4, 5, 6, 7, 13, 14)
-
-
8. A computer-implemented method comprising:
-
in a computer, representing plural base domains comprising respective pluralities of base domain variables, wherein at least one of the plural base domains supports analysis of different functions than an other of base domains of the plural base domains; in the computer, implementing a congruence domain parameterized by the plural base domains, wherein the implementing comprises inferring symmetric relationships, inferring reflexive relationships, inferring transitive relationships, and inferring whether expressions evaluate to a same base domain value; and in the computer, representing at least one equivalence graph mapping alien expressions to the base domain variables, wherein the representing comprises tracking equalities between terms and mapping equal expressions to a same value, wherein the expressions comprise program text variables or program functions; identifying, for one of the base domains, an expression having one or more unreachable values; determining an equivalent expression that lacks the one or more unreachable values; requesting the equivalent expression from another base domain for use in the determining the equivalent expression; if available via the requesting, receiving the requested equivalent expression, and replacing the expression of the one of the base domains that has the one or more unreachable values with the requested equivalent expression; and otherwise, removing mapping with the one or more unreachable values from the equivalence graph, and eliminating the one or more unreachable values from the one of the base domains. - View Dependent Claims (9)
-
-
10. A computer-implemented method comprising:
-
in a computer, representing plural base domains comprising respective pluralities of base domain variables, wherein one or more of the plural base domains supports analysis of different functions than an other of the plural base domains; in the computer, implementing a congruence domain parameterized by the plural base domains, wherein the implementing comprises inferring symmetric relationships, inferring reflexive relationships, inferring transitive relationships, and inferring whether expressions evaluate to a same base domain value; and in the computer, representing at least one equivalence graph mapping alien expressions to the base domain variables, wherein the representing comprises tracking equalities between terms and mapping equal expressions to a same value, wherein the expressions comprise program text variables or program functions; in at least one of the plural base domains, tracking one or more updates to a memory pool, wherein software implementing the at least one of the plural base domains facilitates replacement of expressions having one or more unreachable values; and for an unreachable heap; if a heap successor exists, providing the heap successor for replacement of the unreachable heap; and otherwise, eliminating the unreachable heap; wherein the at least one of the plural base domains includes one or more succession predicates for the tracking, and wherein each of the one or more succession predicates indicates one of the one or more updates. - View Dependent Claims (11, 12)
-
-
15. One or more computer-readable storage media having encoded thereon computer-executable instruction causing a computer to perform a method comprising:
-
in the computer, representing plural base domains comprising respective pluralities of base domain variables, wherein at least one of the plural base domains supports analysis of different functions than an other of the plural base domains; in the computer, implementing a congruence domain parameterized by the plural base domains, wherein the implementing comprises inferring symmetric relationships, inferring reflexive relationships, inferring transitive relationships, and inferring whether expressions evaluate to a same base domain value; and in the computer, representing at least one equivalence graph mapping alien expressions to the base domain variables, wherein the representing comprises tracking equalities between terms and mapping equal expressions to a same value, wherein the expressions comprise program text variables or program functions; wherein at least one of the plural base domains comprises a heap succession abstract domain configured to track updates to a heap; and wherein the heap succession abstract domain performs a method comprising; for an unreachable heap; if a heap successor exists, providing a heap successor for replacement of the unreachable heap; and otherwise, eliminating the unreachable heap. - View Dependent Claims (16)
-
Specification