Andrew Hirsch

The Pony Project

The Pony project is an extensible C to C compiler. The purpose of Pony is to allow C developers to specify transformations that should be applied to their C source code. Equivalently, it allows users to specify extensions to the C language, and write files in the extended language, and compile those files into ANSI C. The current implementation provides a C parser written using the Parsec3 library of parser combinators. It parses C into an Abstract Syntax Tree, and then uses a Haskell type class to transform that tree (using an injective function) into an internal representation of C. (For ANSI C, this is the same. However, if the language extension offers syntactical changes, this becomes necessary. For instance, if I add in first-class support for linked lists, say through ML-like notation [1, 2, 3] must be injected into a list of functions manipulating linked list pointers.

    • If you would like a photo and short bio added please contact the Department of Computer Science.