| _ -> assert false
;;
+let are_invertible relocate alpha_eq l r =
+ let varlist = Terms.vars_of_term l 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
+ FoUnif.UnificationFailure _ -> false;;
+
module NRKBO (B : Terms.Blob) = struct
let name = "nrkbo"
include B
module Pp = Pp.Pp(B)
+ module Unif = FoUnif.FoUnif(B)
+ module Utils = FoUtils.Utils(B)
let eq_foterm = eq_foterm B.eq;;
+ let are_invertible = are_invertible Utils.relocate Unif.alpha_eq;;
+
let compute_clause_weight = compute_clause_weight;;
- let compute_goal_weight = compute_goal_weight;;
(* Riazanov: p. 40, relation >_n *)
let nonrec_kbo t1 t2 =
include B
module Pp = Pp.Pp(B)
+ module Unif = FoUnif.FoUnif(B)
+ module Utils = FoUtils.Utils(B)
let eq_foterm = eq_foterm B.eq;;
+ let are_invertible = are_invertible Utils.relocate Unif.alpha_eq;;
+
let compute_clause_weight = compute_clause_weight;;
let compute_goal_weight = compute_goal_weight;;
include B
module Pp = Pp.Pp(B)
+ module Unif = FoUnif.FoUnif(B)
+ module Utils = FoUtils.Utils(B)
let eq_foterm = eq_foterm B.eq;;
+ let are_invertible = are_invertible Utils.relocate Unif.alpha_eq;;
+
let compute_clause_weight = compute_clause_weight;;
let compute_goal_weight = compute_goal_weight;;