Skip to main content
Log in

Expressive program verification via structured specifications

  • TASE 12
  • Published:
International Journal on Software Tools for Technology Transfer Aims and scope Submit manuscript

Abstract

Conventional specifications typically have a flat structure that is based primarily on the underlying logic. Such specifications lack structures that could provide better guidance to the verification process. In this work, we propose to add three new structures to a specification framework for separation logic to achieve a more precise and better guided verification for pointer-based programs. The newly introduced structures empower users with more control over the verification process in the following ways: (1) case analysis can be invoked to take advantage of disjointedness conditions in the logic, (2) early, as opposed to late, instantiation can minimise the use of existential quantification and (3) novel formulae structuring can provide better reuse of the verification process. Initial experiments have shown that structured specifications can lead to more precise verification without incurring any performance overhead. To support our proposal, we shall illustrate the usage of structured specifications in the context of proving termination and we will briefly outline the impact of our proposal on a recent development focussed on verifying the FreeRTOS scheduler Ferreira et al. (Int. J. Softw. Tools Technol. Trans. 2014).

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

Notes

  1. which can be automatically enforced by checking that the conjunction of any two case guards is unsatisfiable and that the disjunction of all guards is valid.

  2. For presentation simplicity, we have used \(\varPhi _1{\vdash }^{\kappa }_{V}\mathsf{Q }_2\,{*}\,\varPhi _R\) as a shorthand for \(\varPhi _1{\vdash }^{\kappa }_{V}\mathsf{Q }_2\,{*}\,\{\varPhi _R\}\) and \(\varPhi _1{\vdash }^{\kappa }_{V}\mathsf{Q }_2\) for \(\varPhi _1{\vdash }^{\kappa }_{V}\mathsf{Q }_2\,{*}\,\{{\mathtt{emp}}\}\).

References

  1. The FreeRTOS\(^{{\rm TM}}\) project website. (2013). URL: http://www.freertos.org

  2. Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# programming system: an overview. In: CASSIS, vol. 3362, pp. 49–69. Springer-Verlag, LNCS, New York (2004)

  3. Berdine, J., Calcagno, C., O’Hearn, P.W.: Smallfoot: modular automatic assertion checking with separation logic. In: FMCO, Springer LNCS 4111, pp. 115–137 (2006)

  4. Brock, B., Kaufmann, M., Moore, J.S.: ACL2 theorems about commercial microprocessors. In: FMCAD, pp. 275–293 (1996)

  5. Bryant, R.E.: Graph-based algorithms for boolean function manipulation. IEEE Trans. Comput. 35, 677–691 (1986)

    Article  MATH  Google Scholar 

  6. Burdy, L., Cheon, Y., Cok, D.R., Ernst, M.D., Kiniry, J.R., Leavens, G.T., Leino, K.R.M., Poll, E.: An overview of JML tools and applications. Int. J. Softw. Tools Technol. Trans. 7(3), 212–232 (2005)

    Google Scholar 

  7. Chang, B.Y.E., Rival, X.: Relational inductive shape analysis. In: POPL, pp. 247–260 (2008)

  8. Chin, W.N., David, C., Nguyen, H.H., Qin, S.: Multiple pre/post specifications for heap-manipulating methods. In: HASE, pp. 357–364 (2007)

  9. 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 

  10. Distefano, D., Parkinson, M.J.: jStar: towards practical verification for Java. In: OOPSLA (2008)

  11. Ferreira, J.F., Gherghina, C., He, G., Qin, S., Chin, W.-N.: Automated verification of the FreeRTOS scheduler in HIP/SLEEK. Int. J. Softw. Tools Technol. Trans (2014). doi:10.1007/s10009-014-307-4

  12. Gherghina, C., David, C., Qin, S., Chin, W.N.: Structured specifications for better verification of heap-manipulating programs. In: FM (2011)

  13. Ishtiaq, S., O’Hearn, P.: BI as an assertion language for mutable data structures. In: POPL, pp. 14–26. London (2001)

  14. Jacobs, B., Smans, J., Piessens, F.: A quick tour of the veriFast program verifier. In: APLAS, pp. 304–311 (2010)

  15. Jonkers, H.B.M.: Upgrading the pre- and postcondition technique. In: VDM, pp. 428–456. Springer-Verlag, London (1991)

  16. Klarlund, N., Moller, A.: MONA Version 1.4-User Manual. BRICS Notes Series (2001). URL: http://citeseer.ifi.unizh.ch/klarlund01mona.html

  17. Le, T.C., Gherghina, C., Hobor, A., Chin, W.N.: A Specification Logic for Termination and Non-Termination Reasoning Tech. rep. National University of Singapore, Singapore (2012)

    Google Scholar 

  18. Leavens, G.T., Baker, A.L.: Enhancing the pre- and postcondition technique for more expressive specifications. In: FM (1999)

  19. Leino, K.R.M.: Dafny: An automatic program verifier for functional correctness. In: LPAR (Dakar), pp. 348–370 (2010)

  20. Parkinson, M.J., Bierman, G.M.: Separation logic and abstraction. In: POPL, pp. 247–258 (2005)

  21. Nguyen, H., David, C., Qin, S., Chin, W.: Automated verification of shape and size properties via separation logic. In: VMCAI. Nice, France (2007)

  22. O’Hearn, P., Yang, H., Reynolds, J.: Separation and information hiding. In: POPL, Venice, Italy (2004)

  23. Pientka, B.: A heuristic for case analysis. Undergraduate thesis, Technical Paper 37, Department of Artificial Intelligence, University of Edinburgh (1995)

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

    Google Scholar 

  25. Reynolds, J.: Separation logic: a logic for shared mutable data structures. In: LICS, pp. 55–74. Copenhagen, Denmark (2002)

  26. Seino, T., Ogato, K., Futatsugi, K.: Mechanically supporting case analysis for verification of distributed systems. IJPCC (2005)

  27. Woodcock, J.: Grand challenge in software verification. In: SBMF (2008)

  28. Zee, K., Kuncak, V., Rinard, M.C.: An integrated proof language for imperative programs. In: PLDI, pp. 338–351. ACM, New York (2009)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shengchao Qin.

Additional information

The work was supported in part by NUS Grant R-252-000-366-112, MoE Grant R-252-000-444-112, EPSRC Grant EP/G042322, and NNSFC Project 61373033.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Gherghina, C., David, C., Qin, S. et al. Expressive program verification via structured specifications. Int J Softw Tools Technol Transfer 16, 363–380 (2014). https://doi.org/10.1007/s10009-014-0306-5

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10009-014-0306-5

Keywords

Navigation