Modular language specifications in Haskell


Mirjana Ivanović, Viktor Kunčak




A framework for specification of programming language semantics, abstract and concrete syntax, and lexical structure are proposed. The framework is based on Modular Monadic Semantics and allows independent specification of various language features. Features such as arithmetics, conditionals, exceptions, state and nondeterminism can be freely combined into working interpreters, facilitating experiments in language design. A prototype implementation of this system in Haskell is described and possibilities for more sophisticated interpreter generator are outlined.