X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_paramodulation%2Fsuperposition.ml;h=42cf063b64f08b3e352693d7a30bebff78025e95;hb=23fa9e70972efb0a805a4fecf6c91103f42408f2;hp=f38acb536a707eeb5d0871b781af25cd2af412eb;hpb=bca340f9c590e6530f8346fddd61c9fa0ae7f411;p=helm.git diff --git a/helm/software/components/ng_paramodulation/superposition.ml b/helm/software/components/ng_paramodulation/superposition.ml index f38acb536..42cf063b6 100644 --- a/helm/software/components/ng_paramodulation/superposition.ml +++ b/helm/software/components/ng_paramodulation/superposition.ml @@ -272,7 +272,12 @@ module Superposition (B : Orderings.Blob) = let rec demodulate bag (id, literal, vl, pr) table = debug (lazy ("demodulate " ^ (string_of_int id))); match literal with - | Terms.Predicate t -> assert false + | Terms.Predicate t -> (* assert false *) + let bag,_,id1 = + visit bag [] (fun x -> x) id t (ctx_demod table vl) + in + let cl,_,_ = Terms.get_from_bag id1 bag in + bag,cl | Terms.Equation (l,r,ty,_) -> let bag,l,id1 = visit bag [2] @@ -412,6 +417,7 @@ module Superposition (B : Orderings.Blob) = match acc with | None -> None | Some(bag,maxvar,(id,lit,vl,p),subst) -> + (* prerr_endline ("input subst = "^Pp.pp_substitution subst); *) let l = Subst.apply_subst subst l in let r = Subst.apply_subst subst r in try @@ -426,6 +432,8 @@ module Superposition (B : Orderings.Blob) = with FoUnif.UnificationFailure _ -> match rewrite_eq ~unify l r ty vl table with | Some (id2, dir, subst1) -> + (* prerr_endline ("subst1 = "^Pp.pp_substitution subst1); + prerr_endline ("old subst = "^Pp.pp_substitution subst);*) let newsubst = Subst.concat subst1 subst in let id_t = FoSubst.apply_subst newsubst @@ -437,7 +445,9 @@ module Superposition (B : Orderings.Blob) = subst1 id id2 (pos@[2]) dir with | Some ((bag, maxvar), c), r -> - let newsubst = Subst.concat r newsubst in + (* prerr_endline ("r = "^Pp.pp_substitution r); *) + let newsubst = Subst.flat + (Subst.concat r subst) in Some(bag,maxvar,c,newsubst) | None, _ -> assert false) | None ->