mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 03:05:31 -05:00
update conflict resolution for better proofs, improve code
This commit is contained in:
parent
c5c5426ead
commit
2e4fd5e1c1
3 changed files with 11 additions and 12 deletions
|
|
@ -1276,7 +1276,7 @@ end = struct
|
|||
else None
|
||||
|
||||
let on_new_term self cc n (t:T.t) : unit =
|
||||
Log.debugf 50 (fun k->k "@[monoid[%s].on-new-term.try@ %a@])" M.name N.pp n);
|
||||
(*Log.debugf 50 (fun k->k "(@[monoid[%s].on-new-term.try@ %a@])" M.name N.pp n);*)
|
||||
let maybe_m, l = M.of_term cc n t in
|
||||
begin match maybe_m with
|
||||
| Some v ->
|
||||
|
|
|
|||
|
|
@ -627,7 +627,7 @@ module Make(A : ARG) : S with module A = A = struct
|
|||
|
||||
(* look for subterms of type Real, for they will need theory combination *)
|
||||
let on_subterm (self:state) _ (t:T.t) : unit =
|
||||
Log.debugf 50 (fun k->k "lra: cc-on-subterm %a" T.pp t);
|
||||
Log.debugf 50 (fun k->k "(@[lra.cc-on-subterm@ %a@])" T.pp t);
|
||||
if A.has_ty_real t &&
|
||||
not (T.Tbl.mem self.needs_th_combination t) then (
|
||||
Log.debugf 5 (fun k->k "(@[lra.needs-th-combination@ %a@])" T.pp t);
|
||||
|
|
|
|||
|
|
@ -1329,6 +1329,7 @@ module Make(Plugin : PLUGIN)
|
|||
AVec.clear learnt;
|
||||
|
||||
let steps = self.temp_step_vec in (* for proof *)
|
||||
assert (Step_vec.is_empty steps);
|
||||
|
||||
(* loop variables *)
|
||||
let pathC = ref 0 in
|
||||
|
|
@ -1371,16 +1372,14 @@ module Make(Plugin : PLUGIN)
|
|||
let atoms = Clause.atoms_a store clause in
|
||||
for j = 0 to Array.length atoms - 1 do
|
||||
let q = atoms.(j) in
|
||||
assert (Atom.is_true store q ||
|
||||
Atom.is_false store q &&
|
||||
Atom.level store q >= 0); (* unsure? *)
|
||||
if Atom.level store q <= 0 then (
|
||||
assert (Atom.has_value store q);
|
||||
assert (Atom.level store q >= 0);
|
||||
if Atom.level store q = 0 then (
|
||||
assert (Atom.is_false store q);
|
||||
begin match Atom.reason store q with
|
||||
| Some (Bcp cl | Bcp_lazy (lazy cl)) when Proof.enabled self.proof ->
|
||||
Step_vec.push steps (Clause.proof_step self.store cl);
|
||||
| _ -> ()
|
||||
end
|
||||
if Proof.enabled self.proof then (
|
||||
let step = proof_of_atom_lvl0_ self (Atom.neg q) in
|
||||
Step_vec.push steps step;
|
||||
)
|
||||
);
|
||||
if not (Var.marked store (Atom.var q)) then (
|
||||
Var.mark store (Atom.var q);
|
||||
|
|
@ -1549,7 +1548,7 @@ module Make(Plugin : PLUGIN)
|
|||
(* cannot recover from this *)
|
||||
report_unsat self @@ US_false clause
|
||||
) else if Atom.is_true store a then (
|
||||
() (* atom is already true, nothing to do *)
|
||||
() (* atom is already true, (at level 0) nothing to do *)
|
||||
) else (
|
||||
Log.debugf 40
|
||||
(fun k->k "(@[sat.add-clause.unit-clause@ :propagating %a@])" (Atom.debug store) a);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue