X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_paramodulation%2Forderings.ml;h=024056ea221d6e2f4ec1c1f4f093716dc19655c2;hb=33a4938d5ce3a5c240c0d35b6362c8072f8ba482;hp=4c6e0a977d7c7600e4a2449e9cb2bd2c11d0eb34;hpb=5642a453e8b4bbe228d126aa0c44d31e101969ec;p=helm.git diff --git a/helm/software/components/ng_paramodulation/orderings.ml b/helm/software/components/ng_paramodulation/orderings.ml index 4c6e0a977..024056ea2 100644 --- a/helm/software/components/ng_paramodulation/orderings.ml +++ b/helm/software/components/ng_paramodulation/orderings.ml @@ -249,12 +249,14 @@ let relocate maxvar varlist subst = ;; let are_invertible l r = - let varlist = Terms.vars_of_term l in + let varlist = (Terms.vars_of_term l)@(Terms.vars_of_term r) in let maxvar = List.fold_left max 0 varlist in let _,_,subst = relocate maxvar varlist FoSubst.id_subst in - let l = FoSubst.apply_subst subst l in - try (ignore(alpha_eq l r);true) with + let newl = FoSubst.apply_subst subst l in + let newr = FoSubst.apply_subst subst r in + try (let subst = alpha_eq l newr in eq_foterm newl (FoSubst.apply_subst subst r)) with UnificationFailure _ -> false +;; let compute_unit_clause_weight = compute_unit_clause_weight;; let compute_goal_weight = compute_goal_weight;; @@ -401,6 +403,7 @@ module LPO (B : Terms.Blob) = struct | XLT -> if check_subterms t (l_ol,tl1) then XLT else XINCOMPARABLE | XEQ -> + (try let lex = List.fold_left2 (fun acc si ti -> if acc = XEQ then lpo si ti else acc) XEQ tl1 tl2 @@ -413,6 +416,7 @@ module LPO (B : Terms.Blob) = struct if List.for_all (fun x -> lpo x t = XLT) tl1 then XLT else XINCOMPARABLE | o -> o) + with Invalid_argument _ -> assert false) | XINCOMPARABLE -> XINCOMPARABLE | _ -> assert false end