* http://helm.cs.unibo.it/
*)
+ (** create a Cic.CurrentProof from a given proof *)
+let currentProof (uri, metasenv, bo, ty) =
+ let uri = MatitaTypes.unopt_uri uri in
+ (* TODO CSC: Wrong: [] is just plainly wrong *)
+ Cic.CurrentProof (UriManager.name_of_uri uri, metasenv, bo, ty, [])
+
class proof ?uri ~typ ~metasenv ~body () =
object (self)
- inherit [unit] StatefulProofEngine.status ?uri ~typ ~body ~metasenv
- (fun _ -> ())
- (fun _ _ -> ())
- ()
-
- method private currentProof =
- let (uri, metasenv, bo, ty) = self#proof in
- let uri =
- match uri with
- | Some uri -> uri
- | None -> MatitaTypes.untitled_con_uri
- in
- (* TODO CSC: Wrong: [] is just plainly wrong *)
- Cic.CurrentProof (UriManager.name_of_uri uri, metasenv, bo, ty, [])
+ inherit [MatitaTypes.hist_metadata]
+ StatefulProofEngine.status ?uri ~typ ~body ~metasenv
+ (fun proof ->
+ Cic2acic.acic_object_of_cic_object (currentProof (fst proof)))
+ (fun (old_proof, old_metadata) new_proof ->
+ Cic2acic.acic_object_of_cic_object (currentProof (fst new_proof)))
+ ()
method toXml =
- let currentproof = self#currentProof in
+ let currentproof = currentProof self#proof in
let (acurrentproof,_,_,ids_to_inner_sorts,_,_,_) =
Cic2acic.acic_object_of_cic_object ~eta_fix:false currentproof
in