uri,(Cic.CurrentProof (UriManager.name_of_uri uri, metasenv, bo, ty))
in
let
- (acic,ids_to_terms,ids_to_father_ids,ids_to_inner_sorts,ids_to_inner_types)
+ (acic,ids_to_terms,ids_to_father_ids,ids_to_inner_sorts,
+ ids_to_inner_types,ids_to_conjectures,ids_to_hypotheses)
=
Cic2acic.acic_object_of_cic_object currentproof
in
mml_of_cic_object uri acic ids_to_inner_sorts ids_to_inner_types
in
output#load_tree mml ;
- current_cic_infos := Some (ids_to_terms,ids_to_father_ids)
+ current_cic_infos :=
+ Some (ids_to_terms,ids_to_father_ids,ids_to_conjectures,ids_to_hypotheses)
with
e ->
match !ProofEngine.proof with
| Some (_,metasenv,_,_) -> metasenv
in
let currentsequent = List.find (function (m,_,_) -> m=metano) metasenv in
- let sequent_gdome,ids_to_terms,ids_to_father_ids =
+ let sequent_gdome,ids_to_terms,ids_to_father_ids,ids_to_hypotheses =
SequentPp.XmlPp.print_sequent metasenv currentsequent
in
let sequent_doc =
applyStylesheets sequent_doc sequent_styles sequent_args
in
proofw#load_tree ~dom:sequent_mml ;
- current_goal_infos := Some (ids_to_terms,ids_to_father_ids)
+ current_goal_infos :=
+ Some (ids_to_terms,ids_to_father_ids,ids_to_hypotheses)
with
e ->
let metano =
in
canonical_context
in
- let sequent_gdome,ids_to_terms,ids_to_father_ids =
+ let sequent_gdome,ids_to_terms,ids_to_father_ids,ids_to_hypotheses =
SequentPp.XmlPp.print_sequent metasenv (metano,context,term)
in
let sequent_doc =
let res =
applyStylesheets sequent_doc sequent_styles sequent_args ;
in
- current_scratch_infos := Some (term,ids_to_terms,ids_to_father_ids) ;
+ current_scratch_infos :=
+ Some (term,ids_to_terms,ids_to_father_ids,ids_to_hypotheses) ;
res
;;
begin
try
match !current_goal_infos with
- Some (ids_to_terms, ids_to_father_ids) ->
+ Some (ids_to_terms, ids_to_father_ids,_) ->
let id = xpath in
tactic (Hashtbl.find ids_to_terms id) ;
refresh_sequent rendering_window#proofw ;
begin
try
match !current_goal_infos with
- Some (ids_to_terms, ids_to_father_ids) ->
+ Some (ids_to_terms, ids_to_father_ids,_) ->
let id = xpath in
(* Let's parse the input *)
let inputlen = inputt#length in
try
match !current_scratch_infos with
(* term is the whole goal in the scratch_area *)
- Some (term,ids_to_terms, ids_to_father_ids) ->
+ Some (term,ids_to_terms, ids_to_father_ids,_) ->
let id = xpath in
let expr = tactic term (Hashtbl.find ids_to_terms id) in
let mml = mml_of_cic_term 111 expr in
let proof = Cic.Definition (UriManager.name_of_uri uri,bo,ty,[]) in
let
(acic,ids_to_terms,ids_to_father_ids,ids_to_inner_sorts,
- ids_to_inner_types)
+ ids_to_inner_types,ids_to_conjectures,ids_to_hypotheses)
=
Cic2acic.acic_object_of_cic_object proof
in
mml_of_cic_object uri acic ids_to_inner_sorts ids_to_inner_types
in
(rendering_window#output : GMathView.math_view)#load_tree mml ;
- current_cic_infos := Some (ids_to_terms,ids_to_father_ids)
+ current_cic_infos :=
+ Some
+ (ids_to_terms,ids_to_father_ids,ids_to_conjectures,
+ ids_to_hypotheses)
end
else
raise WrongProof
let currentproof =
Cic.CurrentProof (UriManager.name_of_uri uri,metasenv,bo,ty)
in
- let (acurrentproof,_,_,ids_to_inner_sorts,_) =
+ let (acurrentproof,_,_,ids_to_inner_sorts,_,_,_) =
Cic2acic.acic_object_of_cic_object currentproof
in
let xml = Cic2Xml.print_object uri ids_to_inner_sorts acurrentproof in
begin
try
match !current_cic_infos with
- Some (ids_to_terms, ids_to_father_ids) ->
+ Some (ids_to_terms, ids_to_father_ids, _, _) ->
let id = xpath in
L.to_sequent id ids_to_terms ids_to_father_ids ;
refresh_proof rendering_window#output ;
begin
try
match !current_cic_infos with
- Some (ids_to_terms, ids_to_father_ids) ->
+ Some (ids_to_terms, ids_to_father_ids, _, _) ->
let id = xpath in
L.focus id ids_to_terms ids_to_father_ids ;
refresh_sequent rendering_window#proofw
let outputhtml = (rendering_window#outputhtml : GHtml.xmhtml) in
let inputlen = inputt#length in
let input = inputt#get_chars 0 inputlen in
- try
- output_html outputhtml (Mquery.locate input) ;
- inputt#delete_text 0 inputlen
- with
- e ->
- output_html outputhtml
- ("<h1 color=\"red\">" ^ Printexc.to_string e ^ "</h1>")
+ output_html outputhtml (
+ try
+ match Str.split (Str.regexp "[ \t]+") input with
+ | [] -> ""
+ | head :: tail ->
+ inputt#delete_text 0 inputlen;
+ Mquery.locate head
+ with
+ e -> "<h1 color=\"red\">" ^ Printexc.to_string e ^ "</h1>"
+ )
;;
let backward rendering_window () =
let outputhtml = (rendering_window#outputhtml : GHtml.xmhtml) in
- let metasenv =
- match !ProofEngine.proof with
- None -> assert false
- | Some (_,metasenv,_,_) -> metasenv
- in
- let result =
- match !ProofEngine.goal with
- | None -> ""
- | Some metano ->
- let (_,_,ty) =
- List.find (function (m,_,_) -> m=metano) metasenv
- in
- Mquery.backward ty
- in
+ let inputt = (rendering_window#inputt : GEdit.text) in
+ let inputlen = inputt#length in
+ let input = inputt#get_chars 0 inputlen in
+ let level = int_of_string input in
+ let metasenv =
+ match !ProofEngine.proof with
+ None -> assert false
+ | Some (_,metasenv,_,_) -> metasenv
+ in
+ let result =
+ match !ProofEngine.goal with
+ | None -> ""
+ | Some metano ->
+ let (_,_,ty) =
+ List.find (function (m,_,_) -> m=metano) metasenv
+ in
+ Mquery.backward ty level
+ in
output_html outputhtml result
let choose_selection