mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 03:05:31 -05:00
fix bug introduced in 1946a5e7
This commit is contained in:
parent
ff6dc527bd
commit
7fb557ae8b
1 changed files with 32 additions and 28 deletions
|
|
@ -741,37 +741,41 @@ module Make (A : ARG) :
|
||||||
List.iter (fun f -> f self acts lits) self.on_final_check;
|
List.iter (fun f -> f self acts lits) self.on_final_check;
|
||||||
CC.check cc acts;
|
CC.check cc acts;
|
||||||
|
|
||||||
(match check_th_combination_ self acts with
|
let new_work = has_delayed_actions self in
|
||||||
| Ok m -> self.last_model <- Some m
|
(* do actual theory combination if nothing changed by pure "final check" *)
|
||||||
| Error { lits; semantic } ->
|
if not new_work then (
|
||||||
(* bad model, we add a clause to remove it *)
|
match check_th_combination_ self acts with
|
||||||
Log.debugf 5 (fun k ->
|
| Ok m -> self.last_model <- Some m
|
||||||
k
|
| Error { lits; semantic } ->
|
||||||
"(@[solver.th-comb.conflict@ :lits (@[%a@])@ :same-val \
|
(* bad model, we add a clause to remove it *)
|
||||||
(@[%a@])@])"
|
Log.debugf 5 (fun k ->
|
||||||
(Util.pp_list Lit.pp) lits
|
k
|
||||||
(Util.pp_list @@ Fmt.Dump.(triple bool Term.pp Term.pp))
|
"(@[solver.th-comb.conflict@ :lits (@[%a@])@ :same-val \
|
||||||
semantic);
|
(@[%a@])@])"
|
||||||
|
(Util.pp_list Lit.pp) lits
|
||||||
|
(Util.pp_list @@ Fmt.Dump.(triple bool Term.pp Term.pp))
|
||||||
|
semantic);
|
||||||
|
|
||||||
let c1 = List.rev_map Lit.neg lits in
|
let c1 = List.rev_map Lit.neg lits in
|
||||||
let c2 =
|
let c2 =
|
||||||
semantic
|
semantic
|
||||||
|> List.rev_map (fun (sign, t, u) ->
|
|> List.rev_map (fun (sign, t, u) ->
|
||||||
let eqn = A.mk_eq self.tst t u in
|
let eqn = A.mk_eq self.tst t u in
|
||||||
let lit = Lit.atom ~sign:(not sign) self.tst eqn in
|
let lit = Lit.atom ~sign:(not sign) self.tst eqn in
|
||||||
(* make sure to consider the new lit *)
|
(* make sure to consider the new lit *)
|
||||||
add_lit self acts lit;
|
add_lit self acts lit;
|
||||||
lit)
|
lit)
|
||||||
in
|
in
|
||||||
|
|
||||||
let c = List.rev_append c1 c2 in
|
let c = List.rev_append c1 c2 in
|
||||||
let pr = P.lemma_cc (Iter.of_list c) self.proof in
|
let pr = P.lemma_cc (Iter.of_list c) self.proof in
|
||||||
|
|
||||||
Log.debugf 20 (fun k ->
|
Log.debugf 20 (fun k ->
|
||||||
k "(@[solver.th-comb.add-semantic-conflict-clause@ %a@])"
|
k "(@[solver.th-comb.add-semantic-conflict-clause@ %a@])"
|
||||||
(Util.pp_list Lit.pp) c);
|
(Util.pp_list Lit.pp) c);
|
||||||
(* will add a delayed action *)
|
(* will add a delayed action *)
|
||||||
add_clause_temp self acts c pr);
|
add_clause_temp self acts c pr
|
||||||
|
);
|
||||||
|
|
||||||
Perform_delayed_th.top self acts
|
Perform_delayed_th.top self acts
|
||||||
) else (
|
) else (
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue