OCaml bindings for RSDD.
This is very much in progress. Things on the radar:
Currently, this package is not available on opam (but that'll change soon!). In the meantime, you can pin a local version of the package.
Before installing, make sure you have rust and cargo on your machine. They're available through most package managers of your choice.
First, clone the repo:
$ git clone https://github.com/neuppl/rsdd-ocaml.gitThen, in your project directory, pin a local package:
$ opam pin rsdd ../path/to/rsdd-ocamlThen, add rsdd to:
.opam file, if relevant (in depends)dune file, if relevant (in libraries)Then, run
$ dune buildYou can now use Rsdd!
open Rsdd
let () =
let robdd_builder = mk_bdd_builder_default_order 6L in
let bdd = bdd_builder_compile_cnf robdd_builder (cnf_from_dimacs "
p cnf 6 3\n\
1 2 3 4 0\n\
-2 -3 4 5 0\n\
-4 -5 6 6 0\n\
") in
let model_count = bdd_model_count robdd_builder bdd in
print_endline (Int64.to_string model_count)To build new bindings:
$ dune buildTODO