Page
Library
Module
Module type
Parameter
Class
Class type
Source
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.
The following packages must be installed to use Beluga:
Optional dependencies (for improved beli mode):
$ 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
For interactive proofs, we recommend using Harpoon. A detailed list of commands and tactics is available here.
Beluga includes a major mode for programming in Emacs. The elisp file is located in the ./tools directory. To configure Beluga-mode:
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.