Projects

Here is a partial list of various projects I have worked on and/or contributed to over the years. I release all my projects with a BSD style license, so if you can not find a link to something interesting below, feel free to email me.

The Haskell Program Coverage Toolkit
StatusActive
CollaboratorsColin Runciman
HistoryStarted in 2006, during Colin's sabbatical at Galois
SummaryHpc is a tool-kit to record and display Haskell Program Coverage. Hpc includes tools that instrument Haskell programs to record program coverage, run instrumented programs, and display the coverage information obtained.

Hpc works by applying a source-to-source transformation; this transformation also generates as a by-product a program-index file (.pix) and module-index files (.mix). The transformed program is compiled with a library; in addition to its usual run-time behavior the program generates a coverage record in a program-ticks file (.tix). If the program is run more than once, coverage data is accumulated to reflect all runs.

Hpc provides coverage information of two kinds: source coverage and boolean-control coverage. Source coverage is the extent to which every part of the program was used, measured at three different levels: declarations (both top-level and local), alternatives (among several equations or case branches) and expressions (at every level). Boolean coverage is the extent to which each of the values True and False is obtained in every syntactic boolean context (ie. guard, condition, qualifier).

Hpc displays both kinds of information in two different ways: textual reports with summary statistics (hpc-report) and sources with colour mark-up (hpc-source). For boolean coverage, there are four possible outcomes for each guard, condition or qualifier: both True and False values occur; only True; only False; never evaluated. In hpc-source output, highlighting with a yellow background indicates a part of the program that was never evaluated; a green background indicates an always-True expression and a red background indicates an always-False one.
Resources [Hpc Home Page] [HPC Paper]
HOOD - The Haskell Object Observation Debugger
StatusActive
HistoryDeveloped as Haskell Library in 2000
SummaryHOOD is a small post-mortem debugger for the lazy functional language Haskell. It is based on the concept of observation of intermediate data structures, rather than the more traditional stepping and variable examination paradigm used by imperative language debuggers. HOOD offers the following features.
  • Observation of base types (Int, Bool, Float, etc)
  • Observation of both finite and infinite structures (Lists, trees, arrays, etc).
  • Observation of usage patterns for functions.
  • Observation of monadic actions, including IO actions.
  • Hooks to add observational capabilities for new base type and used defined types.
Includes a basic structure rendering package that uses a Haskell like syntax. Thread-safe observations are are supported. Some versions support observations on exceptions
Resources [HOOD Home Page] [HOOD Paper]
HERA - The Haskell Equational Reasoning Assistant
StatusActive
HistoryVersion 1.0 started in 1995, using Tk/Tcl. The current version is 2.0, which uses Ajax and Template Haskell
SummaryMaking it easy to perform equational reasoning on real Haskell programs and code fragments is the goal of the HERA project. Expect a release of the HERA system real soon now.
Resources [HERA Wiki Page] [HERA Demo Writeup]
The Snowball Haskell Compiler
StatusAbandoned
HistoryStarted in 1999, demoed at the 2001 Haskell Implementors workshop
SummarySnowball was a compiler for Haskell written in Haskell that targeted the JVM via Java code. It successfully bootstrapped itself, then was abandoned.

The compiler used Hugs as a front end, taking the desugared, typechecked code, roughly at the level of the GHC Core.

The optimizer was based on the "Secrets of the Glasgow Haskell inliner" paper, and actually generated reasonable code.

The code generator generated Java code, using a trampoline accelerated by using the exception mechanism for tail calls. There were grand plans to plug this code generator into GHC, but they were thwarted by the C-level dependancies built into low-level GHC library code.

This was did however inspire the ST code translation system.
Resources