Toward Hole-Driven Development with Liquid Haskell

10/09/2021
by   Patrick Redmond, et al.
0

Liquid Haskell is an extension to the Haskell programming language that adds support for refinement types: data types augmented with SMT-decidable logical predicates that refine the set of values that can inhabit a type. Furthermore, Liquid Haskell's support for refinement reflection enables the use of Haskell for general-purpose mechanized theorem proving. A growing list of large-scale mechanized proof developments in Liquid Haskell take advantage of this capability. Adding theorem-proving capabilities to a "legacy" language like Haskell lets programmers directly verify properties of real-world Haskell programs (taking advantage of the existing highly tuned compiler, run-time system, and libraries), just by writing Haskell. However, more established proof assistants like Agda and Coq offer far better support for interactive proof development and insight into the proof state (for instance, what subgoals still need to be proved to finish a partially-complete proof). In contrast, Liquid Haskell provides only coarse-grained feedback to the user – either it reports a type error, or not – unfortunately hindering its usability as a theorem prover. In this paper, we propose improving the usability of Liquid Haskell by extending it with support for Agda-style typed holes and interactive editing commands that take advantage of them. In Agda, typed holes allow programmers to indicate unfinished parts of a proof, and incrementally complete the proof in a dialogue with the compiler. While GHC Haskell already has its own Agda-inspired support for typed holes, we posit that typed holes would be especially powerful and useful if combined with Liquid Haskell's refinement types and SMT automation. We discuss how typed holes might work in Liquid Haskell, and we consider possible implementation approaches and next steps.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/12/2021

Toward SMT-Based Refinement Types in Agda

Dependent types offer great versatility and power, but developing proofs...
research
03/17/2018

Meta-F*: Proof Automation with SMT, Tactics, and Metaprograms

Scripting proofs with tactics has been a tradition in interactive theore...
research
11/09/2017

Refinement Reflection: Complete Verification with SMT

We introduce Refinement Reflection, a new framework for building SMT-bas...
research
07/05/2019

From LCF to Isabelle/HOL

Interactive theorem provers have developed dramatically over the past fo...
research
04/17/2019

Towards Evolutionary Theorem Proving for Isabelle/HOL

Mechanized theorem proving is becoming the basis of reliable systems pro...
research
02/08/2022

Evolution of SASyLF 2008-2021

SASyLF was released in 2008 and used as a proof assistant in courses at ...
research
10/30/2020

Programming Metamorphic Algorithms: An Experiment in Type-Driven Algorithm Design

In dependently typed programming, proofs of basic, structural properties...

Please sign up or login with your details

Forgot password? Click here to reset