X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Facic_procedural%2FproceduralTypes.ml;h=3b6afc4c31ac0d54f18d58613c583311801e199d;hb=5b45f78ed4293ebbe8cc73ad925bca11a300d021;hp=b194fbfa9fd9f5afce2bfa3f6384ec6d660ab85c;hpb=a57ca0d68754b946b33976acf2e72f45ff11c8d7;p=helm.git diff --git a/helm/software/components/acic_procedural/proceduralTypes.ml b/helm/software/components/acic_procedural/proceduralTypes.ml index b194fbfa9..3b6afc4c3 100644 --- a/helm/software/components/acic_procedural/proceduralTypes.ml +++ b/helm/software/components/acic_procedural/proceduralTypes.ml @@ -79,6 +79,7 @@ type step = Note of note | LetIn of name * what * note | Rewrite of how * what * where * pattern * note | Elim of what * using option * pattern * note + | Cases of what * pattern * note | Apply of what * note | Change of inferred * what * where * pattern * note | Clear of hyp list * note @@ -194,6 +195,11 @@ let mk_elim what using pattern punctation = let tactic = G.Elim (floc, what, using, pattern, (Some 0, [])) in mk_tactic tactic punctation +let mk_cases what pattern punctation = + let pattern = None, [], Some pattern in + let tactic = G.Cases (floc, what, pattern, (Some 0, [])) in + mk_tactic tactic punctation + let mk_apply t punctation = let tactic = G.ApplyP (floc, t) in mk_tactic tactic punctation @@ -239,6 +245,7 @@ let rec render_step sep a = function | LetIn (n, t, s) -> mk_letin n t sep :: mk_tacnote s a | Rewrite (b, t, w, e, s) -> mk_rewrite b t w e sep :: mk_tacnote s a | Elim (t, xu, e, s) -> mk_elim t xu e sep :: mk_tacnote s a + | Cases (t, e, s) -> mk_cases t e sep :: mk_tacnote s a | Apply (t, s) -> mk_apply t sep :: mk_tacnote s a | Change (t, _, w, e, s) -> mk_change t w e sep :: mk_tacnote s a | Clear (ns, s) -> mk_clear ns sep :: mk_tacnote s a @@ -287,6 +294,7 @@ let rec count_node a = function | Apply (t, _) -> I.count_nodes a (H.cic t) | Rewrite (_, t, _, p, _) | Elim (t, _, p, _) + | Cases (t, p, _) | Change (t, _, _, p, _) -> let a = I.count_nodes a (H.cic t) in I.count_nodes a (H.cic p)