X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Facic_procedural%2FproceduralClassify.ml;h=4f9f99fcee76117056a100bd8f1a13dfb9fcfd24;hb=b54b2b352753b1c784d06118fc689c1ee9f9feaf;hp=6c1e482c2ff4d86aee5ee01cb988e50ece825630;hpb=ac1f50b898154dc3d74aa8fa2fff212a7d3a235c;p=helm.git diff --git a/helm/software/components/acic_procedural/proceduralClassify.ml b/helm/software/components/acic_procedural/proceduralClassify.ml index 6c1e482c2..4f9f99fce 100644 --- a/helm/software/components/acic_procedural/proceduralClassify.ml +++ b/helm/software/components/acic_procedural/proceduralClassify.ml @@ -28,6 +28,8 @@ module D = Deannotate module I = CicInspect module PEH = ProofEngineHelpers +module H = ProceduralHelpers + type dependence = I.S.t * bool type conclusion = (int * int) option @@ -52,12 +54,8 @@ let out_table b = in Array.iteri map b; prerr_newline () - -(****************************************************************************) - -let identity x = x -let fst3 (x, _, _) = x +(* classification ***********************************************************) let classify_conclusion vs = let rec get_argsno = function @@ -83,12 +81,13 @@ try let rc = classify_conclusion vs in let map (b, h) (c, v) = let _, argsno = PEH.split_with_whd (c, v) in - (I.get_rels_from_premise h v, I.S.empty, argsno > 0) :: b, succ h + let iu = H.is_unsafe h (List.hd vs) in + (I.get_rels_from_premise h v, I.S.empty, argsno > 0 && iu) :: b, succ h in let l, h = List.fold_left map ([], 0) vs in let b = Array.of_list (List.rev l) in let mk_closure b h = - let map j = if j < h then I.S.union (fst3 b.(j)) else identity in + let map j = if j < h then I.S.union (H.fst3 b.(j)) else H.identity in for i = pred h downto 0 do let direct, unused, fa = b.(i) in b.(i) <- I.S.fold map direct direct, unused, fa