Optim for non-mcsat solvers

This commit is contained in:
Guillaume Bury 2016-07-29 23:20:31 +02:00
parent 7016bb1825
commit 6f54604dc9

View file

@ -185,15 +185,17 @@ module Make
to ignore some subterms for instance), so we want to 'cache' to list to ignore some subterms for instance), so we want to 'cache' to list
of subterms of each formula, so we have a field [v_assignable] of subterms of each formula, so we have a field [v_assignable]
directly in variables to do so. *) directly in variables to do so. *)
let iter_sub f v = match v.v_assignable with let iter_sub f v =
| None -> assert false if St.mcsat then
| Some [] -> () match v.v_assignable with
| Some l -> List.iter f l | Some l -> List.iter f l
| None -> assert false
(* When we have a new literal, (* When we have a new literal,
we need to first create the list of its subterms. *) we need to first create the list of its subterms. *)
let atom (f:St.formula) : atom = let atom (f:St.formula) : atom =
let res = add_atom f in let res = add_atom f in
if St.mcsat then
begin match res.var.v_assignable with begin match res.var.v_assignable with
| Some _ -> () | Some _ -> ()
| None -> | None ->