Skip to content
andrejbauerPublic

About

Alg is a program that generates all finite models of a first-order theory. It is optimized for equational theories.

Resources

Stars

87 stars

Watchers

4 watching

Forks

Latest commit

 

History

267 Commits

Folders and files

Repository files navigation

Alg

Alg is a program for enumeration of finite models of first-order theories, with the following constraints:

  • the theory must be single-sorted,
  • only unary and binary operations are accepted,
  • only unary predicates and binary relations are accepted,
  • it is assumed that constants denote pariwise distinct elements.

Installation

The preferred way to install Alg is with the OCaml package manager Opam, directly from the GitHub repository:

opam pin add alg https://github.com/andrejbauer/alg.git

This compiles and installs the alg executable, and places example theories in the share/alg/theories directory of the opam switch.

Run opam upgrade alg to update Alg to the latest version, and opam remove alg to remove it.

Compilation from source

To compile Alg you need OCaml, the dune build system, and the menhir parser generator, all available through Opam:

opam install dune menhir dune-build-info

Then run

dune build

in the Alg source directory. The executable alg.exe appears in the top directory, so you can test it by running

./alg.exe theories/group.th --size 1-9 --axiom 'x * x = 1'

to enumerate all groups of size at most 9 in which all elements have rank 2.

Run dune test to run the tests.

Usage

See the manual MANUAL.md and the examples in the ./theories folder.

About

Alg is a program that generates all finite models of a first-order theory. It is optimized for equational theories.

Resources

Stars

87 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages