Statically Inferring Complex Heap, Array, and Numeric Invariants

  • Bill McCloskey
  • Thomas Reps
  • Mooly Sagiv
Conference paper

DOI: 10.1007/978-3-642-15769-1_6

Part of the Lecture Notes in Computer Science book series (LNCS, volume 6337)
Cite this paper as:
McCloskey B., Reps T., Sagiv M. (2010) Statically Inferring Complex Heap, Array, and Numeric Invariants. In: Cousot R., Martel M. (eds) Static Analysis. SAS 2010. Lecture Notes in Computer Science, vol 6337. Springer, Berlin, Heidelberg


We describe Deskcheck, a parametric static analyzer that is able to establish properties of programs that manipulate dynamically allocated memory, arrays, and integers. Deskcheck can verify quantified invariants over mixed abstract domains, e.g., heap and numeric domains. These domains need only minor extensions to work with our domain combination framework.

The technique used for managing the communication between domains is reminiscent of the Nelson-Oppen technique for combining decision procedures, in that the two domains share a common predicate language to exchange shared facts. However, whereas the Nelson-Oppen technique is limited to a common predicate language of shared equalities, the technique described in this paper uses a common predicate language in which shared facts can be quantified predicates expressed in first-order logic with transitive closure.

We explain how we used Deskcheck to establish memory safety of the thttpd web server’s cache data structure, which uses linked lists, a hash table, and reference counting in a single composite data structure. Our work addresses some of the most complex data-structure invariants considered in the shape-analysis literature.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Bill McCloskey
    • 1
  • Thomas Reps
    • 2
    • 3
  • Mooly Sagiv
    • 4
    • 5
  1. 1.University of CaliforniaBerkeleyUSA
  2. 2.University of WisconsinMadisonUSA
  3. 3.GrammaTech, Inc.IthacaUSA
  4. 4.Tel-Aviv UniversityTel-AvivIsrael
  5. 5.Stanford UniversityStanfordUSA

Personalised recommendations