Module Hardcaml_verify_kernel.Basic_gates

module Uid : sig ... end
type t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Base.Comparable.S with type t := t
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
type comparator_witness
val comparator : ( t, comparator_witness ) Base__Comparator.comparator
val optimise_muxs : Base.bool
val constant_only : Base.bool
val to_char : t -> Base.char
val of_char : Base.char -> t
val uid : t -> Uid.t
val vdd : t
val gnd : t
val is_vdd : t -> Base.bool
val is_gnd : t -> Base.bool
val var : Label.t -> t
val (~:) : t -> t
val (|:) : t -> t -> t
val (^:) : t -> t -> t
val (&:) : t -> t -> t
val cofactor : var:t -> t -> f:t -> t

cofactor ~var p ~f computes the cofactor of f wrt to var. p=vdd for positive cofactor and p=gnd for negative cofactor

val difference : t -> f:t -> t

boolean difference

val forall : t -> f:t -> t

universal quantification

val exists : t -> f:t -> t

existential quantification

val shannon_expansion : t -> f:t -> t

F = xF_x + x'F_x'

val deps : t -> t Base.list

Gate inputs

Visit all nodes in the list of functions and call f. Nodes are visited once only.

val cnf : ?show_hidden:Base.bool -> t Base.list -> Cnf.t

Create CNF for each given equation. In the resulting CNF the equations are logically AND'd.