mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-09 12:45:48 -05:00
fix: cache E_unsat in direct add_clause functions
This commit is contained in:
parent
4127db2153
commit
7f05da56cc
1 changed files with 14 additions and 6 deletions
|
|
@ -2087,13 +2087,21 @@ module Make(Plugin : PLUGIN)
|
|||
in
|
||||
{ Solver_intf.unsat_conflict; get_proof; unsat_assumptions; }
|
||||
|
||||
let[@inline] add_clause_a st c lemma : unit =
|
||||
let add_clause_a st c lemma : unit =
|
||||
try
|
||||
let c = Clause.make_a ~flags:0 c (Hyp lemma) in
|
||||
add_clause_ st c
|
||||
with
|
||||
| E_unsat (US_false c) ->
|
||||
st.unsat_at_0 <- Some c
|
||||
|
||||
let[@inline] add_clause st c lemma : unit =
|
||||
let add_clause st c lemma : unit =
|
||||
try
|
||||
let c = Clause.make_permanent c (Hyp lemma) in
|
||||
add_clause_ st c
|
||||
with
|
||||
| E_unsat (US_false c) ->
|
||||
st.unsat_at_0 <- Some c
|
||||
|
||||
let solve ?(assumptions=[]) (st:t) : res =
|
||||
cancel_until st 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue