Debian Codegraph @

boot/usage.ml

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 let version () =
12 Printf.printf "The Rocq Prover, version %s\n" Coq_config.version;
13 Printf.printf "compiled with OCaml %s\n" Coq_config.caml_version
14
15 let machine_readable_version () =
16 Printf.printf "%s %s\n"
17 Coq_config.version Coq_config.caml_version
18
19 (* print the usage of coqtop (or coqc) on channel co *)
20
21 let print_usage_common co command =
22 output_string co command;
23 output_string co "Rocq options are:\n";
24 output_string co
25 " -I dir look for ML files in dir\
26 \n -include dir (idem)\
27 \n -R dir coqdir recursively map physical dir to logical coqdir\
28 \n -Q dir coqdir map physical dir to logical coqdir\
29 \n -top coqdir set the toplevel name to be coqdir instead of Top\
30 \n -topfile f set the toplevel name as though compiling f\
31 \n -coqlib dir set the coq standard library directory\
32 \n -exclude-dir f exclude subdirectories named f for option -R\
33 \n\
34 \n -boot don't bind the `Corelib.` prefix to the default -coqlib dir\
35 \n -noinit don't load Corelib.Init.Prelude on start\
36 \n -nois (idem)\
37 \n -compat X.Y same as -compat-from Corelib RocqXY (or CoqXY when X is 8)\
38 \n -compat-from root lib same as -require-import-from root lib, except that\
39 \n a non existing file only produces a warning\
40 \n\
41 \n -load-vernac-source f load Rocq file f.v (Load \"f\".)\
42 \n -l f (idem)\
43 \n -load-vernac-source-verbose f load Rocq file f.v (Load Verbose \"f\".)\
44 \n -lv f (idem)\
45 \n -require lib load Rocq library lib (Require lib)\
46 \n -require-import lib, -ri lib\
47 \n load and import Rocq library lib\
48 \n (equivalent to Require Import lib.)\
49 \n -require-export lib, -re lib\
50 \n load and transitively import Rocq library lib\
51 \n (equivalent to Require Export lib.)\
52 \n -require-from root lib, -rfrom root lib
53 \n load Rocq library lib (From root Require lib.)\
54 \n -require-import-from root lib, -rifrom root lib\
55 \n load and import Rocq library lib\
56 \n (equivalent to From root Require Import lib.)\
57 \n -require-export-from root lib, -refrom root lib\
58 \n load and transitively import Rocq library lib\
59 \n (equivalent to From root Require Export lib.)\
60 \n -load-vernac-object lib\
61 \n (obsolete synonym of -require lib)\
62 \n\
63 \n -where print Rocq's core library location and exit\
64 \n -config, --config print Rocq's configuration information and exit\
65 \n -v, --version print Rocq version and exit\
66 \n -print-version print Rocq version in easy to parse format and exit\
67 \n -list-tags print highlight color tags known by Rocq and exit\
68 \n\
69 \n -quiet unset display of extra information (implies -w \"-all\")\
70 \n -w (w1,..,wn) configure display of warnings\
71 \n -d (d1,..,dn) configure display of debug messages\
72 \n some common values are:\
73 \n all print all debugging information\
74 \n backtrace same as -bt\
75 \n use the vernac command \"Test Debug\" to see all\
76 \n\
77 \n -color (yes|no|auto) configure color output\
78 \n -emacs tells Rocq it is executed under Emacs\
79 \n\
80 \n -q skip loading of rcfile\
81 \n -init-file f set the rcfile to f\
82 \n -bt print OCaml backtraces\
83 \n -diffs (on|off|removed) highlight differences between proof steps\
84 \n -impredicative-set set sort Set impredicative\
85 \n -allow-sprop allow using the proof irrelevant SProp sort\
86 \n -disallow-sprop forbid using the proof irrelevant SProp sort\
87 \n -allow-rewrite-rules allows declaring symbols and rewrite rules\
88 \n -indices-matter levels of indices (and nonuniform parameters) contribute to the level of inductives\
89 \n -type-in-type disable universe consistency checking\
90 \n -mangle-names x mangle auto-generated names using prefix x\
91 \n -set \"Foo Bar\" enable Foo Bar (as Set Foo Bar. in a file)\
92 \n -set \"Foo Bar=value\" set Foo Bar to value (value is interpreted according to Foo Bar's type)\
93 \n -unset \"Foo Bar\" disable Foo Bar (as Unset Foo Bar. in a file)\
94 \n -time display the time taken by each command, outputting to the message system (stdout for coqc)\
95 \n -time-file f display the time taken by each command, outputting to file f\
96 \n -profile-ltac display the time taken by each (sub)tactic\
97 \n -m, --memory display total heap size at program exit\
98 \n (use environment variable\
99 \n OCAML_GC_STATS=\"/tmp/gclog.txt\"\
100 \n for full Gc stats dump)\
101 \n -bytecode-compiler (yes|no) enable the vm_compute reduction machine\
102 \n -native-compiler (yes|no|ondemand) enable the native_compute reduction machine\
103 \n -native-output-dir <directory> set the output directory for native objects\
104 \n -nI dir OCaml include directories for the native compiler (default if not set) \
105 \n -h, -help, --help print this list of options\
106 \n"
107
108 (* print the usage *)
109
110 type specific_usage = {
111 executable_name : string;
112 extra_args : string;
113 extra_options : string;
114 }
115
116 let print_usage co { executable_name; extra_args; extra_options } =
117 print_usage_common co ("Usage: " ^ executable_name ^ " <options> " ^ extra_args ^ "\n\n");
118 output_string co extra_options
119
120 type query =
121 | PrintWhere | PrintConfig
122 | PrintVersion | PrintMachineReadableVersion
123 | PrintHelp