X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=components%2Ftactics%2Fparamodulation%2Futils.ml;h=c6e64b898753f435e54a959a4d5c09dfc216e1c6;hb=249d11773d32add20d665c4f8521b7380e4fec0a;hp=eabf24353395f443beea557563d0daa4a4a7273c;hpb=b1c222ae8d9bee83d6c5723533a1395d7353893a;p=helm.git diff --git a/components/tactics/paramodulation/utils.ml b/components/tactics/paramodulation/utils.ml index eabf24353..c6e64b898 100644 --- a/components/tactics/paramodulation/utils.ml +++ b/components/tactics/paramodulation/utils.ml @@ -98,6 +98,12 @@ let metas_of_term term = | C.Meta _ as t -> TermSet.singleton t | C.Appl l -> List.fold_left (fun res t -> TermSet.union res (aux t)) TermSet.empty l + | C.Lambda(n,s,t) -> + TermSet.union (aux s) (aux t) + | C.Prod(n,s,t) -> + TermSet.union (aux s) (aux t) + | C.LetIn(n,s,t) -> + TermSet.union (aux s) (aux t) | t -> TermSet.empty (* TODO: maybe add other cases? *) in aux term @@ -346,7 +352,7 @@ let compute_equality_weight (ty,left,right,o) = let compute_equality_weight e = let w = compute_equality_weight e in - let d = distance !goal_symbols (symbols_of_eq e) in + let d = 0 in (* distance !goal_symbols (symbols_of_eq e) in *) (* prerr_endline (Printf.sprintf "dist %s --- %s === %d" (String.concat ", " (List.map (CicPp.ppterm) (TermSet.elements @@ -356,7 +362,7 @@ let compute_equality_weight e = d ); *) - w + d + w + d ;; (* old @@ -747,8 +753,7 @@ let guarded_simpl ?(debug=false) context t = if t = t' then t else begin let simpl_order = !compare_terms t t' in - if debug then - prerr_endline ("comparing "^(CicPp.ppterm t)^(CicPp.ppterm t')); + debug_print (lazy ("comparing "^(CicPp.ppterm t)^(CicPp.ppterm t'))); if simpl_order = Gt then (if debug then prerr_endline "GT";t') else (if debug then prerr_endline "NO_GT";t) end