Authors: Andreas Lochbihler and Pascal Stoop
Paper Information
Title: | Lazy Algebraic Types in Isabelle/HOL |
Authors: | Andreas Lochbihler and Pascal Stoop |
Proceedings: | Isabelle Papers |
Editor: | Makarius Wenzel |
Keywords: | code generation, lazy evaluation, pattern matching |
Abstract: | ABSTRACT. This paper presents the tool CodeLazy for Isabelle/HOL. It hooks into Isabelle’s code generator such that the generated code evaluates a user-specified set of type constructors lazily, even in target languages with eager evaluation. The lazy type must be algebraic, i.e., values must be built from constructors and a corresponding case operator decomposes them. Every datatype and codatatype is algebraic and thus eligible for lazification. Lazification is transparent to the user: definitions, theorems, and the reasoning in HOL need not be changed. Instead, CodeLazy transforms the code equations for functions on lazy types when code is generated. It thus makes code-generation-based Isabelle tools like evaluation and quickcheck available for codatatypes, where eager evaluation frequently causes non-termination. Moreover, as all transformations are checked by Isabelle’s kernel, they cannot introduce correctness problems. |
Pages: | 17 |
Talk: | Jul 13 10:00 (Session 84A: Isabelle 1) |
Paper: |