[Haskell-cafe] ANNOUNCE: ministg-0.2, an interpreter for STG operational semantics

Bernie Pope florbitous at gmail.com
Thu Aug 20 08:11:45 EDT 2009

I'm pleased to announce the first public release of Ministg.

Ministg is an interpreter for a high-level, small-step, operational
semantics for the STG machine. The STG machine is the abstract machine
at the core of GHC. The operational semantics used in Ministg is taken
from the paper "Making a fast curry: push/enter vs. eval/apply for
higher-order languages" by Simon Marlow and Simon Peyton Jones.
Ministg implements both sets of evaluation rules from the paper.

One of the main features of Ministg is the ability to record a trace
of the execution steps as a sequence of html files. And example trace
can be viewed here:


The example shows the execution of a program which sums a list of
three integers, using the well-known space-leaky version of sum.
Follow the "next" and "previous" links to step forwards and backwards
through the trace.

The main reason I wrote Ministg is to explore various extensions to
the STG machine. The current release features a simple extension in
the form of call-stack tracing, which is strongly influenced by the
cost-centre stacks of GHC. I expect it will also be a useful tool for
people who are interested in learning more about the STG machine.

More detailed information is available from the haskellwiki page:


You can download it from hackagedb:


Or you can get the latest code from patch-tag:

 darcs get http://patch-tag.com/r/ministg/pullrepo ministg


More information about the Haskell-Cafe mailing list