package rsdd
Install
Dune Dependency
Authors
Maintainers
Sources
md5=bf18648cd174653b40ee822aac825c7b
sha512=1d0aaf95332ab41042d5410dde76d6c70308b294cfc3f900bf14297b4d4fb8bcfefd06f295d51dde085c180e1e6fb3494622d76167035a8d14f6044ac05d4967
Description
OCaml bindings for the Rust Decision Diagram (RSDD) library, generated with ocaml-rs.
Published: 06 Oct 2023
README
rsdd-ocaml
OCaml bindings for RSDD.
This is very much in progress. Things on the radar:
[ ] publish to opam (blocked by: some user testing)
[ ] add user-facing documentation (blocked by: time)
[ ] add developer documentation (blocked by: time)
[ ] add significantly more parts of the RSDD API, including:
[ ] SDD support (builder + manager)
[ ] allowing different options for generics
[ ] potentially better support Rust <-> OCaml interop (view types, better/more natural conversions)
For Users
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.git
Then, in your project directory, pin a local package:
$ opam pin rsdd ../path/to/rsdd-ocaml
Then, add rsdd
to:
your project's
.opam
file, if relevant (independs
)your library/executable's
dune
file, if relevant (inlibraries
)
Then, run
$ dune build
You 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)
For Developers
To build new bindings:
$ dune build
TODO
Dependencies (3)
- conf-rust-2021
-
dune
>= "2.7"
-
ocaml
>= "4.08.0" & < "5"
Dev Dependencies (1)
-
odoc
with-doc
Used by
None
Conflicts
None