3 (* It also returns the pretty-printing context! *)
4 let print_context ctx =
5 let module P = ProofEngine in
14 P.Declaration (n,t) ->
15 print_endline (print_name n ^ ":" ^ CicPp.pp t env) ;
18 | P.Definition (n,t) ->
19 print_endline (print_name n ^ ":=" ^ CicPp.pp t env) ;
25 exception NotImplemented;;
27 let print_sequent (context,goal) =
28 let module P = ProofEngine in
30 let pretty_printer_env_of_context =
33 print_endline "----------------------" ;
34 print_endline (CicPp.pp goal pretty_printer_env_of_context) ; flush stdout
41 let print_sequent metasenv (context,goal) =
43 let ids_to_terms = Hashtbl.create 503 in
44 let ids_to_father_ids = Hashtbl.create 503 in
45 let ids_to_inner_sorts = Hashtbl.create 503 in
46 let ids_to_inner_types = Hashtbl.create 503 in
49 Cic2acic.acic_of_cic_env' seed ids_to_terms ids_to_father_ids
50 ids_to_inner_sorts ids_to_inner_types metasenv
52 let final_s,final_env =
54 (fun binding (s,env) ->
55 let b,n,t,cicbinding =
57 ProofEngine.Definition (n,t) -> "Def", n, t,Cic.Def t
58 | ProofEngine.Declaration (n,t) -> "Decl", n, t, Cic.Decl t
60 let acic = acic_of_cic_env env t in
63 ["name",(match n with Cic.Name n -> n | _ -> assert false)]
65 (UriManager.uri_of_string "cic:/dummy.con")
66 ids_to_inner_sorts acic)
67 >],((n,cicbinding)::env)
71 let acic = acic_of_cic_env final_env goal in
72 X.xml_nempty "Sequent" []
74 Xml.xml_nempty "Goal" []
75 (Cic2Xml.print_term (UriManager.uri_of_string "cic:/dummy.con")
76 ids_to_inner_sorts acic)
78 ids_to_terms,ids_to_father_ids