]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/grafite/grafiteAst.ml
Add drafts for some tactics
[helm.git] / matita / components / grafite / grafiteAst.ml
index ff26c00d680315440942891ec47411c8d053f316..ed757f601613cf6a0dd711860599d6454aacb8f5 100644 (file)
@@ -36,6 +36,11 @@ type npattern =
 
 type auto_params = nterm list option * (string*string) list
 
+(* The additional a is for abstract *)
+type 'term aauto_params = 'term list option * (string*string) list
+
+type 'term just = [`Term of 'term | `Auto of 'term aauto_params]
+
 type ntactic =
    | NApply of loc * nterm
    | NSmartApply of loc * nterm
@@ -75,6 +80,19 @@ type ntactic =
    | NAssumption of loc
    | NRepeat of loc * ntactic
    | NBlock of loc * ntactic list
+   (* Declarative langauge *)
+   (* Not the best idea to use a string directly, an abstract type for identifiers would be better *)
+   | Assume of loc * string * nterm * nterm option (* loc, identifier, type, eqty *)
+   | Suppose of loc * nterm *string * nterm option (* loc, assumption, identifier, eqass *)
+   | By_just_we_proved of loc * nterm just * nterm * string option * nterm option (* loc,
+   justification, conclusion, identifier, eqconcl *)
+   | We_need_to_prove of loc * nterm * string option * nterm option (* loc, newconclusion,
+   identifier, equivnewcon *)
+   | Bydone of loc * nterm just
+   (*
+   | ExistsElim of loc * nterm just * string * nterm * nterm * string
+   | AndElim of loc * nterm just * nterm * string * nterm * string
+   *)
 
 type nmacro =
   | NCheck of loc * nterm
@@ -84,7 +102,7 @@ type nmacro =
 
 (** To be increased each time the command type below changes, used for "safe"
  * marshalling *)
-let magic = 35
+let magic = 37
 
 (* composed magic: term + command magics. No need to change this value *)
 let magic = magic + 10000 * NotationPt.magic
@@ -99,15 +117,14 @@ type inclusion_mode = WithPreferences | WithoutPreferences | OnlyPreferences (*
 type command =
   | Include of loc * inclusion_mode * string (* _,buri,_,path *)
   | UnificationHint of loc * nterm * int (* term, precedence *)
-  | NObj of loc * nterm NotationPt.obj
+  | NObj of loc * nterm NotationPt.obj * bool
   | NDiscriminator of loc * nterm
   | NInverter of loc * string * nterm * bool list option * nterm option
-  | NUnivConstraint of loc * NUri.uri * NUri.uri
+  | NUnivConstraint of loc * bool * NUri.uri * NUri.uri
   | NCopy of loc * string * NUri.uri * (NUri.uri * NUri.uri) list
-  | NCoercion of loc * string *
-      nterm * nterm *
-      (string * nterm) * nterm
-  | NQed of loc
+  | NCoercion of loc * string * bool * 
+      (nterm * nterm * (string * nterm) * nterm) option
+  | NQed of loc * bool
   (* ex lexicon commands *)
   | Alias of loc * alias_spec
       (** parameters, name, type, fields *)