given_clause bag maxvar actives passives g_actives g_passives
in
- let mk_clause ?(no_weight=false) bag maxvar (t,ty) =
+ let mk_clause bag maxvar (t,ty) =
let (proof,ty) = B.saturate t ty in
let c, maxvar = Utils.mk_unit_clause maxvar ty proof in
let bag, c = Utils.add_to_bag bag c in
let bag, maxvar, goal = mk_clause Terms.M.empty 0 t in
let g_actives = [] in
let g_passives =
+ (* passive_singleton (Utils.mk_passive_clause goal)*)
passive_singleton (0,goal)
in
let passives, bag, maxvar =
List.fold_left
(fun (cl, bag, maxvar) t ->
let bag, maxvar, c = mk_clause bag maxvar t in
- (add_passive_clause cl c), bag, maxvar)
+ (add_passive_clause ~no_weight:true cl c), bag, maxvar)
(passive_empty_set, bag, maxvar) table
in
let actives = [], IDX.DT.empty in
;;
(* move away *)
- let is_identity_clause = function
+ let is_identity_clause ~unify = function
| _, Terms.Equation (_,_,_,Terms.Eq), _, _ -> true
- | _, Terms.Equation (l,r,_,_), vl, proof ->
+ | _, Terms.Equation (l,r,_,_), vl, proof when unify ->
(try ignore(Unif.unification vl [] l r); true
with FoUnif.UnificationFailure _ -> false)
| _, Terms.Predicate _, _, _ -> assert false
+ | _ -> false
;;
let build_new_clause bag maxvar filter rule t subst vl id id2 pos dir =
(* demodulate and check for subsumption *)
let simplify table maxvar bag clause =
let bag, clause = demodulate bag clause table in
- if is_identity_clause clause then None
+ if is_identity_clause ~unify:false clause then None
else
match is_subsumed ~unify:false bag maxvar clause table with
| None -> Some (bag, clause)
(* this is like simplify but raises Success *)
let simplify_goal maxvar table bag g_actives clause =
let bag, clause = demodulate bag clause table in
- if (is_identity_clause clause)
+ if (is_identity_clause ~unify:true clause)
then raise (Success (bag, maxvar, clause))
else match is_subsumed ~unify:true bag maxvar clause table with
| None ->