skip to main content
10.1145/1706299.1706316acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Low-level liquid types

Published:17 January 2010Publication History

ABSTRACT

We present Low-Level Liquid Types , a refinement type system for C based on Liquid Types . Low-Level Liquid Types combine refinement types with three key elements to automate verification of critical safety properties of low-level programs: First, by associating refinement types with individual heap locations and precisely tracking the locations referenced by pointers, our system is able to reason about complex invariants of in-memory data structures and sophisticated uses of pointer arithmetic. Second, by adding constructs which allow strong updates to the types of heap locations, even in the presence of aliasing, our system is able to verify properties of in-memory data structures in spite of temporary invariant violations. By using this strong update mechanism, our system is able to verify the correct initialization of newly-allocated regions of memory. Third, by using the abstract interpretation framework of Liquid Types, we are able to use refinement type inference to automatically verify important safety properties without imposing an onerous annotation burden. We have implemented our approach in CSOLVE, a tool for Low-Level Liquid Type inference for C programs. We demonstrate through several examples that CSOLVE is able to precisely infer complex invariants required to verify important safety properties, like the absence of array bounds violations and null-dereferences, with a minimal annotation overhead.

References

  1. Amal Ahmed, Matthew Fluet, and Greg Morrisett. L3: A linear language with locations. Fundam. Inf., 77(4):397--449, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Alex Aiken, Jeffrey S. Foster, John Kodumal, and Tachio Terauchi. Checking and inferring local non-aliasing. In PLDI, pages 129--140, New York, NY, USA, 2003. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. T. Ball and S. K. Rajamani. The SLAM project: debugging system software via static analysis. In POPL. ACM, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. Bengtson, K. Bhargavan, C. Fournet, A. D. Gordon, and S. Maffeis. Refinement types for secure implementations. In CSF, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. B. Blanchet, P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Mine, D. Monniaux, and X. Rival. A static analyzer for large safety-critical software. In PLDI, pages 196--207. ACM, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Calcagno, D. Distefano, P. W. O'Hearn, and H. Yang. Compositional shape analysis by means of bi-abduction. In POPL, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. Chaki, J. Ouaknine, K. Yorav, and E.M. Clarke. Automated compositional abstraction refinement for concurrent C programs: A two-level approach. In SoftMC, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  8. B. E. Chang and X. Rival. Relational inductive shape analysis. In POPL, pages 247--260, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. Condit, B. Hackett, S. Lahiri, and S. Qadeer. Unifying type checking and property checking for low-level code. In POPL, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. Condit, M. Harren, Z. Anderson, D. Gay, and G. C. Necula. Dependent types for low-level programming. In ESOP, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J. Condit, M. Harren, S. McPeak, G. Necula, and W. Weimer. Ccured in the real world. In PLDI, pages 232--244, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Fahndrich and R. DeLine. Adoption and focus: Practical linear types for imperative programming. In PLDI. ACM, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J-C. Filliâtre and C. Marché. The why/krakatoa/caduceus platform for deductive program verification. In CAV, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. Flanagan. Hybrid type checking. In POPL. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. C. Flanagan, K.R.M. Leino, M. Lillibridge, G. Nelson, J. B. Saxe, and R. Stata. Extended static checking for Java. In PLDI, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J.S. Foster, T. Terauchi, and A. Aiken. Flow-sensitive type qualifiers. In PLDI, pages 1--12. ACM, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. T.A. Henzinger, R. Jhala, R. Majumdar, and K.L. McMillan. Abstractions from proofs. In POPL 04. ACM, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. H. Jain, F. Ivancic, A. Gupta, I. Shlyakhter, and C. Wang. Using statically computed invariants inside the predicate abstraction and refinement loop. In CAV, pages 137--151, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. JOS. Jos: An operating system kernel. http://pdos.csail.mit.edu/6.828/2005/overview.html.Google ScholarGoogle Scholar
  20. M. Kawaguchi, P. Rondon, and R. Jhala. Type-based data structure verification. In PLDI, pages 304--315, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. C. Lee, M. Potkonjak, and W. H. Mangione-Smith. Mediabench: A tool for evaluating and synthesizing multimedia and communicatons systems. In MICRO, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. T. Lev-Ami and S. Sagiv. TVLA: A system for implementing static analyses. In SAS, LNCS 1824, pages 280--301. Springer, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. A. Nanevski, G. Morrisett, A. Shinnar, P. Govereau, and L. Birkedal. Ynot: Reasoning with the awkward squad. In ICFP, 2008.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. H. H. Nguyen, C. David, S. Qin, and W-N. Chin. Automated verification of shape and size properties via separation logic. In VMCAI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. X. Ou, G. Tan, Y. Mandelbaum, and D. Walker. Dynamic typing with dependent types. In IFIP TCS, pages 437--450, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  26. The GNU Project. GNU coreutils. http://www.gnu.org/.Google ScholarGoogle Scholar
  27. Z. Rakamaric, J. D. Bingham, and A. J. Hu. An inference-rule-based decision procedure for verification of heap-manipulating programs with mutable data and cyclic data structures. In VMCAI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. P. Rondon, M. Kawaguchi, and R. Jhala. Low-level liquid types: Technical report. http://pho.ucsd.edu/liquid.Google ScholarGoogle Scholar
  29. P. Rondon, M. Kawaguchi, and R. Jhala. Liquid types. In PLDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. D. Walker and J.G. Morrisett. Alias types for recursive data structures. In Types in Compilation 2000, pages 177--206. Springer-Verlag, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. R. P. Wilson and M. S. Lam. Efficient context-sensitive pointer analysis for c programs. In PLDI, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. H. Xi and F. Pfenning. Dependent types in practical programming. In POPL, pages 214--227, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Y. Xie and A. Aiken. Scalable error detection using boolean satisfiability. In POPL, pages 351--363, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. K. Zee, V. Kuncak, and M. C. Rinard. Full functional verification of linked data structures. In PLDI, pages 349--361, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. D. Zhu and H. Xi. Safe programming with pointers through stateful views. In PADL, pages 83--97. Springer, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Low-level liquid types

                Recommendations

                Comments

                Login options

                Check if you have access through your login credentials or your institution to get full access on this article.

                Sign in
                • Published in

                  cover image ACM Conferences
                  POPL '10: Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
                  January 2010
                  520 pages
                  ISBN:9781605584799
                  DOI:10.1145/1706299
                  • cover image ACM SIGPLAN Notices
                    ACM SIGPLAN Notices  Volume 45, Issue 1
                    POPL '10
                    January 2010
                    500 pages
                    ISSN:0362-1340
                    EISSN:1558-1160
                    DOI:10.1145/1707801
                    Issue’s Table of Contents

                  Copyright © 2010 ACM

                  Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 17 January 2010

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • research-article

                  Acceptance Rates

                  Overall Acceptance Rate824of4,130submissions,20%

                  Upcoming Conference

                  POPL '25

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader