skip to main content
research-article

Underspecified harnesses and interleaved bugs

Published:25 January 2012Publication History
Skip Abstract Section

Abstract

Static assertion checking of open programs requires setting up a precise harness to capture the environment assumptions. For instance, a library may require a file handle to be properly initialized before it is passed into it. A harness is used to set up or specify the appropriate preconditions before invoking methods from the program. In the absence of a precise harness, even the most precise automated static checkers are bound to report numerous false alarms. This often limits the adoption of static assertion checking in the hands of a user.

In this work, we explore the possibility of automatically filtering away (or prioritizing) warnings that result from imprecision in the harness. We limit our attention to the scenario when one is interested in finding bugs due to concurrency. We define a warning to be an interleaved bug when it manifests on an input for which no sequential interleaving produces a warning. As we argue in the paper, limiting a static analysis to only consider interleaved bugs greatly reduces false positives during static concurrency analysis in the presence of an imprecise harness.

We formalize interleaved bugs as a differential analysis between the original program and its sequential version and provide various techniques for finding them. Our implementation CBugs demonstrates that the scheme of finding interleaved bugs can alleviate the need to construct precise harnesses while checking real-life concurrent programs.

Skip Supplemental Material Section

Supplemental Material

popl_1a_2.mp4

References

  1. R. Alur, P. Cerný, P. Madhusudan, and W. Nam. Synthesis of interface specifications for java classes. In Principles of Programming Languages (POPL '05), pages 98--109, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. Barnett and K. R. M. Leino. Weakest-precondition of unstructured programs. In Program Analysis For Software Tools and Engineering (PASTE '05), pages 82--87, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. E. Börger, E. Gradel, and Y. Gurevich. The Classical Decision Problem. Springer-Verlag, 1997.Google ScholarGoogle ScholarCross RefCross Ref
  4. S. Burckhardt, C. Dern, M. Musuvathi, and R. Tan. Line-up: a complete and automatic linearizability checker. In Programming Language Design and Implementation (PLDI '10), pages 330--340, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. Burnim, T. Elmas, G. C. Necula, and K. Sen. Ndseq: runtime checking for nondeterministic sequential specifications of parallel correctness. In Programming Language Design and Implementation (PLDI '11), pages 401--414, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. L. Cordeiro and B. Fischer. Verifying multi-threaded software using smt-based context-bounded model checking. In International Conference on Software Engineering (ICSE '11), pages 331--340, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. Detlefs, G. Nelson, and J. B. Saxe. Simplify: a theorem prover for program checking. J. ACM, 52(3):365--473, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. E. W. Dijkstra. Guarded commands, nondeterminacy and formal derivation of programs. Communications of the ACM, 18:453--457, 1975. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. I. Dillig, T. Dillig, and A. Aiken. Static error detection using semantic inconsistency inference. In Programming Language Design and Implementation (PLDI '07), pages 435--445, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Emmi, S. Qadeer, and Z. Rakamaric. Delay-bounded scheduling. In Principles of Programming Languages, pages 411--422, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. D. R. Engler, D. Y. Chen, and A. Chou. Bugs as inconsistent behavior: A general approach to inferring errors in systems code. In Symposium on Operating Systems Principles (SOSP '01), pages 57--72, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Herlihy and J. M. Wing. Linearizability: A correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst., 12(3):463--492, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. R. Jhala and R. Majumdar. Interprocedural analysis of asynchronous programs. In Principles of Programming Languages, pages 339--350, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. T. Kremenek and D. R. Engler. Z-ranking: Using statistical analysis to counter the impact of static analysis approximations. In Static Analysis Symposium (SAS '03), LNCS 2694, pages 295--315, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Lahiri, S. Qadeer, and Z. Rakamaric. Static and precise detection of concurrency errors in systems code using SMT solvers. In Computer Aided Verification, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. K. R. M. Leino, T. D. Millstein, and J. B. Saxe. Generating error traces from verification-condition counterexamples. Sci. Comput. Program., 55(1--3):209--226, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Poirot: The Concurrency Sleuth. http://research.microsoft.com/en-us/projects/poirot/.Google ScholarGoogle Scholar
  18. K. Sen and M. Viswanathan. Model checking multithreaded programs with asynchronous atomic methods. In Computer Aided Verification, pages 300--314, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. S. F. Siegel, A. Mironova, G. S. Avrunin, and L. A. Clarke. Using model checking with symbolic execution to verify parallel numerical programs. In International Symposium on Software Testing and Analysis (ISSTA '06), pages 157--168, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. O. Tkachuk, M. B. Dwyer, and C. S. Pasareanu. Automated environment generation for software model checking. In Automated Software Engineering (ASE '03), pages 116--129, 2003.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. W. Voung, R. Jhala, and S. Lerner. Relay: static race detection on millions of lines of code. In Symposium on Foundations of Software Engineering (ESEC/SIGSOFT FSE '07), pages 205--214, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Microsoft windows driver kit (WDK). http://www.microsoft.com/whdc/devtools/ddk/default.mspx.Google ScholarGoogle Scholar

Index Terms

  1. Underspecified harnesses and interleaved bugs

            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

            Full Access

            • Published in

              cover image ACM SIGPLAN Notices
              ACM SIGPLAN Notices  Volume 47, Issue 1
              POPL '12
              January 2012
              569 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/2103621
              Issue’s Table of Contents
              • cover image ACM Conferences
                POPL '12: Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
                January 2012
                602 pages
                ISBN:9781450310833
                DOI:10.1145/2103656

              Copyright © 2012 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 25 January 2012

              Check for updates

              Qualifiers

              • research-article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!