X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic%2Fcic.ml;h=4b4e0fed9f89f529d1e79f6036572dbc1e2b1874;hb=99b249b23524cda2d91602ee088fef1a7be253ee;hp=ba51157ff9f4aa24464733c0820f0b518e4d7119;hpb=8f8d3ad5a02faed2ddcaa22f49a9099175445ef4;p=helm.git diff --git a/helm/ocaml/cic/cic.ml b/helm/ocaml/cic/cic.ml index ba51157ff..4b4e0fed9 100644 --- a/helm/ocaml/cic/cic.ml +++ b/helm/ocaml/cic/cic.ml @@ -53,17 +53,28 @@ type name = | Name of string | Anonymous +type object_flavour = + [ `Definition + | `Fact + | `Lemma + | `Remark + | `Theorem + | `Variant + ] + 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 *) + | `Record of (string * bool) list (** + inductive type that encodes a record; the arguments are + the record fields names and if they are coercions *) | `Projection (** record projection *) ] type attribute = [ `Class of object_class + | `Flavour of object_flavour | `Generated ] @@ -101,7 +112,7 @@ and obj = UriManager.uri list * attribute list (* parameters *) | Variable of string * term option * term * (* name, body, type *) UriManager.uri list * attribute list (* parameters *) - | CurrentProof of string * metasenv * term * (* name, conjectures, value,*) + | CurrentProof of string * metasenv * term * (* name, conjectures, body, *) term * UriManager.uri list * attribute list (* type, parameters *) | InductiveDefinition of inductiveType list * (* inductive types, *) UriManager.uri list * int * attribute list (* params, left params no *) @@ -169,7 +180,7 @@ and annobj = 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 * (* body,type,parameters *) attribute list | AInductiveDefinition of id * anninductiveType list * (* inductive types , *) @@ -212,3 +223,12 @@ type anntarget = | Conjecture of annconjecture | Hypothesis of annhypothesis +module CicHash = + Hashtbl.Make + (struct + type t = term + let equal = (==) + let hash = Hashtbl.hash + end) +;; +