]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_kernel/nCic.ml
parameter sintax added to axiom statement
[helm.git] / helm / software / components / ng_kernel / nCic.ml
index f32f6842638e196c3a74db75ea1761d0fbfd58e4..4490ee0485c218a4b7681d5c3c0048c45198abd9 100644 (file)
@@ -9,18 +9,27 @@
      \ /   This software is distributed as is, NO WARRANTY.     
       V_______________________________________________________________ *)
 
-(* $Id: nCicReduction.ml 8250 2008-03-25 17:56:20Z tassi $ *)
+(* $Id$ *)
 
 (********************************* TERMS ************************************)
 
-type sort = Prop | Type of int | CProp
+type univ_algebra = [ `Type | `Succ | `CProp ]
+
+type universe = (univ_algebra * NUri.uri) list 
+  (* Max of non-empty list of named universes, or their successor (when true) 
+   * The empty list represents type0 *)
+
+type sort = Prop | Type of universe
+
+type implicit_annotation =
+ [ `Closed | `Type | `Hole | `Tagged of string | `Term | `Typeof of int | `Vector ]
 
-type implicit_annotation = [ `Closed | `Type | `Hole | `Term ]
 
 type lc_kind = Irl of int | Ctx of term list
 
 and local_context = int * lc_kind             (* shift (0 -> no shift), 
-                                                 subst (None means id) *) 
+                                                 subst (Irl n means id of
+                                                length n) *) 
 and term =
  | Rel      of int                            (* DeBruijn index, 1 based    *)
  | Meta     of int * local_context
@@ -43,15 +52,22 @@ type context_entry =                       (* A declaration or definition *)
  | Decl of term                            (* type *)
  | Def  of term * term                     (* body, type *)
 
-type hypothesis = string * context_entry   
+type hypothesis = string * context_entry   (* name, entry *)
 
 type context = hypothesis list
 
-type conjecture = int * string option * context * term
+type meta_attr = 
+  [ `Name of string 
+  | `IsTerm | `IsType | `IsSort 
+  | `InScope | `OutScope of int]
+
+type meta_attrs = meta_attr list
+
+type conjecture =  meta_attrs * context * term
 
-type metasenv = conjecture list
+type metasenv = (int * conjecture) list
 
-type subst_entry = string option * context * term * term
+type subst_entry = meta_attrs * context * term * term (* name,ctx,bo,ty *)
 
 type substitution = (int * subst_entry) list
 
@@ -90,7 +106,7 @@ type ind_pragma = (* pragmatic of the object *)
 type generated = [ `Generated | `Provided ]
 
 type c_attr = generated * def_flavour * def_pragma
-type f_attr = generated * def_flavour
+type f_attr = generated * def_flavour * def_pragma
 type i_attr = generated * ind_pragma
 
  (* invariant: metasenv and substitution have disjoint domains *)