let module T = CicTypeChecker in
let module C = Cic in
let fresh_id' = fresh_id seed ids_to_terms ids_to_father_ids in
+prerr_endline "*************** INIZIO DOUBLE TYPE INFERENCE ************";
let terms_to_types =
D.double_type_of metasenv context t expectedty
in
+prerr_endline "*************** FINE DOUBLE TYPE INFERENCE ************";
let rec aux computeinnertypes father context idrefs tt =
let fresh_id'' = fresh_id' father tt in
(*CSC: computeinnertypes era true, il che e' proprio sbagliato, no? *)
C.AVariable
("mettereaposto",id,abo,aty, params)
| C.CurrentProof (id,conjectures,bo,ty,params) ->
+prerr_endline "************* INIZIO ETA_FIXING (congetture) ********" ;
let conjectures' =
List.map
(function (i,canonical_context,term) ->
(i,canonical_context',term')
) conjectures
in
+prerr_endline "************* INIZIO CIC ==> ACIC (congetture) ********" ;
let aconjectures =
List.map
(function (i,canonical_context,term) as conjecture ->
in
(cid,i,(List.rev revacanonical_context),aterm)
) conjectures' in
+prerr_endline "*********** INIZIO ETA FIXING PROVA **********";
let bo' = E.eta_fix conjectures' bo in
let ty' = E.eta_fix conjectures' ty in
+prerr_endline "*********** INIZIO CIC ==> ACIC PROVA **********";
let abo =
acic_term_of_cic_term_context' conjectures' [] [] bo' (Some ty') in
let aty = acic_term_of_cic_term_context' conjectures' [] [] ty' None in
let context' =
List.map
(function
- (id,None) as item -> item
+ (id,None) -> None
| (id,Some (name,Cic.ADecl t)) ->
- id,
- Some
- (* We should call build_decl_item, but we have not computed *)
- (* the inner-types ==> we always produce a declaration *)
- (`Declaration
- { K.dec_name = name_of name;
- K.dec_id = gen_id declaration_prefix seed;
- K.dec_inductive = false;
- K.dec_aref = get_id t;
- K.dec_type = t
- })
+ Some
+ (* We should call build_decl_item, but we have not computed *)
+ (* the inner-types ==> we always produce a declaration *)
+ (`Declaration
+ { K.dec_name = name_of name;
+ K.dec_id = gen_id declaration_prefix seed;
+ K.dec_inductive = false;
+ K.dec_aref = get_id t;
+ K.dec_type = t
+ })
| (id,Some (name,Cic.ADef t)) ->
- id,
- Some
- (* We should call build_def_item, but we have not computed *)
- (* the inner-types ==> we always produce a declaration *)
- (`Definition
- { K.def_name = name_of name;
- K.def_id = gen_id definition_prefix seed;
- K.def_aref = get_id t;
- K.def_term = t
- })
+ Some
+ (* We should call build_def_item, but we have not computed *)
+ (* the inner-types ==> we always produce a declaration *)
+ (`Definition
+ { K.def_name = name_of name;
+ K.def_id = gen_id definition_prefix seed;
+ K.def_aref = get_id t;
+ K.def_term = t
+ })
) context
in
(id,n,context',ty)
and 'term context = 'term hypothesis list
and 'term hypothesis =
- id *
['term decl_context_element | ('term,'term proof) def_context_element ] option
;;
and 'term context = 'term hypothesis list
and 'term hypothesis =
- id *
['term decl_context_element | ('term,'term proof) def_context_element ] option
;;
let canonical_context' =
List.map
(function
- _,None -> None
- | _,Some (`Declaration d)
- | _,Some (`Hypothesis d) ->
+ None -> None
+ | Some (`Declaration d)
+ | Some (`Hypothesis d) ->
(match d with
{K.dec_name = Some n ; K.dec_type = t} ->
Some (Cic.Name n, Cic.Decl (deannotate t))
| _ -> assert false)
- | _,Some (`Definition d) ->
+ | Some (`Definition d) ->
(match d with
{K.def_name = Some n ; K.def_term = t} ->
Some (Cic.Name n, Cic.Def (deannotate t))
| _ -> assert false)
- | _,Some (`Proof d) ->
+ | Some (`Proof d) ->
(match d with
{K.proof_name = Some n } ->
Some (Cic.Name n, Cic.Def (proof2cic deannotate d))
(P.Mrow [Some "helm", "xref", id]
(List.map
(function
- (_,None) ->
+ None ->
P.Mrow []
[ P.Mi [] "_" ;
P.Mo [] ":?" ;
P.Mi [] "_"]
- | (_,Some (`Declaration d))
- | (_,Some (`Hypothesis d)) ->
+ | Some (`Declaration d)
+ | Some (`Hypothesis d) ->
let
{ K.dec_name = dec_name ;
K.dec_type = ty } = d
| Some n -> n) ;
P.Mo [] ":" ;
term2pres ty]
- | (_,Some (`Definition d)) ->
+ | Some (`Definition d) ->
let
{ K.def_name = def_name ;
K.def_term = bo } = d
| Some n -> n) ;
P.Mo [] ":=" ;
term2pres bo]
- | (_,Some (`Proof p)) ->
+ | Some (`Proof p) ->
let proof_name = p.K.proof_name in
P.Mrow []
[ P.Mi []