]> matita.cs.unibo.it Git - helm.git/blobdiff - components/grafite/grafiteAst.ml
new implementation of the destruct tactic,
[helm.git] / components / grafite / grafiteAst.ml
index 0b54b68a4c6a1717b5d515f976cb2f40ce65be79..3e87ffba5a3b56573bcc5bfb4812c74dd8d354b7 100644 (file)
@@ -27,7 +27,7 @@
 
 type direction = [ `LeftToRight | `RightToLeft ]
 
-type loc = Token.flocation
+type loc = Stdpp.location
 
 type ('term, 'lazy_term, 'ident) pattern =
   'lazy_term option * ('ident * 'term) list * 'term option
@@ -71,7 +71,7 @@ type ('term, 'lazy_term, 'reduction, 'ident) tactic =
   | Cut of loc * 'ident option * 'term
   | Decompose of loc * 'ident option list
   | Demodulate of loc
-  | Destruct of loc * 'term
+  | Destruct of loc * 'term option
   | Elim of loc * 'term * 'term option * ('term, 'lazy_term, 'ident) pattern *
            'ident intros_spec
   | ElimType of loc * 'term * 'term option * 'ident intros_spec
@@ -96,7 +96,6 @@ type ('term, 'lazy_term, 'reduction, 'ident) tactic =
   | Right of loc
   | Ring of loc
   | Split of loc
-  | Subst of loc
   | Symmetry of loc
   | Transitivity of loc * 'term
   (* Costruttori Aggiunti *)
@@ -114,7 +113,7 @@ type ('term, 'lazy_term, 'reduction, 'ident) tactic =
   | AndElim of loc * 'term * 'ident * 'term * 'ident * 'term
   | RewritingStep of
      loc * (string option * 'term) option * 'term  *
-      [ `Term of 'term | `Auto of (string * string) list ] *
+      [ `Term of 'term | `Auto of (string * string) list | `Proof ] *
       bool (* last step*)
   
 type search_kind = [ `Locate | `Hint | `Match | `Elim ]
@@ -126,25 +125,26 @@ type presentation_style = Declarative
 
 type 'term macro = 
   (* Whelp's stuff *)
-  | WHint of loc * 'term 
+  | WHint of loc * 'term
   | WMatch of loc * 'term 
   | WInstance of loc * 'term 
   | WLocate of loc * string
   | WElim of loc * 'term
   (* real macros *)
   | Check of loc * 'term 
-  | Hint of loc
+  | Hint of loc * bool
   | AutoInteractive of loc * (string * string) list
   | 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 = 11
+let magic = 12
 
 type ('term,'obj) command =
   | Index of loc * 'term option (* key *) * UriManager.uri (* value *)
-  | Coercion of loc * UriManager.uri * bool (* add_obj *) * int (* arity *)
+  | Coercion of loc * UriManager.uri * bool (* add_obj *) *
+     int (* arity *) * int (* saturations *)
   | Default of loc * string * UriManager.uri list
   | Drop of loc
   | Include of loc * string