refactor: a bit of cleanup for mcsat

This commit is contained in:
Simon Cruanes 2019-02-09 17:12:33 -06:00 committed by Guillaume Bury
parent 7583e78bd2
commit 8ad78b2acd

View file

@ -850,20 +850,23 @@ module Make(Plugin : PLUGIN)
| None -> assert false | None -> assert false
) )
(* When we have a new literal, let mk_atom_mcsat_ st a =
we need to first create the list of its subterms. *) match a.var.v_assignable with
let mk_atom st (f:formula) : atom =
let res = Atom.make st.st f in
if Plugin.mcsat then (
begin match res.var.v_assignable with
| Some _ -> () | Some _ -> ()
| None -> | None ->
let l = ref [] in let l = ref [] in
Plugin.iter_assignable st.th Plugin.iter_assignable st.th
(fun t -> l := Lit.make st.st t :: !l) (fun t -> l := Lit.make st.st t :: !l)
res.var.pa.lit; a.var.pa.lit;
res.var.v_assignable <- Some !l; a.var.v_assignable <- Some !l;
end; ()
(* When we have a new literal,
we need to first create the list of its subterms. *)
let mk_atom st (f:formula) : atom =
let res = Atom.make st.st f in
if Plugin.mcsat then (
mk_atom_mcsat_ st res;
); );
res res