Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Beluga Build Status

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.

Installation & Configuration Guide

The following packages must be installed to use Beluga:

Optional dependencies (for improved beli mode):

General instructions

$ YOUR_PKG_MNGR install opam
$ opam init --bare
$ opam switch create ocaml-base-compiler.4.09.0
$ eval $(opam env)
# from the Beluga directory
$ opam install --deps-only .

The interactive mode is greatly improved if you have rlwrap installed, so you might also want to consider:

$ YOUR_PKG_MNGR install rlwrap


Compile by running "make" from the Beluga directory.

$ make

You can now run Beluga programs with the newly "beluga" executable in the "bin" directory

$ ./bin/beluga path/to/program.bel

Tip: Running make clean will clean the directory of compilation results

Interactive Mode

For interactive proofs, we recommend using Harpoon. A detailed list of commands and tactics is available here.

Beluga-mode for GNU Emacs

Beluga includes a major mode for programming in Emacs. The elisp file is located in the ./tools directory. To configure Beluga-mode:

  1. Update your ~/.emacs or ~/.emacs.d/init.el file with the lines written below. XEmacs users must update ~/.emacs or ~/.xemacs/init.el with the same text. Create any of these files if they do not exist already.

    • You should replace path/to/beluga with the actual path of the Beluga directory. (add-to-list 'load-path "path/to/beluga/tools/") (load "beluga-mode.el")
    • NOTE: Feel free to move the beluga-mode.el file to another directory so long as you add its location to the Emacs load-path.
  2. Restart Emacs. Emacs will now launch in Beluga-mode automatically when you open a Beluga program.

You can’t perform that action at this time.