ACM Home Page
Please provide us with feedback. Feedback
Unifying type checking and property checking for low-level code
Full text PdfPdf (307 KB)
Source
Annual Symposium on Principles of Programming Languages archive
Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
Savannah, GA, USA
SESSION: Program logics table of contents
Pages 302-314  
Year of Publication: 2009
ISBN:978-1-60558-379-2
Also published in ...
Authors
Jeremy Condit  Microsoft Research, Redmond, WA, USA
Brian Hackett  Stanford University, Stanford, CA, USA
Shuvendu K. Lahiri  Microsoft Research, Redmond, WA, USA
Shaz Qadeer  Microsoft Research, Redmond, WA, USA
Sponsors
ACM: Association for Computing Machinery
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 26,   Downloads (12 Months): 153,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1480881.1480921
What is a DOI?

ABSTRACT

We present a unified approach to type checking and property checking for low-level code. Type checking for low-level code is challenging because type safety often depends on complex, program-specific invariants that are difficult for traditional type checkers to express. Conversely, property checking for low-level code is challenging because it is difficult to write concise specifications that distinguish between locations in an untyped program's heap. We address both problems simultaneously by implementing a type checker for low-level code as part of our property checker.

We present a low-level formalization of a C program's heap and its types that can be checked with an SMT solver, and we provide a decision procedure for checking type safety. Our type system is flexible enough to support a combination of nominal and structural subtyping for C, on a per-structure basis. We discuss several case studies that demonstrate the ability of this tool to express and check complex type invariants in low-level C code, including several small Windows device drivers.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
The Coq proof assistant. http://coq.inria.fr/.
 
2
The HAVOC property checker. http://research.microsoft.com/projects/havoc/.
 
3
 
4
5
6
 
7
T. Ball, B. Hackett, S. K. Lahiri, and S. Qadeer. Annotation-based property checking for systems software. Technical Report MSR-TR-2008-82, Microsoft Research, 2008.
8
 
9
M. Barnett, B.-Y. E. Chang, R. DeLine, B. Jacobs, and K. R. M. Leino. Boogie: A modular reusable verifier for object-oriented programs. In Formal Methods for Components and Objects (FMCO), 2005.
 
10
M. Barnett, K. R. M. Leino, and W. Schulte. The Spec# programming system: An overview. In Construction and Analysis of Safe, Secure, and Interoperable Smart Devices (CASSIS), 2004.
11
 
12
 
13
C. Calcagno, D. Distefano, P. W. O'Hearn, and H. Yang. Beyond reachability: Shape abstraction in the presence of pointer arithmetic. In Static Analysis Symposium (SAS), 2006.
14
 
15
S. Chatterjee, S. K. Lahiri, S. Qadeer, and Z. Rakamaric. A reachability predicate for analyzing low-level software. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 2007.
16
 
17
J. Condit, M. Harren, Z. Anderson, D. Gay, and G. Necula. Dependent types for low-level programming. In European Symposium on Programmig (ESOP), 2007.
18
 
19
L. de Moura and N. Bjorner. Z3: An efficient SMT solver. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 2008.
20
21
 
22
J.-C. Filliatre and C. Marche. The Why/Krakatoa/Caduceus platform for deductive program verification. In Computer Aided Verification (CAV), 2007.
23
24
 
25
26
27
 
28
Microsoft. Windows driver kit. http://www.microsoft.com/whdc/devtools/wdk/default.mspx.
29
30
31
32
33
 
34
 
35
 
36
Satisfiability Modulo Theories Library (SMT-LIB). Available at http://goedel.cs.uiowa.edu/smtlib/.
 
37
W. Schulte, S. Xia, J. Smans, and F. Piessens. A glimpse of a verifying C compiler. In C/C++ Verification Workshop, 2007.
 
38
39
 
40

Collaborative Colleagues:
Jeremy Condit: colleagues
Brian Hackett: colleagues
Shuvendu K. Lahiri: colleagues
Shaz Qadeer: colleagues