(true,snd g_cl,passives,PassiveSet.remove g_cl g_passives)
in
- let backward_infer_step bag maxvar actives passives g_actives g_passives g_current =
+ let backward_infer_step bag maxvar actives passives
+ g_actives g_passives g_current =
(* superposition left, simplifications on goals *)
debug "infer_left step...";
- debug ("Selected goal : " ^ Pp.pp_unit_clause g_current);
- let bag, g_current =
- Sup.simplify_goal maxvar (snd actives) bag g_current
- in
- debug "Simplified goal";
let bag, maxvar, new_goals =
Sup.infer_left bag maxvar g_current actives
in
let bag, g_actives =
List.fold_left
(fun (bag,acc) c ->
- let bag, c = Sup.simplify_goal maxvar (snd actives) bag c in
- bag, c::acc)
+ match Sup.simplify_goal maxvar (snd actives) bag acc c with
+ | None -> bag, acc
+ | Some (bag,c) -> bag,c::acc)
(bag,[]) g_actives
in
let ctable = IDX.index_unit_clause IDX.DT.empty current in
let rec aux_select passives g_passives =
let backward,current,passives,g_passives = select passives g_passives in
if backward then
- backward_infer_step bag maxvar actives passives
- g_actives g_passives current
+ match Sup.simplify_goal maxvar (snd actives) bag g_actives current with
+ | None -> aux_select passives g_passives
+ | Some x -> let bag,g_current = x in
+ backward_infer_step bag maxvar actives passives
+ g_actives g_passives g_current
else
(* debug ("Selected fact : " ^ Pp.pp_unit_clause current); *)
match Sup.keep_simplified current actives bag maxvar with