package binsec

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

An incremental solver instance.

include Libsolver.TERM
module Bl : sig ... end
module Bv : sig ... end
module Ax : sig ... end
val assert_formula : Bl.t -> unit

assert_formula bl assert the boolean entry in the solver instance.

  • parameter bl

    The boolean entry to assert.

val push : unit -> unit

push () creates a backup point of the current solver context.

val pop : unit -> unit

pop () discard all the assertions since the last backup point, restoring the solver context in the same state as before the push (). Invalid uses may fail in an unpredictable fashion.

val check_sat : ?timeout:float -> unit -> Libsolver.status

check_sat () checks if the current formula is satisfiable.

  • returns

    Sat, Unsat or Unknown.

val check_sat_assuming : ?timeout:float -> Bl.t -> Libsolver.status

check_sat_assuming e checks if the current formula is satisfiable with the assumtion e.

  • returns

    Sat, Unsat or Unknown.

val get_bv_value : Bv.t -> Z.t

get_bv_value expr returns the assignment of the expression expr if check_sat returned Sat. Invalid uses may fail in an unpredictable fashion.

  • parameter expr

    The expression to get the assignment.

  • returns

    The bitvector assignment of expr.

val fold_ax_values : (Z.t -> Z.t -> 'a -> 'a) -> Ax.t -> 'a -> 'a

fold_ax_values f ax v iter through the assignment of the array ax if check_sat returned Sat. Invalid uses may fail in an unpredictable fashion.

  • parameter ax

    The expression to get the assignment.

val close : unit -> unit

close () will destroy the solver instance and release its ressources. Calling any function on this instance afterward is invalid and may fail in an unpredictable fashion.

OCaml

Innovation. Community. Security.