@@ -181,6 +181,9 @@ module Make (Th : Theory.S) : SAT_ML with type th = Th.t = struct
181
181
(* si vrai, les contraintes sont deja fausses *)
182
182
mutable is_unsat : bool ;
183
183
184
+ mutable is_searching : bool ;
185
+ mutable delayed_cs : bool ;
186
+
184
187
mutable unsat_core : Atom .clause list option ;
185
188
186
189
(* clauses du probleme *)
@@ -448,6 +451,8 @@ module Make (Th : Theory.S) : SAT_ML with type th = Th.t = struct
448
451
hcons_env;
449
452
450
453
is_unsat = false ;
454
+ is_searching = false ;
455
+ delayed_cs = false ;
451
456
452
457
unsat_core = None ;
453
458
@@ -1159,7 +1164,11 @@ module Make (Th : Theory.S) : SAT_ML with type th = Th.t = struct
1159
1164
Printer. print_dbg " [satml] Theory_propagate of %d atoms@." ! nb_f;
1160
1165
Queue. clear env.tatoms_queue;
1161
1166
Queue. clear env.th_tableaux;
1162
- if ! facts == [] then C_none
1167
+ if ! facts == [] then
1168
+ if env.delayed_cs then (
1169
+ env.delayed_cs < - false ;
1170
+ do_case_split env Util. AfterTheoryAssume
1171
+ ) else C_none
1163
1172
else
1164
1173
try
1165
1174
(* let full_model = nb_assigns() = nb_vars () in*)
@@ -1170,7 +1179,8 @@ module Make (Th : Theory.S) : SAT_ML with type th = Th.t = struct
1170
1179
in
1171
1180
Steps. incr (Steps. Th_assumed cpt);
1172
1181
env.tenv < - t;
1173
- do_case_split env Util. AfterTheoryAssume
1182
+ if not env.is_searching then (env.delayed_cs < - true ; C_none )
1183
+ else do_case_split env Util. AfterTheoryAssume
1174
1184
(* if full_model then expensive_theory_propagate ()
1175
1185
else None*)
1176
1186
with Ex. Inconsistent (dep , _terms ) ->
@@ -1905,6 +1915,7 @@ module Make (Th : Theory.S) : SAT_ML with type th = Th.t = struct
1905
1915
let n_of_learnts =
1906
1916
ref ((Atom. to_float (nb_clauses env)) *. env.learntsize_factor) in
1907
1917
try
1918
+ env.is_searching < - true ;
1908
1919
while true do
1909
1920
(try search env (ref Auto )
1910
1921
(Atom. to_int ! n_of_conflicts) (Atom. to_int ! n_of_learnts);
@@ -1915,6 +1926,7 @@ module Make (Th : Theory.S) : SAT_ML with type th = Th.t = struct
1915
1926
with
1916
1927
| Sat ->
1917
1928
(* check_model ();*)
1929
+ env.is_searching < - false ;
1918
1930
remove_satisfied env env.clauses;
1919
1931
remove_satisfied env env.learnts;
1920
1932
raise Sat
0 commit comments