| 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,ty,t) ->
+ TermSet.union (aux s) (TermSet.union (aux ty) (aux t))
| t -> TermSet.empty (* TODO: maybe add other cases? *)
in
aux term
| C.Cast (t1, t2)
| C.Lambda (_, t1, t2)
| C.Prod (_, t1, t2)
- | C.LetIn (_, t1, t2) ->
+ | C.LetIn (_, t1, _, t2) ->
let w1 = aux t1 in
let w2 = aux t2 in
w1 + w2 + 1
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
d
);
*)
- w + d
+ w + d
;;
(* old
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
;;
-type equality_sign = Negative | Positive;;
-
-let string_of_sign = function
- | Negative -> "Negative"
- | Positive -> "Positive"
-;;
-
-
type pos = Left | Right
let string_of_pos = function