Abstract
We provide a framework for program and data refinement in Isabelle/HOL. It is based on a refinement calculus for monadic expressions and provides tools to automate canonical tasks such as verification condition generation. It produces executable programs, from which Isabelle/HOL can generate verified, efficient code in various languages, including Standard ML, Haskell and Scala.
In order to demonstrate the practical applicability of our framework, we present a verified implementation of Hopcroft’s algorithm for automata minimisation.
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
Almeida, A., Almeida, M., Alves, J., Moreira, N., Reis, R.: FAdo and GUItar: Tools for Automata Manipulation and Visualization. In: Maneth, S. (ed.) CIAA 2009. LNCS, vol. 5642, pp. 65–74. Springer, Heidelberg (2009)
Almeida, M., Moreira, N., Reis, R.: Enumeration and generation with a string automata representation. Theor. Comput. Sci. 387, 93–102 (2007)
Back, R.J.: On the correctness of refinement steps in program development. PhD thesis, Department of Computer Science, University of Helsinki (1978)
Back, R.J., von Wright, J.: Refinement Calculus — A Systematic Introduction. Springer (1998)
Back, R.J., von Wright, J.: Encoding, decoding and data refinement. Formal Aspects of Computing 12, 313–349 (2000)
Baclet, M., Pagetti, C.: Around Hopcroft’s Algorithm. In: Ibarra, O.H., Yen, H.-C. (eds.) CIAA 2006. LNCS, vol. 4094, pp. 114–125. Springer, Heidelberg (2006)
Blum, N.: An O(n log n) implementation of the standard method for minimizing n-state finite automata. Information Processing Letters 6(2), 65–69 (1996)
Braibant, T., Pous, D.: A tactic for deciding kleene algebras. In: First COQ Workshop (2009)
Cock, D., Klein, G., Sewell, T.: Secure Microkernels, State Monads and Scalable Refinement. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 167–182. Springer, Heidelberg (2008)
Constable, R.L., Jackson, P.B., Naumov, P., Uribe, J.: Formalizing automata theory i: Finite automata (1997)
de Roever, W.P., Engelhardt, K.: Data Refinement: Model-Oriented Proof Methods and their Comparison. Cambridge University Press (1998)
Egli, H.: A mathematical model for nondeterministic computations. Technical report, ETH Zürich (1975)
Haftmann, F.: Code Generation from Specifications in Higher Order Logic. PhD thesis, Technische Universität München (2009)
Haftmann, F.: Data refinement (raffinement) in Isabelle/HOL (2010), https://isabelle.in.tum.de/community/
Haftmann, F., Nipkow, T.: Code Generation via Higher-Order Rewrite Systems. In: Blume, M., Kobayashi, N., Vidal, G. (eds.) FLOPS 2010. LNCS, vol. 6009, pp. 103–117. Springer, Heidelberg (2010)
Hoare, C.A.R.: Proof of correctness of data representations. Acta Informatica 1, 271–281 (1972), doi:10.1007/BF00289507
Hopcroft, J.E.: An nlogn algorithm for minimizing the states in a finite automaton. In: Theory of Machines and Computations, pp. 189–196. Academic Press (1971)
Krauss, A.: Recursive definitions of monadic functions. In: Proc. of PAR, pp. 1–13 (2010)
Lammich, P., Lochbihler, A.: The Isabelle Collections Framework. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 339–354. Springer, Heidelberg (2010)
Lammich, P.: Collections framework. In: The Archive of Formal Proofs (2009), http://afp.sf.net/entries/collections.shtml , Formal proof development
Lammich, P.: Tree automata. In: The Archive of Formal Proofs (2009), http://afp.sf.net/entries/Tree-Automata.shtml , Formal proof development
Lammich, P.: Refinement for monadic programs. In: The Archive of Formal Proofs (2012), http://afp.sf.net/entries/DiskPaxos.shtml , Formal Proof Development
Langbacka, T., Ruksenas, R., von Wright, J.: Tkwinhol: A Tool for Doing Window Inference in Hol. In: Schubert, E.T., Alves-Foss, J., Windley, P. (eds.) HUG 1995. LNCS, vol. 971, pp. 245–260. Springer, Heidelberg (1995)
Lochbihler, A., Bulwahn, L.: Animating the Formalised Semantics of a Java-Like Language. In: van Eekelen, M., Geuvers, H., Schmaltz, J., Wiedijk, F. (eds.) ITP 2011. LNCS, vol. 6898, pp. 216–232. Springer, Heidelberg (2011)
Melton, A., Schmidt, D., Strecker, G.: Galois Connections and Computer Science Applications. In: Poigné, A., Pitt, D.H., Rydeheard, D.E., Abramsky, S. (eds.) Category Theory and Computer Programming. LNCS, vol. 240, pp. 299–312. Springer, Heidelberg (1986)
Müller-Olm, M.: Modular Compiler Verification — A Refinement-Algebraic Approach Advocating Stepwise Abstraction. LNCS, vol. 1283. Springer, Heidelberg (1997)
Nipkow, T., Paulson, L.C., Wenzel, M.T.: Isabelle/HOL — A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)
Nordhoff, B., Lammich, P.: Formalization of Dijkstra’s algorithm (2012), Formal Proof Development
Olderog, E.R.: Hoare’s Logic for Programs with Procedures What has been Achieved? In: Clarke, E., Kozen, D. (eds.) Logic of Programs 1983. LNCS, vol. 164, pp. 383–395. Springer, Heidelberg (1984)
Plotkin, G.D.: A powerdomain construction. SIAM J. Comput. 5, 452–487 (1976)
Preoteasa, V.: Program Variables — The Core of Mechanical Reasoning about Imperative Programs. PhD thesis, Turku Centre for Computer Science (2006)
Schirmer, N.: Verification of Sequential Imperative Programs in Isabelle/HOL. PhD thesis, Technische Universität München (2006)
Schwenke, M., Mahony, B.: The essence of expression refinement. In: Proc. of International Refinement Workshop and Formal Methods, pp. 324–333 (1998)
Staples, M.: A Mechanised Theory of Refinement. PhD thesis, 2nd edn. University of Cambridge (1999)
Wadler, P.: Comprehending monads. In: Mathematical Structures in Computer Science, pp. 61–78 (1992)
Watson, B.W.: A taxonomy of finite automata minimization algorithms. Comp. Sci. Note 93/44, Eindhoven University of Technology, The Netherlands (1993)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lammich, P., Tuerk, T. (2012). Applying Data Refinement for Monadic Programs to Hopcroft’s Algorithm. In: Beringer, L., Felty, A. (eds) Interactive Theorem Proving. ITP 2012. Lecture Notes in Computer Science, vol 7406. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32347-8_12
Download citation
DOI: https://doi.org/10.1007/978-3-642-32347-8_12
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-32346-1
Online ISBN: 978-3-642-32347-8
eBook Packages: Computer ScienceComputer Science (R0)