sidekick/src/abstract-solver/check_res.ml
Simon Cruanes d08c8fe165
feat: add sidekick.abstract solver
this library provides an abstract interface for what a SMT solver provides,
independently of the underlying implementation technology.
2022-10-10 15:43:37 -04:00

21 lines
687 B
OCaml

(** Result of solving for the current set of clauses *)
module Model = Sidekick_model
(** Result of calling "check" *)
type t =
| Sat of Model.t (** Satisfiable *)
| Unsat of {
unsat_core: unit -> Lit.t Iter.t;
(** Unsat core (subset of assumptions), or empty *)
unsat_step_id: unit -> Proof_trace.step_id option;
(** Proof step for the empty clause *)
} (** Unsatisfiable *)
| Unknown of Unknown.t
(** Unknown, obtained after a timeout, memory limit, etc. *)
let pp out (self : t) =
match self with
| Sat _ -> Fmt.string out "Sat"
| Unsat _ -> Fmt.string out "Unsat"
| Unknown u -> Fmt.fprintf out "Unknown(%a)" Unknown.pp u