Module Sidekick_arith_lra__Simplex2.Make
Parameters
Signature
module V = Varmodule Constraint : sig ... endmodule Subst : sig ... endval create : ?stat:Sidekick_util.Stat.t -> unit -> tCreate a new simplex.
val push_level : t -> unitval pop_levels : t -> int -> unitval define : t -> V.t -> (num * V.t) list -> unitDefine a basic variable in terms of other variables. This is useful to "name" a linear expression and get back a variable that can be used in a
Constraint.t
module Unsat_cert : sig ... endexceptionE_unsat of Unsat_cert.t
val add_constraint : on_propagate:ev_on_propagate -> t -> Constraint.t -> V.lit -> unitAdd a constraint to the simplex.
- raises Unsat
if it's immediately obvious that this is not satisfiable.
val declare_bound : t -> Constraint.t -> V.lit -> unitDeclare that this constraint exists, so we can possibly propagate it. Unlike
add_constraintthis does NOT assert that the constraint is true
val check_exn : on_propagate:(V.lit -> reason:V.lit list -> unit) -> t -> unitCheck the whole simplex for satisfiability.
- parameter on_propagate
is called with arguments
lit, reasonwheneverreason => litis found to be true by the simplex.
- raises Unsat
if the constraints are not satisfiable.
type result=|Sat of Subst.t|Unsat of Unsat_cert.t