X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=inline;f=helm%2Fsoftware%2Fcomponents%2Fng_paramodulation%2Forderings.ml;h=f7062b3abebbe2b4d95956ec6f024fd4b46dcb07;hb=HEAD;hp=7743e3726c024f55f9213dfa26f08f0c168b4630;hpb=87f1e71f269122c42c02971c82406767e3395ca5;p=helm.git diff --git a/helm/software/components/ng_paramodulation/orderings.ml b/helm/software/components/ng_paramodulation/orderings.ml index 7743e3726..f7062b3ab 100644 --- a/helm/software/components/ng_paramodulation/orderings.ml +++ b/helm/software/components/ng_paramodulation/orderings.ml @@ -40,7 +40,8 @@ let rec eq_foterm f x y = match x, y with | Terms.Leaf t1, Terms.Leaf t2 -> f t1 t2 | Terms.Var i, Terms.Var j -> i = j - | Terms.Node l1, Terms.Node l2 -> List.for_all2 (eq_foterm f) l1 l2 + | Terms.Node l1, Terms.Node l2 when List.length l1 = List.length l2 -> + List.for_all2 (eq_foterm f) l1 l2 | _ -> false ;; @@ -403,6 +404,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 @@ -415,6 +417,8 @@ 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 -> XINCOMPARABLE | _ -> assert false end