I’m primarily a Rust and Haskell hacker, though I enjoy learning new languages and so tend to dabble in lots of them. This page provides links and brief descriptions of a few projects I’ve worked on that are freely available.
My GitHub profile contains a motley collection of other small demos, experiments, and prototypes developed over the years.
Frame is an open-source DSL, implemented in Rust, used to model a software system’s behavior using state diagrams in a style similar to Harel’s statecharts. Frame specifications can be compiled into code and documentation in a variety of languages.
I am not the creator of Frame, but I have been a major contributor. Aside from bugfixes, improvements, and general maintenance, I led some larger efforts in the early development of Frame, including:
Designed and implemented a runtime system for Frame’s Rust backend that provides:
- A callback interface to be notified of all Frame-level events.
- A reflection interface for querying all aspects of running Frame models.
- Dynamic visualizations of running Frame models.
- Configurable event and transition history tracking.
Added a crate with supporting documentation for integrating Frame models into larger Rust projects.
Added a hierarchical configuration system for customizing the behavior of Frame using a combination of configuration files, properties defined within a Frame model, and/or command-line options passed to the compiler.
Developed a set of example Frame models exercising Frame’s features and their interactions, along with a corresponding integration test suite for the Rust backend.
A DSL embedded in Haskell for experimental/evolutionary game theory. Hagl supports defining a wide variety of games and strategies, then executing them repeatedly in order to collect and observe the results.
Hagl provides built-in support for standard game representations, such as normal and extensive form, and constructs for defining games in terms of the manipulation of a shared state (as in tic-tac-toe). More exotic game representations can be added by instantiating a type class.
A monadic sub-DSL supports concise and vaguely English-like definitions of strategies for playing these games, usually iteratively.
While Hagl provides some basic game analyses, its primary focus is on simulation and experimentation. Games can be executed and strategies can be pitted against each other for repeated play and in various tournament formats.
Resource DSL (GitHub)
A DSL implemented in Haskell for modeling the resource constraints in highly configurable systems. This DSL, which rather embarrassingly never got a proper name, was the main deliverable for a 4.5-year contract as part of the DARPA BRASS program.
The language enables modeling a software system, the environment it is expected to run in, and the capabilities it is expected to perform, as components that require and provide “resources”. Resources may correspond to concrete external entities or quantities, such as required sensors, amount of network bandwidth, or a set of installed libraries, or may be a more abstract capability, such as wayfinding, that is provided by a component in the system.
Additionally, the system’s components, their connections, the environment, and the system’s expectations are all configurable. This reflects actual software variation in the system, along with the range of possible environments and needs that the system might be expected to perform. The state space of models defined in this way grows exponentially as new components and configuration options are added.
The DSL’s interpreter applies variational programming techniques to support efficient analyses of the huge state spaces generated by these models. In particular, it supports efficient exhaustive searches for configurations that satisfy requirement-provision interfaces among components and for the system as a whole.
Hakyll Academic Webpage (GitHub)
This is the code used to statically generate my old academic web page, made available as an example application of the Hakyll static site generator library in Haskell.
I know it’s being used by a handful of folks around the world, thanks to folks emailing me… and because some haven’t changed the Google Analytics key! 😬
The most unique feature is its support for publications. I implemented a tiny DSL for representing publication entries, which are then loaded into Hakyll’s context. Publications can then be enumerated in various ways, or individually cited from within Markdown or HTML pages.
The code that generates the web page you’re reading right now is an evolution of the code linked above. However, I’ve not (yet!) released the code for this one since I want to separate a reusable template from the content this time around, for a variety of obvious reasons.
Modular PCF (GitHub)
The code is written in a simple style (e.g. it uses pattern matching and recursive functions in many places where a more idiomatic Haskell program would use monads and higher-order functions) with lots of documentation, in an attempt to be useful for pedagogical purposes.