Advertisement

Light-Weight Containers for Isabelle: Efficient, Extensible, Nestable

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

Abstract

In Isabelle/HOL, we develop an approach to efficiently implement container types such as sets and maps in generated code. Thanks to type classes and refinement during code generation, our light-weight framework is flexible, extensible, and easy to use. To support arbitrary nesting of containers, we devise an efficient linear order on sets that can even compare complements and non-complements. Our evaluation shows that it is both efficient and usable.

Keywords

Virtual Machine Code Generation Linear Order Type Class Container Type 
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.
    Appel, A.W.: Efficient verified red-black trees (2011), http://www.cs.princeton.edu/~appel/papers/redblack.pdf
  2. 2.
    Berghofer, S., Nipkow, T.: Random testing in Isabelle/HOL. In: SEFM 2004, pp. 230–239. IEEE Computer Society (2004)Google Scholar
  3. 3.
    Berghofer, S., Reiter, M.: Formalizing the logic-automaton connection. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 147–163. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  4. 4.
    Chen, K., Hudak, P., Odersky, M.: Parametric type classes. In: LFP 1992, pp. 170–181. ACM (1992)Google Scholar
  5. 5.
    Greve, D.A., Kaufmann, M., Manolios, P., Moore, J.S., Ray, S., Ruiz-Reina, J., Sumners, R., Vroon, D., Wilding, M.: Efficient execution in an automated reasoning environment. J. Funct. Program. 18(1), 15–46 (2008)zbMATHCrossRefGoogle Scholar
  6. 6.
    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
  7. 7.
    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
  8. 8.
    Klein, G., Nipkow, T.: A machine-checked model for a Java-like language, virtual machine and compiler. ACM Trans. Progr. Lang. Sys. 28, 619–695 (2006)CrossRefGoogle Scholar
  9. 9.
    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
  10. 10.
    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
  11. 11.
    Lescuyer, S.: Containers: a typeclass-based library of finite sets/maps (2011), http://coq.inria.fr/pylons/contribs/view/Containers/v8.3
  12. 12.
    Lochbihler, A.: Formalising FinFuns – generating code for functions as data from Isabelle/HOL. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 310–326. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  13. 13.
    Lochbihler, A.: A Machine-Checked, Type-Safe Model of Java Concurrency: Language, Virtual Machine, Memory Model, and Verified Compiler. PhD thesis, Karlsruher Institut für Technologie, Fakultät für Informatik (2012)Google Scholar
  14. 14.
    Lochbihler, A.: Light-weight containers. Archive of Formal Proofs, Formal proof development (2013) http://afp.sf.net/entries/Containers.shtml
  15. 15.
    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
  16. 16.
    Marić, F.: Formal verification of a modern SAT solver by shallow embedding into Isabelle/HOL. Theor. Comput. Sci. 411(50), 4333–4356 (2010)zbMATHCrossRefGoogle Scholar
  17. 17.
    Peyton Jones, S.: Bulk types with class. In: Haskell Workshop 1997 (1997)Google Scholar
  18. 18.
    Svenningsson, J.: Shortcut fusion for accumulating parameters & zip-like functions. In: ICFP 2002, pp. 124–132. ACM (2002)Google Scholar
  19. 19.
    Thiemann, R.: Generating linear orders for datatypes. Archive of Formal Proofs, Formal proof development (2012), http://afp.sf.net/entries/Datatype_Order_Generator.shtml

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Andreas Lochbihler
    • 1
  1. 1.Institute of Information SecurityETH ZurichSwitzerland

Personalised recommendations