X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_paramodulation%2Findex.ml;h=b6ca890b2c3ee9c777f70246c7a45a3932c5ab9a;hb=449295993c1fb0732fd5b14a570f8c5260653164;hp=3c203d3a7131e7ce1d2411f950975a29c19d9753;hpb=40ce8d1c14808ea7608ee2988bd9aba77ddf8200;p=helm.git diff --git a/helm/software/components/ng_paramodulation/index.ml b/helm/software/components/ng_paramodulation/index.ml index 3c203d3a7..b6ca890b2 100644 --- a/helm/software/components/ng_paramodulation/index.ml +++ b/helm/software/components/ng_paramodulation/index.ml @@ -11,8 +11,10 @@ (* $Id$ *) -module Index(B : Terms.Blob) = struct +module Index(B : Orderings.Blob) = struct module U = FoUtils.Utils(B) + module Unif = FoUnif.Founif(B) + module Pp = Pp.Pp(B) module ClauseOT = struct @@ -78,21 +80,28 @@ module Index(B : Terms.Blob) = struct type data = ClauseSet.elt and type dataset = ClauseSet.t = Make(FotermIndexable)(ClauseSet) - - let index_unit_clause t = function + + let process op t = function | (_,Terms.Equation (l,_,_,Terms.Gt),_,_) as c -> - DT.index t l (Terms.Left2Right, c) + op t l (Terms.Left2Right, c) | (_,Terms.Equation (_,r,_,Terms.Lt),_,_) as c -> - DT.index t r (Terms.Right2Left, c) - | (_,Terms.Equation (l,r,_,Terms.Incomparable),_,_) as c -> - DT.index - (DT.index t l (Terms.Left2Right, c)) - r (Terms.Right2Left, c) + op t r (Terms.Right2Left, c) + | (_,Terms.Equation (l,r,_,Terms.Incomparable),vl,_) as c -> + op (op t l (Terms.Left2Right, c)) + r (Terms.Right2Left, c) + | (_,Terms.Equation (l,r,_,Terms.Invertible),vl,_) as c -> + op t l (Terms.Left2Right, c) | (_,Terms.Equation (_,r,_,Terms.Eq),_,_) -> assert false | (_,Terms.Predicate p,_,_) as c -> - DT.index t p (Terms.Nodir, c) + op t p (Terms.Nodir, c) ;; + let index_unit_clause = + process DT.index + + let remove_unit_clause = + process DT.remove_index + type active_set = B.t Terms.unit_clause list * DT.t end