let remove_self_conflicts deps confl =
let s = ref PSet.empty in
PTbl.iteri
(fun p f ->
if Formula.exists (fun d ->
match Disj.to_lit d with Some q ->
Conflict.check confl p q | None -> false
) f
then
s := PSet.add p !s)
deps;
PTbl.map
(fun f ->
Formula.fold
(fun d f ->
let d = Disj.filter (fun q -> not (PSet.mem q !s)) d in
Formula.conj (Formula.of_disj d) f)
f Formula._true)
deps