package hardcaml_verify

  1. Overview
  2. Docs
Hardcaml Verification Tools

Install

Dune Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=a09a904776ad848f685afb4ebe85e0d449acb81f6f2425fccc52a3c5b76be629

doc/hardcaml_verify.kernel/Hardcaml_verify_kernel/Cnf/index.html

Module Hardcaml_verify_kernel.CnfSource

Data structure for creating CNF formulae.

Literals are mapped to integer indexes internally so they can be easily converted to DIMACs format for input to a SAT solver, and a model constructed from the output.

Sourcemodule Literal : sig ... end

A literal is an input bit to the CNF. They are constructed with the vector and bit functions, negated with (~:) and managed as a group within a Disjunction.t.

Sourcemodule Disjunction : sig ... end

A collection of literals which are OR'd together.

Sourcemodule Conjunction : sig ... end

A collection of disjunctions which are AND'd together.

Sourcetype t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t

Not of a literal.

Sourceval create : Conjunction.t -> t

Create CNF from a Conjunction.t.

Sourceval fold : t -> init:'a -> f:('a -> Disjunction.t -> 'a) -> 'a

Fold over each disjunction in CNF

Sourceval iter : t -> f:(Disjunction.t -> Base.unit) -> Base.unit

Iter over each disjunction in CNF

Sourceval to_int_literal : t -> Literal.t -> Base.int Base.option

Get an integer representing the literal. It is negative if the literal is negated. Returns None if the literal is not in the CNF.

Sourceval number_of_variables : t -> Base.int

Total number of variables in the CNF

Sourceval number_of_clauses : t -> Base.int

Total number of clauses in the CNF.

Sourcemodule type Model = sig ... end
Sourcemodule Model_with_bits : sig ... end
Sourcemodule Model_with_vectors : sig ... end
OCaml

Innovation. Community. Security.