Beluga is a functional programming language designed for reasoning about formal systems. It features direct support for object-level binding constructs using higher order abstract syntax and treats contexts as first class objects.

Download Overview Get Started


Beluga allows specification of formal systems (such as lambda calculi and type systems) using a foundation of contextual modal logic. As in the Twelf system, we can encode object-level binding constructs using higher order abstract syntax. We also pair terms with the contexts that give them meaning and then reason about these contextual objects. Proofs in Beluga are represented by recursive programs according to the Curry-Howard Isomorphism.

Beluga is developed at the Complogic group at McGill University, led by Professor Brigitte Pientka. It is implemented in OCaml.

To learn more about Beluga we recommend the following tutorial style papers and talks. If you have trouble discerning Beluga code from older releases, consult the legacy syntax for clarification.


  • Mechanizing Types and Programming Languages: A Companion (Draft from 24 July, 2015): This is a companion that loosely follows B. Pierce's book "Types and Programming Languages" and shows how to mechanize the material in Beluga. The code to the companion is available on github (see beluga-code)
    For an up-to-date version or to contribute see our github repository.

Overview Talks:

Get Started


NOTE: These are only a few quick steps to get users up and running with Beluga. Please refer to the full installation guide included with the distribution, available online if you run into any issues.
  1. Install all the prerequisite packages.
  2. Download the Beluga source code.
  3. From the Beluga directory, build the executable by using:
    ~/beluga# make
  4. Use the executable located in the bin directory to run Beluga programs:
    • Use ~/beluga# bin/beluga path/to/program.bel to run a Beluga program.
    • Run in an Emacs buffer to use the Interactive mode. See the Docs file for how to use the Interactive mode commands.


For any bugs or issues please send an email to


This research has been funded through: NSERC (Natural Science and Engineering Research Council), FQRNT Recherche d'Equipe, PSR-SIIRI Projets conjoints de recherche et d'innovation and 63e session de la Commission permanente de coopération franco-québécoise by Ministère du Développement économique, de l'Innovation et de l'Exportation au Quebec,