]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/acic_procedural/proceduralTypes.ml
- Procedural: now we generate the exact tactic (in place of some apply tactics) and...
[helm.git] / helm / software / components / acic_procedural / proceduralTypes.ml
index cb4c11d2ee6f87b10d671297b936f903a4da36a4..75ce2ee6464c5cbc250240f5673ba0770aebb7f6 100644 (file)
@@ -74,6 +74,7 @@ type step = Note of note
          | Statement of flavour * name * what * body * note
           | Qed of note
          | Id of note
+         | Exact of what * note
          | Intros of count option * name list * note
          | Cut of name * what * note
          | LetIn of name * what * note
@@ -166,6 +167,10 @@ let mk_id punctation =
    let tactic = G.IdTac floc in
    mk_tactic tactic punctation
 
+let mk_exact t punctation =
+   let tactic = G.Exact (floc, t) in
+   mk_tactic tactic punctation
+
 let mk_intros xi xids punctation =
    let tactic = G.Intros (floc, (xi, xids)) in
    mk_tactic tactic punctation
@@ -239,6 +244,7 @@ let rec render_step sep a = function
    | Statement (f, n, t, v, s) -> mk_statement f n t v :: mk_thnote s a 
    | Inductive (lps, ts, s)    -> mk_inductive lps ts :: mk_thnote s a
    | Qed s                     -> mk_qed :: mk_tacnote s a
+   | Exact (t, s)              -> mk_exact t sep :: mk_tacnote s a   
    | Id s                      -> mk_id sep :: mk_tacnote s a
    | Intros (c, ns, s)         -> mk_intros c ns sep :: mk_tacnote s a
    | Cut (n, t, s)             -> mk_cut n t sep :: mk_tacnote s a
@@ -275,6 +281,7 @@ let rec count_step a = function
    | Note _
    | Statement _  
    | Id _
+   | Exact _
    | Qed _           -> a
    | Branch (pps, _) -> List.fold_left count_steps a pps
    | _               -> succ a   
@@ -292,6 +299,7 @@ let rec count_node a = function
    | Intros _
    | Clear _
    | ClearBody _             -> a
+   | Exact (t, _) 
    | Cut (_, t, _)
    | LetIn (_, t, _)
    | Apply (t, _)            -> count a (H.cic t)