Abstract
We present a specification, a derivation and total correctness proofs of operations for bi-functional graphs implemented with pointers, including the Schorr-Waite algorithm. This one marks such a graph with an economical depth-first strategy. Our approach is purely algebraic and functional, from a simple graph specification to the simulation of a tail-recursive imperative program, then to a true C pointer program by elementary classical transformations. We stay in the unique higher-order formalism of the Calculus of Inductive Constructions for specifications, programs and proofs. All the development is supported by Coq.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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)
Bertot, Y., Casteran, P.: Interactive Theorem Proving and Program Development - Coq’Art: The Calculus of Inductive Constructions. Springer-Verlag (2004)
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)
Broy, M., Pepper, P.: Combining Algebraic and Algorithmic Reasoning: An Approach to the Schorr-Waite Algorithm. ACM-TOPLAS 4(3), 362–381 (1982)
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)
Burstall, R.M.: Some techniques for proving correctness of programs which alters data structures. Machine Intelligence 7, 23–50 (1972)
Chlipala, A.: Mostly-automated verification of low-level programs in computational separation logic. In: PLDI, pp. 234–245 (2011)
de Roever, W.-P.: On Backtracking and Greatest Fixpoints. In: Salomaa, A., Steinby, M. (eds.) ICALP 1977. LNCS, vol. 52, pp. 412–429. Springer, Heidelberg (1977)
Dershowitz, N.: The Schorr-Waite Marking Algorithm Revisited. Inf. Proc. Lett. 11(3), 141–143 (1980)
Dufourd, J.-F.: Polyhedra genus theorem and Euler formula: A hypermap-formalized intuitionistic proof. Theor. Comp. Sci. 403(2-3), 133–159 (2008)
Dufourd, J.-F.: Dérivation de l’algorithme de Schorr-Waite en Coq par une méthode algébrique. In: JFLA 2012, INRIA (2012), http://hal.inria.fr/hal-00665909
Dufourd, J.-F.: Schorr-Waite Coq Development On-line Documentation (2013), http://dpt-info.u-strasbg.fr/~jfd/SW-LIB-PUBLI.tar.gz
Dufourd, J.-F.: Formal Study of Functional Orbits in Finite Domains, 35 pages (2013) (submitted)
Dufourd, J.-F.: Hypermap specification and certified linked implementation using orbits. In: Klein, G., Gamboa, R. (eds.) ITP 2014. LNCS, vol. 8558, pp. 242–257. Springer, Heidelberg (2014)
Giorgino, M., Strecker, M., Matthes, R., Pantel, M.: Verification of the schorr-waite algorithm – from trees to graphs. In: Alpuente, M. (ed.) LOPSTR 2010. LNCS, vol. 6564, pp. 67–83. Springer, Heidelberg (2011)
Filliâtre, J.-C.: Verifying two lines of C with why3: An exercise in program verification. In: Joshi, R., Müller, P., Podelski, A. (eds.) VSTTE 2012. LNCS, vol. 7152, pp. 83–97. Springer, Heidelberg (2012)
Gerhardt, S.L.: A derivation-oriented proof of the Schorr-Waite algorithm. In: Gerhart, S.L., et al. (eds.) Program Construction. LNCS, vol. 69, pp. 472–492. Springer, Heidelberg (1979)
Gonthier, G.: Formal Proof - The Four-Color Theorem. Notices of the AMS 55(11), 1382–1393 (2008)
Gries, D.: The Schorr-Waite Graph Marking Algorithm. Acta Informatica 11, 223–232 (1979)
Griffiths, M.: Development of the Schorr-Waite algorithm. In: Gerhart, S.L., Pair, C., Pepper, P.A., Wössner, H., Dijkstra, E.W., Guttag, J.V., Owicki, S.S., Partsch, H., Bauer, F.L., Gries, D., Griffiths, M., Horning, J.J., Wirsing, M. (eds.) Program Construction. LNCS, vol. 69, pp. 464–471. Springer, Heidelberg (1979)
Hackett, B., Rugina, R.: Region-Based Shape Analysis with Tracked Locations. In: 32nd ACM POPL 2005, pp. 310–323 (2005)
Hubert, T., Marché, C.: A case study of C source code verification; the Schorr-Waite algorithm. In: 3rd IEEE SEFM 2005, pp. 190–199 (2005)
Knuth, D.E.: The Art of Computer Programming: Fundamental Algorithms, vol. I. Add. -Wesley (1968)
Leino, K.R.M.: Dafny: An automatic program verifier for functional correctness. In: Clarke, E.M., Voronkov, A. (eds.) LPAR-16 2010. LNCS, vol. 6355, pp. 348–370. Springer, Heidelberg (2010)
Leroy, X., Blazy, S.: Formal Verification of a C-like Memory Model and Its Uses for Verifying Program Transformations. JAR 41(1), 1–31 (2008)
Loginov, A., Reps, T., Sagiv, M.: Automated verification of the deutsch-schorr-waite tree-traversal algorithm. In: Yi, K. (ed.) SAS 2006. LNCS, vol. 4134, pp. 261–279. Springer, Heidelberg (2006)
Mehta, F., Nipkow, T.: Proving pointer programs in higher-order logic. Info. and Comp. 199(1-2), 200–227 (2005)
Morris, J.M.: A Proof of the Schorr-Waite Algorithm. In: TFPM, vol. 91, pp. 43–51. NATO, D. Reidel (1982)
Preoteasa, V., Back, R.-J.: Invariant diagrams with data refinement. FAC 24(1), 67–95 (2012)
Reynolds, J.C.: Separation Logic: A Logic for Shared Mutable Data Structures. In: LICS 2002, pp. 55–74 (2002)
Schorr, H., Waite, W.R.: An Efficient Machine-Independent Procedure for Garbage Collection in Various List Structures. CACM 10(8), 501–506 (1967)
Suzuki, N.: Automatic Verification of Programs with Complex Data Structures. PhD Th., Dept. of CS, Stanford (1976)
Topor, R.W.: The Correctness of the Schorr-Waite List Marking Algorithm. Acta Inf. 11, 211–221 (1979)
Ward, M.: Derivation of Data Intensive Algorithms by Formal Transformation. IEEE-TOSE 22(9), 665–686 (1996)
Yang, H.: Relational separation logic. TCS 375(1-3), 308–334 (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Dufourd, JF. (2014). Pointer Program Derivation Using Coq: Graphs and Schorr-Waite Algorithm. In: Merz, S., Pang, J. (eds) Formal Methods and Software Engineering. ICFEM 2014. Lecture Notes in Computer Science, vol 8829. Springer, Cham. https://doi.org/10.1007/978-3-319-11737-9_10
Download citation
DOI: https://doi.org/10.1007/978-3-319-11737-9_10
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-11736-2
Online ISBN: 978-3-319-11737-9
eBook Packages: Computer ScienceComputer Science (R0)