Last updated: 2017-07-28 14:04:58 +0100

Upstream URL: git clone


View repository

View issue tracker

Contents of follows

MLSpec: Machine Learning for QuickSpec

This project constructs "theories" for the QuickSpec system to explore.

It reads from stdin or a filename argument, and parses a JSON array of arrays of function descriptions.

A function description looks like:

    "package" : "foo"
  , "module"  : "Bar.Baz"
  , "name"    : "quux"
  , "type"    : "Bar.T a ->gt; Baz.U b"
  , "arity"   : 1

Each array will be turned into a QuickSpec signature and explored.

Equations found by all of these explorations are printed to stdout as JSON objects, one per line.



Each equation is an object with the following fields:


A term is an object, with a role field containing one of "constant", "variable" or "application". The other fields depend on the term's role:

Implementation Notes

We use the nix-eval package to run QuickSpec with all of the required packages available. If some packages aren't in the default GHC package database, nix-eval will call the nix-shell command, so you'll need a working installation of Nix in your path.

We include a Cabal test suite to check internal function behaviour. We also include an executable mlspec-test-quickspec for integration tests which use QuickSpec. We also have a script which invokes these as well as running various examples through the MLSpec executable.