type id = string (* the abstract type of the (annotated) node identifiers *)
type 'term explicit_named_substitution = (UriManager.uri * 'term) list
-type implicit_annotation = [ `Closed | `Type ]
-
-type anntarget =
- Object of annobj (* if annobj is a Constant, this is its type *)
- | ConstantBody of annobj
- | Term of annterm
- | Conjecture of annconjecture
- | Hypothesis of annhypothesis
+type implicit_annotation = [ `Closed | `Type | `Hole ]
(* INTERNAL REPRESENTATION OF CIC OBJECTS AND TERMS *)
-and sort =
+
+type sort =
Prop
| Set
| Type of CicUniv.universe
| CProp
-and name =
- Name of string
+
+type name =
+ | Name of string
| Anonymous
-and term =
- Rel of int (* DeBrujin index *)
+
+type object_class =
+ [ `Coercion
+ | `Elim of sort (** elimination principle; if sort is Type, the universe is
+ * not relevant *)
+ | `Record of string list (** inductive type that encodes a record;
+ the arguments are the record fields *)
+ | `Projection (** record projection *)
+ ]
+
+type attribute =
+ [ `Class of object_class
+ | `Generated
+ ]
+
+type term =
+ Rel of int (* DeBrujin index, 1 based*)
| Var of UriManager.uri * (* uri, *)
term explicit_named_substitution (* explicit named subst. *)
| Meta of int * (term option) list (* numeric id, *)
| CoFix of int * coInductiveFun list (* funno (0 based), funs *)
and obj =
Constant of string * term option * term * (* id, body, type, *)
- UriManager.uri list (* parameters *)
+ UriManager.uri list * attribute list (* parameters *)
| Variable of string * term option * term * (* name, body, type *)
- UriManager.uri list (* parameters *)
- | CurrentProof of string * metasenv * (* name, conjectures, *)
- term * term * UriManager.uri list (* value, type, parameters *)
+ UriManager.uri list * attribute list (* parameters *)
+ | CurrentProof of string * metasenv * term * (* name, conjectures, value,*)
+ term * UriManager.uri list * attribute list (* type, parameters *)
| InductiveDefinition of inductiveType list * (* inductive types, *)
- UriManager.uri list * int (* parameters, n ind. pars *)
+ UriManager.uri list * int * attribute list (* params, left params no *)
and inductiveType =
string * bool * term * (* typename, inductive, arity *)
constructor list (* constructors *)
(* depend on new ones. *)
and conjecture = int * context * term
and metasenv = conjecture list
-and substitution = (int * (context * term)) list
+and substitution = (int * (context * term * term)) list
and annobj =
AConstant of id * id option * string * (* name, *)
annterm option * annterm * (* body, type, *)
- UriManager.uri list (* parameters *)
+ UriManager.uri list * attribute list (* parameters *)
| AVariable of id *
string * annterm option * annterm * (* name, body, type *)
- UriManager.uri list (* parameters *)
+ UriManager.uri list * attribute list (* parameters *)
| ACurrentProof of id * id *
string * annmetasenv * (* name, conjectures, *)
- annterm * annterm * UriManager.uri list (* value,type,parameters *)
+ annterm * annterm * UriManager.uri list * (* value,type,parameters *)
+ attribute list
| AInductiveDefinition of id *
anninductiveType list * (* inductive types , *)
- UriManager.uri list * int (* parameters,n ind. pars*)
+ UriManager.uri list * int * attribute list (* parameters,n ind. pars*)
and anninductiveType =
id * string * bool * annterm * (* typename, inductive, arity *)
annconstructor list (* constructors *)
and anncontext = annhypothesis list
;;
+
+type anntarget =
+ Object of annobj (* if annobj is a Constant, this is its type *)
+ | ConstantBody of annobj
+ | Term of annterm
+ | Conjecture of annconjecture
+ | Hypothesis of annhypothesis
+