Advertisement

Automatic Data Refinement

  • Peter Lammich
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7998)

Abstract

We present the Autoref tool for Isabelle/HOL, which automatically refines algorithms specified over abstract concepts like maps and sets to algorithms over concrete implementations like red-black-trees, and produces a refinement theorem. It is based on ideas borrowed from relational parametricity due to Reynolds and Wadler.

The tool allows for rapid prototyping of verified, executable algorithms. Moreover, it can be configured to fine-tune the result to the user’s needs. Our tool is able to automatically instantiate generic algorithms, which greatly simplifies the implementation of executable data structures.

Thanks to its integration with the Isabelle Refinement Framework and the Isabelle Collection Framework, Autoref can be used as a backend to a stepwise refinement based development approach, having access to a rich library of verified data structures. We have evaluated the tool by synthesizing efficiently executable refinements for some complex algorithms, as well as by implementing a library of generic algorithms for maps and sets.

Keywords

Automatic Data Synthesis Problem Side Condition Type Constructor Executable Code 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Back, R.J.: On the correctness of refinement steps in program development. Ph.D. thesis, Department of Computer Science, University of Helsinki (1978)Google Scholar
  2. 2.
    Back, R.J., von Wright, J.: Refinement Calculus — A Systematic Introduction. Springer (1998)Google Scholar
  3. 3.
    Backhouse, R.C., de Bruin, P., Malcolm, G., Voermans, E., van der Woude, J.: Relational catamorphisms. In: Proc. of the IFIP TC2/WG2.1 Working Conference on Constructing Programs. Elsevier Science Publishers BV (1991)Google Scholar
  4. 4.
    Bulwahn, L.: The new quickcheck in Isabelle: Random, exhaustive and symbolic testing under one roof. In: Hawblitzel, C., Miller, D. (eds.) CPP 2012. LNCS, vol. 7679, pp. 92–108. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  5. 5.
    Eberl, M.: Efficient and Verified Computation of Simulation Relations on NFAs. Bachelor’s thesis, Technische Universität München (2012)Google Scholar
  6. 6.
    Esparza, J., Lammich, P., Neumann, R., Nipkow, T., Schimpf, A., Smaus, J.G.: A fully verified executable LTL model checker. To appear in Proc. of CAV (2013)Google Scholar
  7. 7.
    Haftmann, F.: Code Generation from Specifications in Higher Order Logic. Ph.D. thesis, Technische Universität München (2009)Google Scholar
  8. 8.
    Haftmann, F., Krauss, A., Kunčar, O., Nipkow, T.: Data refinement in Isabelle/HOL. In: Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds.) ITP 2013. LNCS, vol. 7998, pp. 100–115. Springer, Heidelberg (2013)Google Scholar
  9. 9.
    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)CrossRefGoogle Scholar
  10. 10.
    Hoare, C.A.R.: Proof of correctness of data representations. Acta Informatica 1, 271–281 (1972)zbMATHCrossRefGoogle Scholar
  11. 11.
    Holzmann, G., Peled, D., Yannakakis, M.: On nested depth first search. In: Proc. of SPIN Workshop. Discrete Mathematics and Theoretical Computer Science, vol. 32, pp. 23–32. American Mathematical Society (1997)Google Scholar
  12. 12.
    Homeier, P.V.: The HOL-Omega logic. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 244–259. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  13. 13.
    Huffman, B., Kunčar, O.: Lifting and transfer: A modular design for quotients in Isabelle/HOL. In: Isabelle Users Workshop 2012 (2012)Google Scholar
  14. 14.
    Ilie, L., Navarro, G., Yu, S.: On NFA reductions. In: Karhumäki, J., Maurer, H., Păun, G., Rozenberg, G. (eds.) Theory Is Forever. LNCS, vol. 3113, pp. 112–124. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  15. 15.
    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)CrossRefGoogle Scholar
  16. 16.
    Lammich, P.: Collections framework. In: Archive of Formal Proofs, formal proof development (December 2009), http://afp.sf.net/entries/Collections.shtml
  17. 17.
    Lammich, P.: Tree automata. In: Archive of Formal Proofs, formal proof development (December 2009), http://afp.sf.net/entries/Tree-Automata.shtml
  18. 18.
    Lammich, P.: Refinement for monadic programs. In: Archive of Formal Proofs, formal proof development (2012), http://afp.sf.net/entries/Refine_Monadic.shtml
  19. 19.
    Lammich, P., Tuerk, T.: Applying data refinement for monadic programs to Hopcroft’s algorithm. In: Beringer, L., Felty, A. (eds.) ITP 2012. LNCS, vol. 7406, pp. 166–182. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  20. 20.
    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)CrossRefGoogle Scholar
  21. 21.
    Musser, D.R., Stepanov, A.A.: Generic programming. In: Gianni, P. (ed.) ISSAC 1988. LNCS, vol. 358, pp. 13–25. Springer, Heidelberg (1989)CrossRefGoogle Scholar
  22. 22.
    Myreen, M.O., Owens, S.: Proof-producing synthesis of ML from higher-order logic. In: Proceedings of the 17th ACM SIGPLAN International Conference on Functional Programming, ICFP 2012, pp. 115–126. ACM (2012)Google Scholar
  23. 23.
    Nipkow, T., Paulson, L.C., Wenzel, M.T.: Isabelle/HOL. LNCS, vol. 2283. Springer, Heidelberg (2002)zbMATHGoogle Scholar
  24. 24.
    Nordhoff, B., Lammich, P.: Formalization of Dijkstra’s algorithm, formal proof development (2012)Google Scholar
  25. 25.
    Reynolds, J.C.: Types, abstraction and parametric polymorphism. In: IFIP Congress, pp. 513–523 (1983)Google Scholar
  26. 26.
    Wadler, P.: Theorems for free! In: Proc. of FPCA, pp. 347–359. ACM (1989)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Peter Lammich
    • 1
  1. 1.Technische Universität MünchenGermany

Personalised recommendations