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).
Similar content being viewed by others
Notes
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.
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
The FreeRTOS\(^{{\rm TM}}\) project website. (2013). URL: http://www.freertos.org
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)
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)
Brock, B., Kaufmann, M., Moore, J.S.: ACL2 theorems about commercial microprocessors. In: FMCAD, pp. 275–293 (1996)
Bryant, R.E.: Graph-based algorithms for boolean function manipulation. IEEE Trans. Comput. 35, 677–691 (1986)
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)
Chang, B.Y.E., Rival, X.: Relational inductive shape analysis. In: POPL, pp. 247–260 (2008)
Chin, W.N., David, C., Nguyen, H.H., Qin, S.: Multiple pre/post specifications for heap-manipulating methods. In: HASE, pp. 357–364 (2007)
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)
Distefano, D., Parkinson, M.J.: jStar: towards practical verification for Java. In: OOPSLA (2008)
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
Gherghina, C., David, C., Qin, S., Chin, W.N.: Structured specifications for better verification of heap-manipulating programs. In: FM (2011)
Ishtiaq, S., O’Hearn, P.: BI as an assertion language for mutable data structures. In: POPL, pp. 14–26. London (2001)
Jacobs, B., Smans, J., Piessens, F.: A quick tour of the veriFast program verifier. In: APLAS, pp. 304–311 (2010)
Jonkers, H.B.M.: Upgrading the pre- and postcondition technique. In: VDM, pp. 428–456. Springer-Verlag, London (1991)
Klarlund, N., Moller, A.: MONA Version 1.4-User Manual. BRICS Notes Series (2001). URL: http://citeseer.ifi.unizh.ch/klarlund01mona.html
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)
Leavens, G.T., Baker, A.L.: Enhancing the pre- and postcondition technique for more expressive specifications. In: FM (1999)
Leino, K.R.M.: Dafny: An automatic program verifier for functional correctness. In: LPAR (Dakar), pp. 348–370 (2010)
Parkinson, M.J., Bierman, G.M.: Separation logic and abstraction. In: POPL, pp. 247–258 (2005)
Nguyen, H., David, C., Qin, S., Chin, W.: Automated verification of shape and size properties via separation logic. In: VMCAI. Nice, France (2007)
O’Hearn, P., Yang, H., Reynolds, J.: Separation and information hiding. In: POPL, Venice, Italy (2004)
Pientka, B.: A heuristic for case analysis. Undergraduate thesis, Technical Paper 37, Department of Artificial Intelligence, University of Edinburgh (1995)
Pugh, W.: The Omega Test: A fast practical integer programming algorithm for dependence analysis. Commun. ACM 8, 102–114 (1992)
Reynolds, J.: Separation logic: a logic for shared mutable data structures. In: LICS, pp. 55–74. Copenhagen, Denmark (2002)
Seino, T., Ogato, K., Futatsugi, K.: Mechanically supporting case analysis for verification of distributed systems. IJPCC (2005)
Woodcock, J.: Grand challenge in software verification. In: SBMF (2008)
Zee, K., Kuncak, V., Rinard, M.C.: An integrated proof language for imperative programs. In: PLDI, pp. 338–351. ACM, New York (2009)
Author information
Authors and Affiliations
Corresponding author
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
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
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10009-014-0306-5