My favorites | Sign in
Project Logo
                
Feeds:
People details
Project owners:
  ryporter

Overview

The goal of this project to provide Haskell ports of all OCaml implementations for "Types and Programming Languages" (TAPL) by Benjamin C. Pierce.

Each directory (except for "common") contains a single implementation and corresponds the directory of the same name found under "Implementation" at TAPL.

Each Haskell implementation uses Parsec for parsing, and has an HUnit test suite.

Current Status

Complete through Chapter 19 (end of Part III) of TAPL.

In Progress

To Do

Code Generation

As I added ports for the different implementations, I realized that I was duplicating a lot of code. I abstracted some into common files, but when one of the main types would change slightly (e.g., a new type was added), I didn't know how to cleanly abstract across the different versions of the type. I considered Template Haskell, but I did not want to sacrifice readability of individual implementations.

I eventually settled on using code generation (see the 'generator' directory). In a config file, an implementation specifies sets of terms, types, tests, and other global options, and all of the necessary code is then generated in its 'gen' subdirectory. The generator itself is not pretty, but this approach allows the user to explore an individual implementation without suffering (too much) from abstractions that are not relevant to the code at hand. (Of course, any changes will be lost unless they are migrated to the generator.)

The code generator is currently very primitive, and only fullsimple and fullsub make use of it.

Notes

The code has only been tested using GHC 6.8 on Ubuntu.

Contributions and/or feedback are very much welcomed. Please contact Ryan W. Porter.









Hosted by Google Code