X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_paramodulation%2Fterms.ml;h=aefbc01a864ea3a870746f11d7273f27d5eef8ff;hb=68a557b997805b4a96fb2851cb4d2ab2076bba36;hp=0118df7c18ea4f3fc2cdcd17aaad1a2f2daeaa82;hpb=a9e037fe189335607ab5d10523c836d8c7717245;p=helm.git diff --git a/helm/software/components/ng_paramodulation/terms.ml b/helm/software/components/ng_paramodulation/terms.ml index 0118df7c1..aefbc01a8 100644 --- a/helm/software/components/ng_paramodulation/terms.ml +++ b/helm/software/components/ng_paramodulation/terms.ml @@ -56,7 +56,26 @@ module OT = module M : Map.S with type key = int = Map.Make(OT) -type 'a bag = 'a unit_clause M.t +type 'a bag = int + * (('a unit_clause * bool) M.t) + + let add_to_bag (_,lit,vl,proof) (id,bag) = + let id = id+1 in + let clause = (id, lit, vl, proof) in + let bag = M.add id (clause,false) bag in + (id,bag), clause + ;; + + let replace_in_bag ((id,_,_,_),_ as cl) (max_id,bag) = + let bag = M.add id cl bag in + (max_id,bag) + ;; + + let get_from_bag id (_,bag) = + M.find id bag + ;; + + let empty_bag = (0,M.empty);; module type Blob = sig @@ -65,8 +84,8 @@ module type Blob = val compare : t -> t -> int val eqP : t val pp : t -> string - val embed : t -> t foterm - val saturate : t -> t -> t foterm * t foterm - val mk_proof : t bag -> int -> int list -> t + type input + val embed : input -> t foterm + val saturate : input -> input -> t foterm * t foterm end