mirror of
https://github.com/c-cube/sidekick.git
synced 2026-01-24 10:26:40 -05:00
feat: expose eval_atom
This commit is contained in:
parent
c89a99e82b
commit
6dbaa2d335
2 changed files with 10 additions and 2 deletions
|
|
@ -1667,12 +1667,15 @@ module Make(Plugin : PLUGIN)
|
|||
f e
|
||||
done
|
||||
|
||||
let acts_eval_lit st (f:formula) : Solver_intf.lbool =
|
||||
let a = create_atom st f in
|
||||
let eval_atom_ a =
|
||||
if Atom.is_true a then Solver_intf.L_true
|
||||
else if Atom.is_false a then Solver_intf.L_false
|
||||
else Solver_intf.L_undefined
|
||||
|
||||
let[@inline] acts_eval_lit st (f:formula) : Solver_intf.lbool =
|
||||
let a = create_atom st f in
|
||||
eval_atom_ a
|
||||
|
||||
let[@inline] acts_mk_lit st f : unit =
|
||||
ignore (create_atom st f : atom)
|
||||
|
||||
|
|
@ -2088,6 +2091,8 @@ module Make(Plugin : PLUGIN)
|
|||
b && lev = 0
|
||||
with UndecidedLit -> false
|
||||
|
||||
let[@inline] eval_atom _st a : Solver_intf.lbool = eval_atom_ a
|
||||
|
||||
let export (st:t) : clause Solver_intf.export =
|
||||
let hyps = hyps st in
|
||||
let history = history st in
|
||||
|
|
|
|||
|
|
@ -468,6 +468,9 @@ module type S = sig
|
|||
(** [true_at_level0 a] returns [true] if [a] was proved at level0, i.e.
|
||||
it must hold in all models *)
|
||||
|
||||
val eval_atom : t -> atom -> lbool
|
||||
(** Evaluate atom in current state *)
|
||||
|
||||
val export : t -> clause export
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue