Verification of the Schorr-Waite Algorithm – From Trees to Graphs

  • Mathieu Giorgino
  • Martin Strecker
  • Ralph Matthes
  • Marc Pantel
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6564)


This article proposes a method for proving the correctness of graph algorithms by manipulating their spanning trees enriched with additional references. We illustrate this concept with a proof of the correctness of a (pseudo-)imperative version of the Schorr-Waite algorithm by refinement of a functional one working on trees. It is composed of two orthogonal steps of refinement – functional to imperative and tree to graph – finally merged to obtain the result. Our imperative specifications use monadic constructs and syntax sugar, making them close to common imperative languages. This work has been realized within the Isabelle/HOL proof assistant.


Verification of imperative programs Pointer algorithms Program refinement 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abrial, J.-R.: Event based sequential program development: Application to constructing a pointer program. In: Araki, K., Gnesi, S., Mandrioli, D. (eds.) FME 2003. LNCS, vol. 2805, pp. 51–74. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  2. 2.
    Bornat, R.: Proving pointer programs in Hoare logic. In: Backhouse, R., Oliveira, J.N. (eds.) MPC 2000. LNCS, vol. 1837, pp. 102–126. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  3. 3.
    Bubel, R.: The schorr-waite-algorithm. In: Beckert, B., Hähnle, R., Schmitt, P.H. (eds.) Verification of Object-Oriented Software. LNCS (LNAI), vol. 4334, pp. 569–587. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  4. 4.
    Bulwahn, L., Krauss, A., Haftmann, F., Erkök, L., Matthews, J.: Imperative functional programming with isabelle/HOL. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 134–149. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  5. 5.
    Filliâtre, J.-C., Marché, C.: The why/Krakatoa/Caduceus platform for deductive program verification. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 173–177. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  6. 6.
    Giorgino, M., Strecker, M.: Verification of BDD algorithms by refinement of trees. Technical report, IRIT (2010),
  7. 7.
    Giorgino, M., Strecker, M., Matthes, R., Pantel, M.: Verification of the Schorr-Waite algorithm - From trees to graphs (January 2010),
  8. 8.
    Hubert, T., Marché, C.: A case study of C source code verification: the Schorr-Waite algorithm. In: Software Engineering and Formal Methods (SEFM). IEEE Computer Society, Los Alamitos (2005)Google Scholar
  9. 9.
    Huet, G.: Functional pearl: The zipper. Journal of Functional Programming 7(5), 549–554 (1997)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Klein, G., Derrin, P., Elphinstone, K.: Experience report: sel4 — formally verifying a high-performance microkernel. In: International Conference on Functional Programming (ICFP). ACM, New York (2009)Google Scholar
  11. 11.
    Mehta, F., Nipkow, T.: Proving pointer programs in higher-order logic. Information and Computation 199, 200–227 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Nipkow, T., Paulson, L., Wenzel, M.: Isabelle/HOL. A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)zbMATHGoogle Scholar
  13. 13.
    O’Hearn, P., Reynolds, J., Yang, H.: Local reasoning about programs that alter data structures. In: Fribourg, L. (ed.) CSL 2001 and EACSL 2001. LNCS, vol. 2142, pp. 1–19. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  14. 14.
    Rittweiler, T., Haftmann, F.: Haskabelle – converting Haskell source files to Isabelle/HOL theories (2009),
  15. 15.
    Schirmer, N., Wenzel, M.: State spaces — the locale way. ENTCS 254, 161–179 (2009)Google Scholar
  16. 16.
    Schorr, H., Waite, W.: An efficient machine independent procedure for garbage collection in various list structures. Communications of the ACM 10, 501–506 (1967)CrossRefzbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Mathieu Giorgino
    • 1
  • Martin Strecker
    • 1
  • Ralph Matthes
    • 1
  • Marc Pantel
    • 1
  1. 1.IRIT (Institut de Recherche en Informatique de Toulouse)Université de ToulouseFrance

Personalised recommendations