X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_transformations%2FtacticAstPp.ml;h=86c7185ecf1308d75e1f34707059c1cc77f3fc1f;hb=3ea21b6d721c759876aa53385b421cb1412e11f5;hp=83fdaf0829d7238c20faa991b08f96b373b3201f;hpb=2b01133527077e8dd554f0fbcc51368903dd3b8c;p=helm.git diff --git a/helm/ocaml/cic_transformations/tacticAstPp.ml b/helm/ocaml/cic_transformations/tacticAstPp.ml index 83fdaf082..86c7185ec 100644 --- a/helm/ocaml/cic_transformations/tacticAstPp.ml +++ b/helm/ocaml/cic_transformations/tacticAstPp.ml @@ -37,6 +37,8 @@ let pp_term_cic term = CicPp.ppterm term let pp_idents idents = "[" ^ String.concat "; " idents ^ "]" +let pp_terms_ast terms = String.concat ", " (List.map pp_term_ast terms) + let pp_reduction_kind = function | `Reduce -> "reduce" | `Simpl -> "simplify" @@ -80,8 +82,12 @@ let rec pp_tactic = function | ElimType (_, term) -> "elim type " ^ pp_term_ast term | Exact (_, term) -> "exact " ^ pp_term_ast term | Exists _ -> "exists" - | Fold (_, kind, pattern) -> - sprintf "fold %s %s" (pp_reduction_kind kind) (pp_pattern pattern) + | Fold (_, kind, term, pattern) -> + sprintf "fold %s %s %s" (pp_reduction_kind kind) + (pp_term_ast term) (pp_pattern pattern) + | FwdSimpl (_, hyp, idents) -> + sprintf "fwd %s%s" hyp + (match idents with [] -> "" | idents -> " " ^ pp_idents idents) | Generalize (_, pattern, ident) -> sprintf "generalize %s%s" (pp_pattern pattern) (match ident with None -> "" | Some id -> " as " ^ id) @@ -95,6 +101,12 @@ let rec pp_tactic = function sprintf "intros%s%s" (match num with None -> "" | Some num -> " " ^ string_of_int num) (match idents with [] -> "" | idents -> " " ^ pp_idents idents) + | LApply (_, level_opt, terms, term, ident_opt) -> + sprintf "lapply %s%s%s%s" + (match level_opt with None -> "" | Some i -> " depth = " ^ string_of_int i ^ " ") + (pp_term_ast term) + (match terms with [] -> "" | _ -> " to " ^ pp_terms_ast terms) + (match ident_opt with None -> "" | Some ident -> " using " ^ ident) | Left _ -> "left" | LetIn (_, term, ident) -> sprintf "let %s in %s" (pp_term_ast term) ident | Reduce (_, kind, pat) -> @@ -112,11 +124,6 @@ let rec pp_tactic = function | Split _ -> "split" | Symmetry _ -> "symmetry" | Transitivity (_, term) -> "transitivity " ^ pp_term_ast term - | FwdSimpl (_, term) -> sprintf "fwd %s" (pp_term_ast term) - | LApply (_, term_opt, term, ident) -> - sprintf "lapply %s%s%s" (pp_term_ast term) - (match term_opt with None -> "" | Some t -> " to " ^ pp_term_ast t) - (match ident with None -> "" | Some id -> " using " ^ id) let pp_flavour = function | `Definition -> "Definition"