Makam is a metalanguage: a language for implementing languages. It supports concise declarative definitions, aimed at allowing rapid prototyping and experimentation with new programming language research ideas. The design of Makam is based on higher-order logic programming and is a refinement of the λProlog language. Makam is implemented from scratch in OCaml.

The name comes from the makam/maqam of traditional Turkish and Arabic music: a set of techniques of improvisation, defining the pitches, patterns and development of a piece of music.

I started working on the design and implementation of Makam in 2012 at MIT, under the supervision of Prof. Adam Chlipala, and continue to work on it as a personal project at Originate NYC.

Tutorial series

I have started a series of posts that introduce Makam and show examples of how to use it for prototyping small languages. They aim to be pretty self-contained, only assuming familiarity with functional programming languages.

  1. Introducing abstract and concrete syntax; implementing an interpreter for a toy language; implementing concrete syntax in Makam.

Code, papers and slides.

  • The GitHub repository for Makam. Makam is free software, released under the GPLv3. This is the official GitHub repository for it.
  • Our ICFP 2018 paper, “Prototyping a Functional Language using Higher-Order Logic Programming: A Functional Pearl on Learning the Ways of λProlog/Makam”, Antonis Stampoulis and Adam Chlipala. This is a functional pearl demonstrating the development of a MetaML-like type system in Makam. It serves both as a λProlog/Makam tutorial and also explains the details of some useful Makam design patterns, such as encoding complex binding structures and writing structurally recursive definitions while avoiding boilerplate. The paper is a fun read (for some definitions of “fun”), written in the style of a play between Roza Eskenazi and Hagop Stambulyan, reimagined as programming language researchers. The paper repository includes all code, together with the artifact and the presentation. Also available: the video from the presentation at ICFP (about 20 minutes long).
  • Technical Overview. A paper describing the main technical features of Makam (quite dated at this point)
  • Slides for the CRSX User Meeting. These are the slides for a talk I gave in the 2nd CRSX User Meeting, in Two Sigma NYC. They describe the main features of Makam and are a good reference point if you need a quick overview of the language.
  • Slides for the MIT PL/SE Offsite. This is a lightning 3-minute talk (with my notes) for the MIT Programming Languages/Software Engineering Offsite event. This is the talk that I have most enjoyed giving, and might be interesting, even though it will not give you too much information about Makam :)
  • A technical description of Makam, geared towards programming language researchers.