- (** statement invoked in the wrong context (e.g. tactic with no ongoing proof)
- *)
-exception Statement_error of string
-let statement_error msg = raise (Statement_error msg)
-
-exception Command_error of string
-let command_error msg = raise (Command_error msg)
-
- (** parameters are: option name, error message *)
-exception Option_error of string * string
-
-exception Unbound_identifier of string
-
-type proof_status =
- | No_proof
- | Incomplete_proof of ProofEngineTypes.status
- | Proof of ProofEngineTypes.proof
- | Intermediate of Cic.metasenv
- (* Status in which the proof could be while it is being processed by the
- * engine. No status entering/exiting the engine could be in it. *)
-
-module StringMap = Map.Make (String)
-
-type option_value =
- | String of string
- | Int of int
-type options = option_value StringMap.t
-let no_options = StringMap.empty
-
-type status = {
- aliases: DisambiguateTypes.environment; (** disambiguation aliases *)
- proof_status: proof_status;
- options: options;
- coercions: CoercGraph.coercions;
- objects: (UriManager.uri * string) list;
- (** in-scope objects, with their paths *)
-}
-
-let dump_status status =
- MatitaLog.message "status.aliases:\n";
- MatitaLog.message
- (CicTextualParser2.EnvironmentP3.to_string status.aliases ^ "\n");
- MatitaLog.message "status.proof_status:";
- MatitaLog.message
- (match status.proof_status with
- | No_proof -> "no proof\n"
- | Incomplete_proof _ -> "incomplete proof\n"
- | Proof _ -> "proof\n"
- | Intermediate _ -> "Intermediate\n");
- MatitaLog.message "status.options\n";
- StringMap.iter (fun k v ->
- let v =
- match v with
- | String s -> s
- | Int i -> string_of_int i
- in
- MatitaLog.message (k ^ "::=" ^ v)) status.options;
- MatitaLog.message "status.coercions\n";
- List.iter
- (fun (u1,u2,u3) -> MatitaLog.message
- ((UriManager.string_of_uri u1) ^
- (UriManager.string_of_uri u2) ^
- (UriManager.string_of_uri u3))) status.coercions;
- MatitaLog.message "status.objects:\n";
- List.iter
- (fun (u,_) ->
- MatitaLog.message (UriManager.string_of_uri u)) status.objects