index.cmi: terms.cmi orderings.cmi
foUnif.cmi: terms.cmi orderings.cmi
superposition.cmi: terms.cmi orderings.cmi index.cmi
-stats.cmi: orderings.cmi
+stats.cmi: terms.cmi orderings.cmi
paramod.cmi: terms.cmi orderings.cmi
nCicBlob.cmi: terms.cmi
cicBlob.cmi: terms.cmi
orderings.cmx: terms.cmx pp.cmx orderings.cmi
foUtils.cmo: terms.cmi orderings.cmi foSubst.cmi foUtils.cmi
foUtils.cmx: terms.cmx orderings.cmx foSubst.cmx foUtils.cmi
-index.cmo: terms.cmi orderings.cmi foUtils.cmi index.cmi
-index.cmx: terms.cmx orderings.cmx foUtils.cmx index.cmi
+index.cmo: terms.cmi pp.cmi orderings.cmi foUtils.cmi foUnif.cmi foSubst.cmi \
+ index.cmi
+index.cmx: terms.cmx pp.cmx orderings.cmx foUtils.cmx foUnif.cmx foSubst.cmx \
+ index.cmi
foUnif.cmo: terms.cmi orderings.cmi foUtils.cmi foSubst.cmi foUnif.cmi
foUnif.cmx: terms.cmx orderings.cmx foUtils.cmx foSubst.cmx foUnif.cmi
superposition.cmo: terms.cmi pp.cmi orderings.cmi index.cmi foUtils.cmi \
| (_,Terms.Equation (_,r,_,Terms.Lt),_,_) as c ->
DT.index t r (Terms.Right2Left, c)
| (_,Terms.Equation (l,r,_,Terms.Incomparable),vl,_) as c ->
- if are_invertible maxvar vl l r then
+(* if are_invertible maxvar vl l r then
(prerr_endline ("Invertible " ^ (Pp.pp_foterm l) ^ "=" ^
(Pp.pp_foterm r));
DT.index t l (Terms.Left2Right, c))
- else
+ else *)
DT.index
(DT.index t l (Terms.Left2Right, c))
r (Terms.Right2Left, c)
HExtlib.list_mapi_acc (fun x _ a -> P.mk_goal a x) (bag,maxvar) [t]
in
match
- P.paramod ~max_steps:max_int ~timeout:(Unix.gettimeofday () +. 300.0)
+ P.paramod ~useage:true ~max_steps:max_int ~timeout:(Unix.gettimeofday () +. 300.0)
~g_passives:goals ~passives (bag,maxvar)
with
| P.Error _ | P.GaveUp | P.Timeout _ -> []
type bag = t Terms.bag * int
val mk_passive : bag -> input * input -> bag * t Terms.unit_clause
val mk_goal : bag -> input * input -> bag * t Terms.unit_clause
- val paramod :
+ val paramod :
+ useage:bool ->
max_steps:int ->
?timeout:float ->
bag ->
add_passive_goals g_passives new_goals
;;
- let rec given_clause ~noinfer
+ let rec given_clause ~useage ~noinfer
bag maxvar iterno weight_picks max_steps timeout
actives passives g_actives g_passives
=
else if false then (* activates last chance strategy *)
begin
debug("Last chance: "^string_of_float (Unix.gettimeofday()));
- given_clause ~noinfer:true bag maxvar iterno weight_picks max_steps
+ given_clause ~useage ~noinfer:true bag maxvar iterno weight_picks max_steps
(Some (Unix.gettimeofday () +. 20.))
actives passives g_actives g_passives;
raise (Stop (Timeout (maxvar,bag)));
end
else raise (Stop (Timeout (maxvar,bag)));
- let use_age = false && (weight_picks = (iterno / 6 + 1)) in
+ let use_age = useage && (weight_picks = (iterno / 6 + 1)) in
let weight_picks = if use_age then 0 else weight_picks+1
in
debug
(Printf.sprintf "Number of passives : %d"
(passive_set_cardinal passives));
- given_clause ~noinfer
+ given_clause ~useage ~noinfer
bag maxvar iterno weight_picks max_steps timeout
actives passives g_actives g_passives
;;
- let paramod ~max_steps ?timeout (bag,maxvar) ~g_passives ~passives =
+ let paramod ~useage ~max_steps ?timeout (bag,maxvar) ~g_passives ~passives =
let initial_timestamp = Unix.gettimeofday () in
let passives =
add_passive_clauses ~no_weight:true passive_empty_set passives
let g_actives = [] in
let actives = [], IDX.DT.empty in
try
- given_clause ~noinfer:false
+ given_clause ~useage ~noinfer:false
bag maxvar 0 0 max_steps timeout actives passives g_actives g_passives
with
| Sup.Success (bag, _, (i,_,_,_)) ->
val mk_passive : bag -> input * input -> bag * t Terms.unit_clause
val mk_goal : bag -> input * input -> bag * t Terms.unit_clause
val paramod :
+ useage:bool ->
max_steps:int ->
?timeout:float ->
bag ->
(t,occ,ar,goal_occ_nbr t goal,goal_pos t goal)::acc) res []
;;
+ let rec leaf_count = function
+ | Terms.Node l -> List.fold_left (fun acc x -> acc + (leaf_count x)) 0 l
+ | Terms.Leaf _ -> 1
+ | _ -> 0
+ ;;
+
let rec dependencies op clauses acc =
match clauses with
| [] -> acc
else
dependencies op tl acc
else dependencies op tl acc
+ | ((Terms.Node (Terms.Leaf op1::t) as x),y)
+ | (y,(Terms.Node (Terms.Leaf op1::t) as x)) when leaf_count x > leaf_count y ->
+ let rec term_leaves = function
+ | Terms.Node l -> List.fold_left (fun acc x -> acc @ (term_leaves x)) [] l
+ | Terms.Leaf x -> [x]
+ | _ -> []
+ in
+ if List.mem op (List.filter (fun z -> not (B.eq op1 z)) (term_leaves x)) then
+ dependencies op tl (op1::acc)
+ else
+ dependencies op tl acc
| _ -> dependencies op tl acc
;;
- let dependencies op clauses = dependencies op clauses [];;
+ let dependencies op clauses = HExtlib.list_uniq (List.sort Pervasives.compare (dependencies op clauses []));;
(* let max_weight_hyp = *)