Skip to main content

Applying Data Refinement for Monadic Programs to Hopcroft’s Algorithm

  • Conference paper
Interactive Theorem Proving (ITP 2012)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7406))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 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)

    Chapter  Google Scholar 

  2. Almeida, M., Moreira, N., Reis, R.: Enumeration and generation with a string automata representation. Theor. Comput. Sci. 387, 93–102 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  3. Back, R.J.: On the correctness of refinement steps in program development. PhD thesis, Department of Computer Science, University of Helsinki (1978)

    Google Scholar 

  4. Back, R.J., von Wright, J.: Refinement Calculus — A Systematic Introduction. Springer (1998)

    Google Scholar 

  5. Back, R.J., von Wright, J.: Encoding, decoding and data refinement. Formal Aspects of Computing 12, 313–349 (2000)

    Article  MATH  Google Scholar 

  6. 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)

    Chapter  Google Scholar 

  7. 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)

    Article  Google Scholar 

  8. Braibant, T., Pous, D.: A tactic for deciding kleene algebras. In: First COQ Workshop (2009)

    Google Scholar 

  9. 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)

    Chapter  Google Scholar 

  10. Constable, R.L., Jackson, P.B., Naumov, P., Uribe, J.: Formalizing automata theory i: Finite automata (1997)

    Google Scholar 

  11. de Roever, W.P., Engelhardt, K.: Data Refinement: Model-Oriented Proof Methods and their Comparison. Cambridge University Press (1998)

    Google Scholar 

  12. Egli, H.: A mathematical model for nondeterministic computations. Technical report, ETH Zürich (1975)

    Google Scholar 

  13. Haftmann, F.: Code Generation from Specifications in Higher Order Logic. PhD thesis, Technische Universität München (2009)

    Google Scholar 

  14. Haftmann, F.: Data refinement (raffinement) in Isabelle/HOL (2010), https://isabelle.in.tum.de/community/

  15. 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)

    Chapter  Google Scholar 

  16. Hoare, C.A.R.: Proof of correctness of data representations. Acta Informatica 1, 271–281 (1972), doi:10.1007/BF00289507

    Article  MATH  Google Scholar 

  17. 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)

    Google Scholar 

  18. Krauss, A.: Recursive definitions of monadic functions. In: Proc. of PAR, pp. 1–13 (2010)

    Google Scholar 

  19. 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)

    Chapter  Google Scholar 

  20. Lammich, P.: Collections framework. In: The Archive of Formal Proofs (2009), http://afp.sf.net/entries/collections.shtml , Formal proof development

  21. Lammich, P.: Tree automata. In: The Archive of Formal Proofs (2009), http://afp.sf.net/entries/Tree-Automata.shtml , Formal proof development

  22. Lammich, P.: Refinement for monadic programs. In: The Archive of Formal Proofs (2012), http://afp.sf.net/entries/DiskPaxos.shtml , Formal Proof Development

  23. 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)

    Chapter  Google Scholar 

  24. 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)

    Chapter  Google Scholar 

  25. 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)

    Chapter  Google Scholar 

  26. Müller-Olm, M.: Modular Compiler Verification — A Refinement-Algebraic Approach Advocating Stepwise Abstraction. LNCS, vol. 1283. Springer, Heidelberg (1997)

    Google Scholar 

  27. Nipkow, T., Paulson, L.C., Wenzel, M.T.: Isabelle/HOL — A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)

    Book  MATH  Google Scholar 

  28. Nordhoff, B., Lammich, P.: Formalization of Dijkstra’s algorithm (2012), Formal Proof Development

    Google Scholar 

  29. 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)

    Chapter  Google Scholar 

  30. Plotkin, G.D.: A powerdomain construction. SIAM J. Comput. 5, 452–487 (1976)

    Article  MathSciNet  MATH  Google Scholar 

  31. Preoteasa, V.: Program Variables — The Core of Mechanical Reasoning about Imperative Programs. PhD thesis, Turku Centre for Computer Science (2006)

    Google Scholar 

  32. Schirmer, N.: Verification of Sequential Imperative Programs in Isabelle/HOL. PhD thesis, Technische Universität München (2006)

    Google Scholar 

  33. Schwenke, M., Mahony, B.: The essence of expression refinement. In: Proc. of International Refinement Workshop and Formal Methods, pp. 324–333 (1998)

    Google Scholar 

  34. Staples, M.: A Mechanised Theory of Refinement. PhD thesis, 2nd edn. University of Cambridge (1999)

    Google Scholar 

  35. Wadler, P.: Comprehending monads. In: Mathematical Structures in Computer Science, pp. 61–78 (1992)

    Google Scholar 

  36. Watson, B.W.: A taxonomy of finite automata minimization algorithms. Comp. Sci. Note 93/44, Eindhoven University of Technology, The Netherlands (1993)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics