Cic.Meta (index, cic_subst)
| CicNotationPt.Sort `Prop -> Cic.Sort Cic.Prop
| CicNotationPt.Sort `Set -> Cic.Sort Cic.Set
- | CicNotationPt.Sort `Type -> Cic.Sort (Cic.Type (CicUniv.fresh())) (* TASSI *)
+ | CicNotationPt.Sort (`Type u) -> Cic.Sort (Cic.Type u)
| CicNotationPt.Sort `CProp -> Cic.Sort Cic.CProp
| CicNotationPt.Symbol (symbol, instance) ->
resolve env (Symbol (symbol, instance)) ()
sort: [
[ "Prop" -> `Prop
| "Set" -> `Set
- | "Type" -> `Type
+ | "Type" -> `Type (CicUniv.fresh ())
| "CProp" -> `CProp
]
];
| Ast.Num (num, _) -> num
| Ast.Sort `Set -> "Set"
| Ast.Sort `Prop -> "Prop"
- | Ast.Sort `Type -> "Type"
+ | Ast.Sort (`Type _) -> "Type"
| Ast.Sort `CProp -> "CProp"
| Ast.Symbol (name, _) -> "'" ^ name
type binder_kind = [ `Lambda | `Pi | `Exists | `Forall ]
type induction_kind = [ `Inductive | `CoInductive ]
-type sort_kind = [ `Prop | `Set | `Type | `CProp ]
+type sort_kind = [ `Prop | `Set | `Type of CicUniv.universe | `CProp ]
type fold_kind = [ `Left | `Right ]
type location = Lexing.position * Lexing.position
| `Prop -> "Prop"
| `Set -> "Set"
| `CProp -> "CProp"
- | `Type -> "Type"
+ | `Type _ -> "Type"
let pp_ast0 t k =
let rec aux =
Hashtbl.find term_info.sort id
with Not_found ->
prerr_endline (sprintf "warning: sort of id %s not found, using Type" id);
- `Type
+ `Type (CicUniv.fresh ())
in
let aux_substs substs =
Some
| Cic.AMeta (id,n,l) -> idref id (Ast.Meta (n, aux_context l))
| Cic.ASort (id,Cic.Prop) -> idref id (Ast.Sort `Prop)
| Cic.ASort (id,Cic.Set) -> idref id (Ast.Sort `Set)
- | Cic.ASort (id,Cic.Type _) -> idref id (Ast.Sort `Type)
+ | Cic.ASort (id,Cic.Type u) ->idref id (Ast.Sort (`Type u))
| Cic.ASort (id,Cic.CProp) -> idref id (Ast.Sort `CProp)
| Cic.AImplicit _ -> assert false
| Cic.AProd (id,n,s,t) ->
let binder_kind =
match sort_of_id id with
- | `Set | `Type -> `Pi
+ | `Set | `Type _ -> `Pi
| `Prop | `CProp -> `Forall
in
idref id (Ast.Binder (binder_kind,
* http://cs.unibo.it/helm/.
*)
-type sort_kind = [ `Prop | `Set | `Type | `CProp ]
-
-let sort_of_string = function
- | "Prop" -> `Prop
- | "Set" -> `Set
- | "Type" -> `Type
- | "CProp" -> `CProp
- | _ -> assert false
+type sort_kind = [ `Prop | `Set | `Type of CicUniv.universe | `CProp ]
let string_of_sort = function
| `Prop -> "Prop"
| `Set -> "Set"
- | `Type -> "Type"
+ | `Type u -> "Type:" ^ string_of_int (CicUniv.univno u)
| `CProp -> "CProp"
let sort_of_sort = function
| Cic.Prop -> `Prop
| Cic.Set -> `Set
- | Cic.Type _ -> `Type
+ | Cic.Type u -> `Type u
| Cic.CProp -> `CProp
(* let hashtbl_add_time = ref 0.0;; *)
match CicReduction.whd context t with
C.Sort C.Prop -> `Prop
| C.Sort C.Set -> `Set
- | C.Sort (C.Type _)
- | C.Meta _ -> `Type
+ | C.Sort (C.Type u) -> `Type u
+ | C.Meta _ -> `Type (CicUniv.fresh())
| C.Sort C.CProp -> `CProp
| t ->
prerr_endline ("Cic2acic.sort_of applied to: " ^ CicPp.ppterm t) ;
with
Not_found -> (* l'inner-type non e' nella tabella ==> sort <> Prop *)
(* CSC: Type or Set? I can not tell *)
- None,Cic.Sort (Cic.Type (CicUniv.fresh())),`Type,false
+ let u = CicUniv.fresh() in
+ None,Cic.Sort (Cic.Type u),`Type u,false
(* TASSI non dovrebbe fare danni *)
(* *)
in
{annsynthesized : Cic.annterm ; annexpected : Cic.annterm option}
;;
-type sort_kind = [ `Prop | `Set | `Type | `CProp ]
+type sort_kind = [ `Prop | `Set | `Type of CicUniv.universe | `CProp ]
val string_of_sort: sort_kind -> string
-val sort_of_string: string -> sort_kind
+(*val sort_of_string: string -> sort_kind*)
val sort_of_sort: Cic.sort -> sort_kind
val acic_object_of_cic_object :
let sort =
(try
Hashtbl.find ids_to_inner_sorts idr
- with Not_found -> `Type) in
+ with Not_found -> `Type (CicUniv.fresh())) in
if sort = `Prop then
K.Premise
{ K.premise_id = gen_id premise_prefix seed;
let sort =
(try
Hashtbl.find ids_to_inner_sorts id
- with Not_found -> `Type) in
+ with Not_found -> `Type (CicUniv.fresh())) in
if sort = `Prop then
K.Lemma
{ K.lemma_id = gen_id lemma_prefix seed;
let sort =
(try
Hashtbl.find ids_to_inner_sorts id
- with Not_found -> `Type) in
+ with Not_found -> `Type (CicUniv.fresh())) in
if sort = `Prop then
let inductive_types =
(let o,_ =
let idarg = get_id arg in
let sortarg =
(try (Hashtbl.find ids_to_inner_sorts idarg)
- with Not_found -> `Type) in
+ with Not_found -> `Type (CicUniv.fresh())) in
let hdarg =
if sortarg = `Prop then
let (co,bo) =
else
let aid = get_id a in
let asort = (try (Hashtbl.find ids_to_inner_sorts aid)
- with Not_found -> `Type) in
+ with Not_found -> `Type (CicUniv.fresh())) in
if asort = `Prop then
K.ArgProof (aux a)
else K.Term a in