From: Claudio Sacerdoti Coen Date: Fri, 1 Jul 2005 13:53:46 +0000 (+0000) Subject: count_pattern implemented X-Git-Tag: PRE_GETTER_STORAGE~66 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=a587842178f40386fc34c4f64b950f3d749df2b9;hp=11184b03e0d7f02d3710d0364e0d0f17ea5eebbf;p=helm.git count_pattern implemented --- diff --git a/helm/ocaml/cic_transformations/tacticAst2Box.ml b/helm/ocaml/cic_transformations/tacticAst2Box.ml index fc5119324..151ebfd7b 100644 --- a/helm/ocaml/cic_transformations/tacticAst2Box.ml +++ b/helm/ocaml/cic_transformations/tacticAst2Box.ml @@ -36,10 +36,16 @@ open Ast2pres open TacticAst -let count_pattern current_size p = +let count_pattern current_size (wanted,hyps_pat,concl_pat) = if current_size > maxsize then current_size else -assert false + let size = countterm (current_size + 3) concl_pat in + let size = + List.fold_left + (fun s (id,t) -> countterm (s + String.length id + 1) t) size hyps_pat in + match wanted with + None -> size + 3 + | Some t -> countterm (size + 9) t let count_kind = function