From a587842178f40386fc34c4f64b950f3d749df2b9 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Fri, 1 Jul 2005 13:53:46 +0000 Subject: [PATCH] count_pattern implemented --- helm/ocaml/cic_transformations/tacticAst2Box.ml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 -- 2.39.2