Static contract checking for Haskell
Slides (PDF) of a talk given at the Midlands Graduate School Christmas Lectures, 2007.
Extended static checking for Haskell
Dana Xu, Haskell Workshop 2006.
Abstract
Program errors are hard to detect and are costly both to
programmers who spend significant efforts in debugging, and to systems
that are guarded by runtime checks. Extended static checking can
reduce these costs by helping to detect bugs at compile-time, where
possible. Extended static checking has been applied to object-oriented
languages, like Java and C#, but it has not been applied to a lazy
functional language, like Haskell. In this paper, we describe an
extended static checking tool for Haskell, named ESC/Haskell, that is
based on symbolic computation and assisted by a few novel
strategies. One novelty is our use of Haskell as the specification
language itself for pre/post conditions. Any Haskell function
(including recursive and higher order functions) can be used in our
specification which allows sophisticated properties to be
expressed. To perform automatic verification, we rely on a novel
technique based on symbolic computation that is augmented by
counter-example guided unrolling. This technique can automate our
verification process and be efficiently implemented.