X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Facic_procedural%2FproceduralClassify.ml;h=53c363a428372c447284c5c3f5654dbc2cd69f4b;hb=592b7d81b57ec66e0ee007de336e249b07ae0258;hp=489feb4b66aa54385f1e3f102ecdc5381cb1d9c8;hpb=468ee32f0fc7de271454ed94643b4dd7c9578e5f;p=helm.git diff --git a/helm/software/components/acic_procedural/proceduralClassify.ml b/helm/software/components/acic_procedural/proceduralClassify.ml index 489feb4b6..53c363a42 100644 --- a/helm/software/components/acic_procedural/proceduralClassify.ml +++ b/helm/software/components/acic_procedural/proceduralClassify.ml @@ -31,7 +31,7 @@ module PEH = ProofEngineHelpers module H = ProceduralHelpers -type dependence = I.S.t * bool +type dependences = (I.S.t * bool) list type conclusion = (int * int * UM.uri * int) option @@ -56,6 +56,12 @@ let out_table b = Array.iteri map b; prerr_newline () +(* dummy dependences ********************************************************) + +let make l = + let map _ = I.S.empty, false in + List.rev_map map l + (* classification ***********************************************************) let classify_conclusion vs = @@ -111,3 +117,21 @@ try let extract (x, y, z) = y, z in List.rev_map extract (List.tl (Array.to_list b)), rc with Invalid_argument _ -> failwith "Classify.classify" + +(* adjusting the inferrable arguments that do not occur in the goal *********) + +let adjust c vs ?goal classes = + let list_xmap2 map l1 l2 = + let rec aux a = function + | hd1 :: tl1, hd2 :: tl2 -> aux (map hd1 hd2 :: a) (tl1,tl2) + | _, l2 -> List.rev_append l2 a + in + List.rev (aux [] (l1, l2)) + in + let map where what (i, b) = + let what = H.cic what in + (i, b || not (H.occurs c ~what ~where)) + in + match goal with + | None -> classes + | Some goal -> list_xmap2 (map goal) vs classes