]> matita.cs.unibo.it Git - helm.git/commitdiff
Added new function txt_of_cic_sequent.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Sat, 20 Jan 2007 15:30:26 +0000 (15:30 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Sat, 20 Jan 2007 15:30:26 +0000 (15:30 +0000)
matita/applyTransformation.ml
matita/applyTransformation.mli

index 6e92cfa95a43fbfc35acf6f01eb622d560286fee..f27da2caa64d3765b76cffa30f2bf310def03a7e 100644 (file)
@@ -70,6 +70,20 @@ let mml_of_cic_object obj =
    (ids_to_terms, ids_to_father_ids, ids_to_conjectures, ids_to_hypotheses,
   ids_to_inner_sorts,ids_to_inner_types)))
 
+let txt_of_cic_sequent size metasenv sequent =
+  let unsh_sequent,(asequent,ids_to_terms,
+    ids_to_father_ids,ids_to_inner_sorts,ids_to_hypotheses)
+  =
+    Cic2acic.asequent_of_sequent metasenv sequent
+  in
+  let content_sequent = Acic2content.map_sequent asequent in 
+  let pres_sequent = 
+   CicNotationPres.mpres_of_box
+    (Sequent2pres.sequent2pres ~ids_to_inner_sorts content_sequent)
+  in
+  BoxPp.render_to_string (function x::_ -> x | _ -> assert false) size
+   pres_sequent
+
 let txt_of_cic_sequent_conclusion size metasenv sequent = 
   let _,(asequent,_,_,ids_to_inner_sorts,_) = 
     Cic2acic.asequent_of_sequent metasenv sequent 
@@ -83,4 +97,3 @@ let txt_of_cic_sequent_conclusion size metasenv sequent =
 let txt_of_cic_term size metasenv context t = 
   let fake_sequent = (-1,context,t) in
   txt_of_cic_sequent_conclusion size metasenv fake_sequent 
-
index 8e2d51b5b6713e06ad4b9f1b04cfefb11552409e..218a92ca9f4d8bc0263f16c77cd6610e538c8ee4 100644 (file)
@@ -57,6 +57,8 @@ val mml_of_cic_object:
 
 val txt_of_cic_term: 
   int -> Cic.metasenv -> Cic.context -> Cic.term -> string 
+val txt_of_cic_sequent: 
+  int -> Cic.metasenv -> Cic.conjecture -> string
 val txt_of_cic_sequent_conclusion: 
   int -> Cic.metasenv -> Cic.conjecture -> string