- method to_xml =
- let (uri, metasenv, bo, ty) = _proof in
- let currentproof =
- (* TODO CSC: Wrong: [] is just plainly wrong *)
- Cic.CurrentProof (UriManager.name_of_uri uri,metasenv,bo,ty,[])
- in
+let compute_metadata (old_status, old_metadata) new_status =
+ let ((_, new_metasenv, _, _) as new_proof, goal_opt) = new_status in
+ let proof_object_metadata = (* compute proof annotations *)
+ let obj =
+ match goal_opt with
+ | Some _ -> cicCurrentProof new_proof
+ | None -> cicConstant new_proof
+ in
+ Cic2acic.acic_object_of_cic_object obj
+ in
+ let sequents_metadata = (* compute all sequent annotations from scratch *)
+ (** TODO Zack could we reuse some of the annotations from the previous
+ * status to avoid recomputing all of them? uhm ... we have to which
+ * sequents haven't been changed by last tactic applications ... doh! *)
+ List.map
+ (fun ((metano, context, term) as sequent) ->
+ (metano, Cic2acic.asequent_of_sequent new_metasenv sequent))
+ new_metasenv
+ in
+ (proof_object_metadata, sequents_metadata)
+*)
+
+class proof ?uri ~typ ~metasenv ~body () =
+ object (self)
+
+ inherit [unit]
+ StatefulProofEngine.status
+ ~history_size:BuildTimeConf.undo_history_size ?uri ~typ ~body ~metasenv
+ init_metadata compute_metadata ()
+
+ method toXml =
+ let currentproof = cicCurrentProof self#proof in