Developer-Oriented Correctness Proofs

A Case Study of Cheney’s Algorithm
  • Holger Gast
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6991)


This paper examines the problem of structuring proofs in functional software verification from a novel perspective. By aligning the proofs with the operational behaviour of the program, we allow the formalization of the underlying concepts and their properties to reflect informal correctness arguments. By splitting the proof along the different aspects of the code, we achieve re-use of both theories and proof strategies across algorithms, thus enabling reasoning by analogy as employed in software construction. We demonstrate the viability and usefulness of the approach using a low-level C implementation of Cheney’s algorithm.


Null Pointer Correctness Proof Proof Strategy Object Graph Memory Object 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Banerjee, A., Barnett, M., Naumann, D.A.: Boogie meets regions: A verification experience report. In: Shankar, N., Woodcock, J. (eds.) VSTTE 2008. LNCS, vol. 5295, pp. 177–191. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  2. 2.
    Hawblitzel, C., Petrank, E.: Automated verification of practical garbage collectors. SIGPLAN Not. 44(1), 441–453 (2009)CrossRefzbMATHGoogle Scholar
  3. 3.
    Zee, K., Kuncak, V., Rinard, M.: Full functional verification of linked data structures. SIGPLAN Not. 43(6), 349–361 (2008)CrossRefGoogle Scholar
  4. 4.
    Moskal, M.: Programming with triggers. In: Dutertre, B., Strichman, O. (eds.) SMT 2009: Proceedings of the 7th International Workshop on Satisfiability Modulo Theories. ACM, New York (2009)Google Scholar
  5. 5.
    Böhme, S., Moskal, M., Schulte, W., Wolff, B.: HOL-Boogie–An interactive prover-backend for the Verifying C Compiler. J. Autom. Reason. 44, 111–144 (2010)CrossRefzbMATHGoogle Scholar
  6. 6.
    Mehta, F., Nipkow, T.: Proving pointer programs in higher-order logic. Inf. Comput. 199(1-2), 200–227 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Myreen, M.O.: Reusable verification of a copying collector. In: Leavens, G.T., O’Hearn, P., Rajamani, S.K. (eds.) VSTTE 2010. LNCS, vol. 6217, pp. 142–156. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  8. 8.
    Marti, N., Affeldt, R.: Formal verification of the heap manager of an operating system using separation logic. In: Liu, Z., Kleinberg, R.D. (eds.) ICFEM 2006. LNCS, vol. 4260, pp. 400–419. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  9. 9.
    McCreight, A.: The Mechanized Verification of Garbage Collector Implementations. PhD thesis, Department of Computer Science, Yale University (2008)Google Scholar
  10. 10.
    Hubert, T., Marché, C.: A case study of C source code verification: the Schorr-Waite algorithm. In: Aichernig, B.K., Beckert, B. (eds.) SEFM. IEEE, Los Alamitos (2005)Google Scholar
  11. 11.
    Cheney, C.J.: A nonrecursive list compacting algorithm. Commun. ACM 13, 677–678 (1970)CrossRefzbMATHGoogle Scholar
  12. 12.
    Gast, H.: Reasoning about memory layouts. Formal Methods in System Design 37(2-3), 141–170 (2010)CrossRefzbMATHGoogle Scholar
  13. 13.
    Gast, H., Trieflinger, J.: High-level Reasoning about Low-level Programs. In: Roggenbach, M. (ed.) Automated Verification of Critical Systems 2009. Electronic Communications of the EASST, vol. 23 (2009)Google Scholar
  14. 14.
    Gast, H.: Verifying the L4 kernel allocator in lightweight separation (2010),
  15. 15.
    Berdine, J., Calcagno, C., O’Hearn, P.W.: Smallfoot: Modular automatic assertion checking with separation logic. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2005. LNCS, vol. 4111, pp. 115–137. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  16. 16.
    Gast, H.: Lightweight separation. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 199–214. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  17. 17.
    Gast, H.: A developer-oriented proof of Cheney’s algorithm (2011),
  18. 18.
    Torp-Smith, N., Birkedal, L., Reynolds, J.C.: Local reasoning about a copying garbage collector. ACM Trans. Program. Lang. Syst. 30(4), 1–58 (2008)CrossRefzbMATHGoogle Scholar
  19. 19.
    Dawson, J.E.: Isabelle theories for machine words. In: 7th International Workshop on Automated Verification of Critical Systems (AVOCS 2007). ENTCS, vol. 250 (2009)Google Scholar
  20. 20.
    Kammüller, F., Wenzel, M., Paulson, L.C.: Locales - A sectioning concept for isabelle. In: Bertot, Y., Dowek, G., Hirschowitz, A., Paulin, C., Théry, L. (eds.) TPHOLs 1999. LNCS, vol. 1690, pp. 149–166. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  21. 21.
    Burstall, R.: Some techniques for proving correctness of programs which alter data stuctures. In: Meltzer, B., Michie, D. (eds.) Machine Intelligence, vol. 7. Edinburgh University Press, Edinburgh (1972)Google Scholar
  22. 22.
    McCreight, A., Shao, Z., Lin, C., Li, L.: A general framework for certifying garbage collectors and their mutators. SIGPLAN Not. 42(6), 468–479 (2007)CrossRefGoogle Scholar
  23. 23.
    Varming, C., Birkedal, L.: Higher-order separation logic in Isabelle/HOLCF. Electron. Notes Theor. Comput. Sci. 218, 371–389 (2008)CrossRefzbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Holger Gast
    • 1
  1. 1.Wilhelm-Schickard-Institut für InformatikUniversity of TübingenGermany

Personalised recommendations