Internal check also checks for undecided lits

This commit is contained in:
Guillaume Bury 2017-03-30 19:29:53 +02:00
parent 7f634da201
commit 88eaa03968

View file

@ -1237,7 +1237,11 @@ module Make
(* Check satisfiability *) (* Check satisfiability *)
let check_clause c = let check_clause c =
let res = Array_util.exists (fun a -> a.is_true) c.atoms in let tmp = Array.map (fun a ->
if a.is_true then true
else if a.neg.is_true then false
else raise UndecidedLit) c.atoms in
let res = Array_util.exists (fun x -> x) tmp in
if not res then begin if not res then begin
Log.debugf debug "Clause not satisfied: @[<hov>%a@]" Log.debugf debug "Clause not satisfied: @[<hov>%a@]"
(fun k -> k St.pp_clause c); (fun k -> k St.pp_clause c);