Assertion Checking over Combined Abstraction of Linear Arithmetic and Uninterpreted Functions
This paper presents results on the problem of checking equality assertions in programs whose expressions have been abstracted using combination of linear arithmetic and uninterpreted functions, and whose conditionals are treated as non-deterministic.
We first show that the problem of assertion checking for this combined abstraction is coNP-hard, even for loop-free programs. This result is quite surprising since assertion checking for the individual abstractions of linear arithmetic and uninterpreted functions can be performed efficiently in polynomial time.
Next, we give an assertion checking algorithm for this combined abstraction, thereby proving decidability of this problem despite the underlying lattice having infinite height. Our algorithm is based on an important connection between unification theory and program analysis. Specifically, we show that weakest preconditions can be strengthened by replacing equalities by their unifiers, without losing any precision, during backward analysis of programs.
- 1.Alpern, B., Wegman, M.N., Zadeck, F.K.: Detecting equality of variables in programs. In: 15th Annual ACM Symposium on POPL, pp. 1–11 (1988)Google Scholar
- 2.Baader, F., Schulz, K.: Unification in the union of disjoint equational theories: Combining decision procedures. In: Kapur, D. (ed.) CADE 1992. LNCS (LNAI), vol. 607, pp. 50–65. Springer, Heidelberg (1992)Google Scholar
- 6.Cousot, P., Cousot, R.: Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: 4th Annual ACM Symposium on POPL, pp. 234–252 (1977)Google Scholar
- 7.Cousot, P., Halbwachs, N.: Automatic discovery of linear restraints among variables of a program. In: 5th ACM Symposium on POPL, pp. 84–96 (1978)Google Scholar
- 8.Gulwani, S., Necula, G.C.: Discovering affine equalities using random interpretation. In: 30th Annual ACM Symposium on POPL (January 2003)Google Scholar
- 9.Gulwani, S., Necula, G.C.: Global value numbering using random interpretation. In: 31st Annual ACM Symposium on POPL (January 2004)Google Scholar
- 11.Gulwani, S., Necula, G.C.: Precise interprocedural analysis using random interpretation. In: 32nd Annual ACM Symposium on POPL (January 2005)Google Scholar
- 12.Gulwani, S., Tiwari, A.: Combining abstract interpreters. Submitted for publication (November 2005)Google Scholar
- 13.Gulwani, S., Tiwari, A.: Assertion checking over combined abstraction of linear arithmetic and uninterpreted functions. Technical Report MSR-TR-2006-01, Microsoft Research (January 2006)Google Scholar
- 14.Karr, M.: Affine relationships among variables of a program. In: Acta Informatica, pp. 133–151. Springer, Heidelberg (1976)Google Scholar
- 15.Kildall, G.A.: A unified approach to global program optimization. In: 1st ACM Symposium on POPL, pp. 194–206 (October 1973)Google Scholar
- 17.Müller-Olm, M., Seidl, H.: A note on Karr’s algorithm. In: 31st International Colloquium on Automata, Languages and Programming, pp. 1016–1028 (2004)Google Scholar
- 18.Müller-Olm, M., Seidl, H.: Precise interprocedural analysis through linear algebra. In: 31st ACM Symposium on POPL, pp. 330–341 (January 2004)Google Scholar
- 19.Müller-Olm, M., Seidl, H.: Analysis of modular arithmetic. In: European Symposium on Programming, pp. 46–60 (2005)Google Scholar