package smtml

  1. Overview
  2. Docs

Description

A Multi Back-end Front-end for SMT Solvers in OCaml.

Published: 06 Nov 2024

README

Smt.ml

Smt.ml is a Multi Back-end Front-end for SMT Solvers in OCaml. The primary objective of Smt.ml is to facilitate the effortless transition between different SMT solvers during program analysis, as certain SMT solvers may prove more efficient at handling specific logics and formulas. Presently, Smt.ml offers support for Z3, Colibri2, Bitwuzla, and Alt-Ergo, and ongoing efforts are directed towards incorporating support for cvc5.

Installation

OPAM

Install opam and bootstrap the OCaml compiler:

opam init
opam switch create 5.1.1 5.1.1

Then install encoding:

opam install smtml

Build from source

Clone the repo and install the dependencies:

git clone https://github.com/formalsec/smtml.git
cd smtml
opam install . --deps-only --with-test

Build and test:

dune build @install
dune runtest

Install smtml on your path by running:

dune install

Code Coverage Reports

BISECT_FILE=`pwd`/bisect dune runtest --force --instrument-with bisect_ppx
bisect-ppx-report summary # Shell summary
bisect-ppx-report html    # Detailed Report in _coverage/index.html

Supported Solvers

Solver Status Opam Package
Z3 ☑️ z3
Colibri2 ☑️ colibri2
Bitwuzla ☑️ bitwuzla-cxx
Alt-Ergo ☑️ alt-ergo
cvc5 ☑️ cvc5
Minisat 📆 minisat
Legend
  • ☑️ Solver is currently supported

  • 🔄 Ongoing work to support solver

  • 📆 Planned to support in the future

About

Project Name

The name Smt.ml is a portmanteau of the terms SMT and OCaml. The .ml extension is a common file extension for OCaml source files. The library itself is named smtml and can be imported into OCaml programs using the following syntax:

open Smtml

Changelog

See CHANGES

Copyright

MIT License

Copyright (c) 2024 formalsec

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Dependencies (15)

  1. zarith >= "1.5"
  2. yojson >= "1.6.0"
  3. rusage
  4. prelude >= "0.3"
  5. patricia-tree >= "0.10.0"
  6. ocaml_intrinsics
  7. ocaml >= "4.14.0"
  8. menhir build & >= "20220210"
  9. hc >= "0.3"
  10. fmt >= "0.8.7"
  11. dolmen_model = "0.10"
  12. dolmen_type = "0.10"
  13. dolmen = "0.10"
  14. dune >= "3.10"
  15. cmdliner >= "1.2.0"

Dev Dependencies (11)

  1. tls-lwt with-dev-setup
  2. owl with-dev-setup
  3. mdx with-test
  4. lwt with-dev-setup
  5. core_unix with-dev-setup
  6. cohttp-lwt-unix with-dev-setup
  7. cohttp with-dev-setup
  8. benchpress with-dev-setup & = "dev"
  9. bisect_ppx with-test & >= "2.5.0"
  10. sherlodoc with-doc
  11. odoc with-doc

Used by (1)

  1. owi >= "0.2"

Conflicts (2)

  1. z3 < "4.12.2" | >= "4.14"
  2. bitwuzla-cxx < "0.6.0"
OCaml

Innovation. Community. Security.