X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_paramodulation%2Findex.ml;h=3c203d3a7131e7ce1d2411f950975a29c19d9753;hb=1c9b8f3ba2c86446d44160ae494bc85624bc5eaf;hp=d07fba8a44a78b180a5578912e03c1e43c0080f0;hpb=6c4056ea40b96039f24eeda9a1e1900c95bad7c8;p=helm.git diff --git a/helm/software/components/ng_paramodulation/index.ml b/helm/software/components/ng_paramodulation/index.ml index d07fba8a4..3c203d3a7 100644 --- a/helm/software/components/ng_paramodulation/index.ml +++ b/helm/software/components/ng_paramodulation/index.ml @@ -12,7 +12,7 @@ (* $Id$ *) module Index(B : Terms.Blob) = struct - module U = Terms.Utils(B) + module U = FoUtils.Utils(B) module ClauseOT = struct @@ -43,9 +43,11 @@ module Index(B : Terms.Blob) = struct let rec aux arity = function | Terms.Leaf a -> [Constant (a, arity)] | Terms.Var i -> assert (arity = 0); [Variable] - | Terms.Node (Terms.Var _::_) -> assert false + | Terms.Node (Terms.Var _::_) -> + (* FIXME : should this be allowed or not ? *) + assert false | Terms.Node ([] | [ _ ] ) -> assert false - | Terms.Node (Terms.Node _::_) -> assert false + | Terms.Node (Terms.Node _::_) -> assert false | Terms.Node (hd::tl) -> aux (List.length tl) hd @ List.flatten (List.map (aux 0) tl) in @@ -77,4 +79,20 @@ module Index(B : Terms.Blob) = struct type dataset = ClauseSet.t = Make(FotermIndexable)(ClauseSet) + let index_unit_clause t = function + | (_,Terms.Equation (l,_,_,Terms.Gt),_,_) as c -> + DT.index 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) + | (_,Terms.Equation (_,r,_,Terms.Eq),_,_) -> assert false + | (_,Terms.Predicate p,_,_) as c -> + DT.index t p (Terms.Nodir, c) + ;; + + type active_set = B.t Terms.unit_clause list * DT.t + end