in
bag, maxvar, res
;;
-
let rewrite_eq ~unify l r ty vl table =
let retrieve = if unify then IDX.DT.retrieve_unifiables
then raise (Success (bag, maxvar, clause))
else
let (id,lit,vl,_) = clause in
- if vl = [] then Some (bag,clause)
+ (* this optimization makes sense only if we demodulated, since in
+ that case the clause should have been turned into an identity *)
+ if (vl = [] && not(no_demod))
+ then Some (bag,clause)
else
let l,r,ty =
match lit with
table (Some(bag,maxvar,clause,Subst.id_subst)) with
| None -> Some (bag,clause)
| Some (bag,maxvar,cl,subst) ->
- prerr_endline "Goal subsumed";
- raise (Success (bag,maxvar,cl))
+ debug (lazy "Goal subsumed");
+ raise (Success (bag,maxvar,cl)))
(*
- else match is_subsumed ~unify:true bag maxvar clause table with
+ match is_subsumed ~unify:true bag maxvar clause table with
| None -> Some (bag, clause)
| Some ((bag,maxvar),c) ->
prerr_endline "Goal subsumed";
raise (Success (bag,maxvar,c))
-*)
+*)
;;
let prof_simplify_goal = HExtlib.profile ~enable "simplify_goal";;