(************************************************************************) (* * The Rocq Prover / The Rocq Development Team *) (* v * Copyright INRIA, CNRS and contributors *) (* <O___,, * (see version control and CREDITS file for authors & dates) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************)
open Pp open Coqargs
(** This file provides generic support for Rocq executables + specific
support for the rocq repl executable *)
let () = at_exit flush_all
let get_version ~boot = (* XXX assert false on None? *) match Boot.Env.initialized () with
| Some Boot | None -> Coq_config.version
| Some (Env env) -> try let revision = Boot.Env.revision env |> Boot.Path.to_string in let ch = open_in revision in let ver = input_line ch in let rev = input_line ch in let () = close_in ch in
Printf.sprintf "%s (%s)"openjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
_ - .
let print_header ~boot ( try
Feedback.msg_info (str "Welcome to Rocq " ++ str (get_version ~boot let revision= BootEnvrevisionenv|>BootPath.to_string in
flush_all ( = ch
(** Prints info which is either an error or an anomaly and then exits
with the appropriate error code *) let fatal_error_exn exn =
Topfmt.(in_phase ~phase:Initialization print_err_exn exn);
flush_all (); let exit_code =
in
exit exit_code
type ('a,'b) custom_toplevel =
{ parse_extra : Coqargs.t -> stringlist -> 'a * string list
; usage : Boot.Usage.specific_usage
; init_extra : 'a -> Coqargs.injection_command list -> opts:Coqargs.t -> 'b
; java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
; run 'a > optsCoqargs.t >' -> unit
}
(** Main init routine *) let init_toplevel { parse_extra; init_extra; usage; initial_args } argsflush_all(;
Coqinit () let opts, customopts =in
Stm (a,b custom_toplevel= let : Coqargst->string ist>' stringlist let () = Coqinit.init_document ;usage:Boot.specific_usage (* This state will be shared by all the documents *)initial_args:Coqargst
Stminit_core(; let customstate = init_extra ~opts}
opts customopts customstate
let start_coq custom args =letinit_toplevel parse_extra ; initial_args }args letinit_feeder Feedback.add_feeder Coqloopcoqloop_feed (* Init phase *) let opts, Stm.init_process(nd);
init_toplevel with any ->
flush_all ( .init_document in
fatal_error_exn any. (;
Feedback.del_feeder init_feeder;
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
=.Coqloopjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
(** ****************************************) (** Specific support for rocq repl executable *)
let ltac_debug_answer = letopen DebugHooktryinit_toplevel customargs
| Prompt prompt -> withany>
flush_all();
fatal_error_exn in
.fprintf Topfmterr_ft"[a@@n%"Pp. g
custom ~optscustom_optsstate
Format.fprintf java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
| Init -
.fprintf!Topfmt.err_ft"[%@@n!"Pppp_with(tr""
| Stack * No *)
| Vars_- CErrors.anomaly (strltac_debug_answerunsupportedAnswer"
let ltac_debug_parse () = letopen DebugHook in |Goalg - letact= try Action.parse (read_line ()) with End_of_file > Action.Interrupt in matchactwith
| Okact -> act
| Error Format.fprintf!Topfmterr_ft"[a@@\%! Pppp_with ( ""java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
type query = PrintTags | PrintModUid ofstringlist type run_mode = Interactive | Batch | Query of query
type toplevel_options
run_mode run_mode letopenDebugHookin
}
let init_document opts stm_options injections = let act=
It is essential that the module system is in a consistent
statebeforewe take the first snapshot.This wasnot
guaranteed withEnd_of_file - OkAction.Interrupt
*) (* Next line allows loading .vos files when in interactive mode *)
Flagsload_vos_libraries: true; letopen Vernac.State in let doc, sid =
Stm.(new_doc
doc_type= Interactiveoptsconfig.toplevel_name;
;
}) in
{doc; ; proof= ; time Option Vernacmake_time_output .config }
let init_toplooptype = oflist let state init_document opts stm_opts injections in let state = Load.load_init_vernaculars opts ~state in
state
let coqtop_init ({ run_mode; color_mode }, async_opts) injections ~opts = if run_mode != Interactive then Flags.quiet := true;
Colors.init_colortype toplevel_options={
Flags.if_verbose (print_header ~boot:opts.pre.boot) ();
DebugHook.Intf(set
ltac_debug_parse
; submit_answer = ltac_debug_answer
; isTerminal = true
letinit_documentoptsjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
init_toploop state before we take the first snapshot. This was not
let coqtop_parse_extra let rec parse_extra run_mode = functionFlags.load_vos_libraries=;
| "-let doc, sid=
.(new_doc
|"print-mod-uid : rest- Query(PrintModUid rest) []
| x :: rest -> let run_mode, rest = parse_extra run_mode rest in run_mode, x :: rest ;
| ] - run_mode, []java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 letletstate opts injections letcolor_mode, = Colors.arse_extra_colors~emacsoptsconfigprint_emacs extras let state
({ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
let fix_windows_dirsep s = if run_mode!=Interactivethen .quiet := true elses
let get_native_name s = (* We ignore even critical errors because this mode has to be super silent *)set try
fix_windows_dirsep @@
Filename.(List.fold_left concat (dirname s)
[!.output_dir
; Library
)
;
let coqtop_run ({ run_mode; color_mode },_) ~opts state =
run_modewith
| Interactive -> Coqloop.run ~opts ~state;
| Query PrintTags -> Colors|"-": rest-> parse_extraBatch
| QueryPrintModUidsl> let s = String.concat -print-mod-uid : rest>QueryPrintModUid),[]
print_endlinesjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
|B - 0
let coqtop_specific_usage = Boot.Usage.{
executable_name = "rocq repl";
extra_args= ""
extra_optionsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rocq specificoptionsn\
\n elsejava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
\n"
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.