Skip to main content

Towards Complete Specifications with an Error Calculus

  • Conference paper
NASA Formal Methods (NFM 2013)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7871))

Included in the following conference series:

Abstract

We present an error calculus to support a novel specification mechanism for sound and/or complete safety properties that are to be given by users. With such specifications, our calculus can form a foundation for both proving program safety and/or discovering real bugs. The basis of our calculus is an algebra with a lattice domain of four abstract statuses (namely unreachability, validity, must-error and may-error) on possible program states and four operators for this domain to calculate suitable program status.We show how proof search and error localization can be supported by our calculus. Our calculus can also be extended to separation logic with support for user-defined predicates and lemmas.We have implemented our calculus in an automated verification tool for pointer-based programs. Initial experiments have confirmed that it can achieve the dual objectives, namely of safety proving and bug finding, with modest overheads.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. VSTTE 2012 Software Verification Competition (2012), https://sites.google.com/site/vstte2012/compet (accessed July 27, 2012)

  2. Chin, W.N., David, C., Nguyen, H.H., Qin, S.: Automated verification of shape, size and bag properties via user-defined predicates in separation logic. Sci. Comput. Program. 77(9), 1006–1036 (2012)

    Article  MATH  Google Scholar 

  3. Csallner, C., Smaragdakis, Y., Xie, T.: DSD-Crasher: A hybrid analysis tool for bug finding. ACM Trans. Softw. Eng. Methodol. 17(2) (2008)

    Google Scholar 

  4. de Moura, L., Bjørner, N.: Z3: An Efficient SMT Solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  5. Dillig, I., Dillig, T., Aiken, A.: Reasoning about the unknown in static analysis. Commun. ACM 53(8), 115–123 (2010)

    Article  Google Scholar 

  6. Dolby, J., Vaziri, M., Tip, F.: Finding bugs efficiently with a SAT solver. In: ESEC/SIGSOFT FSE, pp. 195–204 (2007)

    Google Scholar 

  7. Dolzmann, A., Sturm, T.: Redlog: computer algebra meets computer logic. SIGSAM Bull. 31, 2–9 (1997)

    Article  Google Scholar 

  8. Flanagan, C., Leino, K.R.M., Lillibridge, M., Nelson, G., Saxe, J.B., Stata, R.: Extended static checking for Java. In: PLDI, pp. 234–245 (2002)

    Google Scholar 

  9. Gherghina, C., David, C., Qin, S., Chin, W.-N.: Structured specifications for better verification of heap-manipulating programs. In: Butler, M., Schulte, W. (eds.) FM 2011. LNCS, vol. 6664, pp. 386–401. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  10. Godefroid, P., Nori, A.V., Rajamani, S.K., Tetali, S.D.: Compositional may-must program analysis: unleashing the power of alternation. In: POPL 2010, pp. 43–56. ACM (2010)

    Google Scholar 

  11. Hoenicke, J., Leino, K.R.M., Podelski, A., Schäf, M., Wies, T.: It’s doomed; we can prove it. In: Cavalcanti, A., Dams, D.R. (eds.) FM 2009. LNCS, vol. 5850, pp. 338–353. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  12. Hyunsook, D., Sebastian, E., Gregg, R.: Supporting controlled experimentation with testing techniques: An infrastructure and its potential impact. Empirical Softw. Engg. 10, 405–435 (2005)

    Article  Google Scholar 

  13. Jackson, D., Vaziri, M.: Finding bugs with a constraint solver. In: ISSTA 2000, pp. 14–25 (2000)

    Google Scholar 

  14. Jose, M., Majumdar, R.: Cause clue clauses: error localization using maximum satisfiability. In: PLDI, pp. 437–446. ACM, New York (2011)

    Google Scholar 

  15. Klarlund, N., Moller, A.: MONA Version 1.4 - User Manual. BRICS Notes Series (2001)

    Google Scholar 

  16. Le, Q.L., Sharma, A., Craciun, F., Chin, W.-N.: Towards complete specifications with error calculus. Technical report, SoC, National Univ. of Singapore (July 2012), http://www.comp.nus.edu.sg/~locle/papers/mme.pdf

  17. Leino, K.R.M., Schulte, W.: Exception safety for c#. In: SEFM, pp. 218–227 (2004)

    Google Scholar 

  18. Nguyen, H.H., Chin, W.-N.: Enhancing program verification with lemmas. In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 355–369. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  19. O’Hearn, P.W.: Tutorial on separation logic (Invited tutorial). In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 19–21. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  20. Popeea, C., Chin, W.N.: Dual analysis for proving safety and finding bugs. In: SAC (2010)

    Google Scholar 

  21. Pugh, W.: The Omega Test: A fast practical integer programming algorithm for dependence analysis. Communications of the ACM 8, 102–114 (1992)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Le, Q.L., Sharma, A., Craciun, F., Chin, WN. (2013). Towards Complete Specifications with an Error Calculus. In: Brat, G., Rungta, N., Venet, A. (eds) NASA Formal Methods. NFM 2013. Lecture Notes in Computer Science, vol 7871. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-38088-4_20

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-38088-4_20

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-38087-7

  • Online ISBN: 978-3-642-38088-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics