The Hole Story: Type-Directed Synthesis and Repair

Abstract: Modern programs in languages like Haskell include a lot of information beyond what is strictly required for compilation, such as additional type information, unit tests and properties. This information is often used for post-compilation verification, by running the tests to verify that the code-as-written matches the specification provided by the types and properties. In this thesis, we explore ways of using this additional information to aid the developer during development. Firstly, we explore the integration of program synthesis into GHC compiler error messages using typed-hole suggestions to aid the completion of partial programs during development. Secondly, we present PropR, a tool based on type-driven synthesis aided by property-based testing and fault-localization in conjunction with genetic algorithms to automatically repair buggy programs, and evaluate its effectiveness. Finally, we present WRIT, a GHC plugin that allows developers to circumvent a too-restrictive type system in some cases in order to compile, run and test programs that are ill-typed but still executable, and explore its use in the context of information flow security for Haskell.

  This dissertation MIGHT be available in PDF-format. Check this page to see if it is available for download.