X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fgrafite%2FgrafiteAst.ml;h=d2e2f6f5f20f6ac7287f770d1d61287448944eb0;hb=ca41435a6021292ccba239aa173651c0be705b45;hp=3e87ffba5a3b56573bcc5bfb4812c74dd8d354b7;hpb=2c80e9d9409119febcab9c08d6e6cad702384169;p=helm.git diff --git a/helm/software/components/grafite/grafiteAst.ml b/helm/software/components/grafite/grafiteAst.ml index 3e87ffba5..d2e2f6f5f 100644 --- a/helm/software/components/grafite/grafiteAst.ml +++ b/helm/software/components/grafite/grafiteAst.ml @@ -34,13 +34,18 @@ type ('term, 'lazy_term, 'ident) pattern = type 'lazy_term reduction = [ `Normalize - | `Reduce | `Simpl | `Unfold of 'lazy_term option | `Whd ] type 'ident intros_spec = int option * 'ident option list +type 'term auto_params = 'term list * (string*string) list + +type 'term just = + [ `Term of 'term + | `Auto of 'term auto_params ] + type ('term, 'lazy_term, 'reduction, 'ident) tactic = (* Higher order tactics (i.e. tacticals) *) | Do of loc * int * ('term, 'lazy_term, 'reduction, 'ident) tactic @@ -58,10 +63,11 @@ type ('term, 'lazy_term, 'reduction, 'ident) tactic = (* Real tactics *) | Absurd of loc * 'term | Apply of loc * 'term - | ApplyS of loc * 'term * (string * string) list + | ApplyS of loc * 'term * 'term auto_params | Assumption of loc - | AutoBatch of loc * (string * string) list - | Cases of loc * 'term * 'ident intros_spec + | AutoBatch of loc * 'term auto_params + | Cases of loc * 'term * ('term, 'lazy_term, 'ident) pattern * + 'ident intros_spec | Change of loc * ('term, 'lazy_term, 'ident) pattern * 'lazy_term | Clear of loc * 'ident list | ClearBody of loc * 'ident @@ -70,8 +76,8 @@ type ('term, 'lazy_term, 'reduction, 'ident) tactic = | Contradiction of loc | Cut of loc * 'ident option * 'term | Decompose of loc * 'ident option list - | Demodulate of loc - | Destruct of loc * 'term option + | Demodulate of loc * 'term auto_params + | Destruct of loc * 'term list option | Elim of loc * 'term * 'term option * ('term, 'lazy_term, 'ident) pattern * 'ident intros_spec | ElimType of loc * 'term * 'term option * 'ident intros_spec @@ -98,22 +104,24 @@ type ('term, 'lazy_term, 'reduction, 'ident) tactic = | Split of loc | Symmetry of loc | Transitivity of loc * 'term - (* Costruttori Aggiunti *) + (* Declarative language *) | Assume of loc * 'ident * 'term | Suppose of loc * 'term *'ident * 'term option - | By_term_we_proved of loc *'term option * 'term * 'ident option * 'term option + | By_just_we_proved of loc * 'term just * + 'term * 'ident option * 'term option | We_need_to_prove of loc * 'term * 'ident option * 'term option - | Bydone of loc * 'term option + | Bydone of loc * 'term just | We_proceed_by_induction_on of loc * 'term * 'term | We_proceed_by_cases_on of loc * 'term * 'term | Byinduction of loc * 'term * 'ident | Thesisbecomes of loc * 'term | Case of loc * string * (string * 'term) list - | ExistsElim of loc * 'term option * 'ident * 'term * 'ident * 'lazy_term - | AndElim of loc * 'term * 'ident * 'term * 'ident * 'term + | ExistsElim of loc * 'term just * 'ident * 'term * 'ident * 'lazy_term + | AndElim of loc * 'term just * 'ident * 'term * 'ident * 'term | RewritingStep of loc * (string option * 'term) option * 'term * - [ `Term of 'term | `Auto of (string * string) list | `Proof ] * + [ `Term of 'term | `Auto of 'term auto_params + | `Proof | `SolveWith of 'term ] * bool (* last step*) type search_kind = [ `Locate | `Hint | `Match | `Elim ] @@ -133,17 +141,17 @@ type 'term macro = (* real macros *) | Check of loc * 'term | Hint of loc * bool - | AutoInteractive of loc * (string * string) list + | AutoInteractive of loc * 'term auto_params | Inline of loc * presentation_style * string * string (* URI or base-uri, name prefix *) (** To be increased each time the command type below changes, used for "safe" * marshalling *) -let magic = 12 +let magic = 13 type ('term,'obj) command = | Index of loc * 'term option (* key *) * UriManager.uri (* value *) - | Coercion of loc * UriManager.uri * bool (* add_obj *) * + | Coercion of loc * 'term * bool (* add_obj *) * int (* arity *) * int (* saturations *) | Default of loc * string * UriManager.uri list | Drop of loc