~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to refman/RefMan-com.tex

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu, Stéphane Glondu, Samuel Mimram
  • Date: 2010-01-07 22:50:39 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107225039-n3cq82589u0qt0s2
Tags: 8.2pl1-1
[ Stéphane Glondu ]
* New upstream release (Closes: #563669)
  - remove patches
* Packaging overhaul:
  - use git, advertise it in Vcs-* fields of debian/control
  - use debhelper 7 and dh with override
  - use source format 3.0 (quilt)
* debian/control:
  - set Maintainer to d-o-m, set Uploaders to Sam and myself
  - add Homepage field
  - bump Standards-Version to 3.8.3
* Register PDF documentation into doc-base
* Add debian/watch
* Update debian/copyright

[ Samuel Mimram ]
* Change coq-doc's description to mention that it provides documentation in
  pdf format, not postscript, closes: #543545.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
\chapter{The \Coq~commands}\label{Addoc-coqc}
2
 
\ttindex{coqtop}
3
 
\ttindex{coqc}
4
 
 
5
 
There are two \Coq~commands: 
6
 
\begin{itemize}
7
 
\item {\tt coqtop}: The \Coq\ toplevel (interactive mode) ; 
8
 
\item {\tt coqc} : The \Coq\ compiler (batch compilation).
9
 
\end{itemize}
10
 
The options are (basically) the same for the two commands, and
11
 
roughly described below. You can also look at the \verb!man! pages of
12
 
\verb!coqtop! and \verb!coqc! for more details.
13
 
 
14
 
 
15
 
\section{Interactive use ({\tt coqtop})}
16
 
 
17
 
In the interactive mode, also known as the \Coq~toplevel, the user can
18
 
develop his theories and proofs step by step.  The \Coq~toplevel is
19
 
run by the command {\tt coqtop}. 
20
 
 
21
 
\index{byte-code}
22
 
\index{native code}
23
 
\label{binary-images}
24
 
They are two different binary images of \Coq: the byte-code one and
25
 
the native-code one (if Objective Caml provides a native-code compiler
26
 
for your platform, which is supposed in the following).  When invoking
27
 
\verb!coqtop! or \verb!coqc!, the native-code version of the system is
28
 
used.  The command-line options \verb!-byte! and \verb!-opt! explicitly
29
 
select the byte-code and the native-code versions, respectively.
30
 
 
31
 
The byte-code toplevel is based on a Caml
32
 
toplevel (to allow the dynamic link of tactics).  You can switch to
33
 
the Caml toplevel with the command \verb!Drop.!, and come back to the
34
 
\Coq~toplevel with the command \verb!Toplevel.loop();;!.
35
 
 
36
 
% The command \verb!coqtop -searchisos! runs the search tool {\sf
37
 
%   Coq\_SearchIsos} (see section~\ref{coqsearchisos},
38
 
% page~\pageref{coqsearchisos}) and, as the \Coq~system, can be combined
39
 
% with the option \verb!-opt!.
40
 
 
41
 
\section{Batch compilation ({\tt coqc})}
42
 
The {\tt coqc} command takes a name {\em file} as argument.  Then it
43
 
looks for a vernacular file named {\em file}{\tt .v}, and tries to
44
 
compile it into a {\em file}{\tt .vo} file (See ~\ref{compiled}).
45
 
 
46
 
\Warning The name {\em file} must be a regular {\Coq} identifier, as
47
 
defined in the section \ref{lexical}. It
48
 
must only contain letters, digits or underscores
49
 
(\_). Thus it can be \verb+/bar/foo/toto.v+ but cannot be
50
 
\verb+/bar/foo/to-to.v+ . 
51
 
 
52
 
Notice that the \verb!-byte! and \verb!-opt! options are still
53
 
available with \verb!coqc!  and allow you to select the byte-code or
54
 
native-code versions of the system.
55
 
 
56
 
 
57
 
\section{Resource file}
58
 
\index{Resource file}
59
 
 
60
 
When \Coq\ is launched, with either {\tt coqtop} or {\tt coqc}, the
61
 
resource file \verb:$HOME/.coqrc.7.0: is loaded, where \verb:$HOME: is
62
 
the home directory of the user.  If this file is not found, then the
63
 
file \verb:$HOME/.coqrc: is searched. You can also specify an
64
 
arbitrary name for the resource file (see option \verb:-init-file:
65
 
below), or the name of another user to load the resource file of
66
 
someone else (see option \verb:-user:).
67
 
 
68
 
This file may contain, for instance, \verb:Add LoadPath: commands to add
69
 
directories to the load path of \Coq.
70
 
It is possible to skip the loading of the resource file with the
71
 
option \verb:-q:.
72
 
 
73
 
\section{Environment variables}
74
 
\label{EnvVariables}
75
 
\index{Environment variables}
76
 
 
77
 
There are three environment variables used by the \Coq\ system.
78
 
\verb:$COQBIN: for the directory where the binaries are,
79
 
\verb:$COQLIB: for the directory whrer the standard library is, and 
80
 
\verb:$COQTOP: for the directory of the sources. The latter is useful
81
 
only for developers that are writing their own tactics and are using
82
 
\texttt{coq\_makefile} (see \ref{Makefile}). If \verb:$COQBIN: or
83
 
\verb:$COQLIB: are not defined, \Coq\ will use the default values
84
 
(defined at installation time). So these variables are useful only if
85
 
you move the \Coq\ binaries and library after installation.
86
 
 
87
 
\section{Options}
88
 
\index{Options of the command line}
89
 
\label{vmoption}
90
 
 
91
 
The following command-line options are recognized by the commands {\tt
92
 
  coqc} and {\tt coqtop}, unless stated otherwise:
93
 
 
94
 
\begin{description}
95
 
\item[{\tt -byte}]\ 
96
 
 
97
 
  Run the byte-code version of \Coq{}.
98
 
 
99
 
\item[{\tt -opt}]\ 
100
 
 
101
 
  Run the native-code version of \Coq{}.
102
 
 
103
 
\item[{\tt -I} {\em directory}, {\tt -include} {\em directory}]\ 
104
 
 
105
 
  Add {\em directory} to the searched directories when looking for a
106
 
  file.
107
 
 
108
 
\item[{\tt -R} {\em directory} {\dirpath}]\ 
109
 
 
110
 
  This maps the subdirectory structure of physical {\em directory} to
111
 
  logical {\dirpath} and adds {\em directory} and its subdirectories
112
 
  to the searched directories when looking for a file.
113
 
 
114
 
\item[{\tt -top} {\dirpath}]\ 
115
 
 
116
 
  This sets the toplevel module name to {\dirpath} instead of {\tt
117
 
  Top}. Not valid for {\tt coqc}.
118
 
 
119
 
\item[{\tt -is} {\em file}, {\tt -inputstate} {\em file}]\ 
120
 
 
121
 
  Cause \Coq~to use the state put in the file {\em file} as its input
122
 
  state. The default state is {\em initial.coq}.
123
 
  Mainly useful to build the standard input state.
124
 
 
125
 
\item[{\tt -outputstate} {\em file}]\ 
126
 
 
127
 
  Cause \Coq~to dump its state to file {\em file}.coq just after finishing
128
 
  parsing and evaluating all the arguments from the command line.
129
 
 
130
 
\item[{\tt -nois}]\ 
131
 
 
132
 
  Cause \Coq~to begin with an empty state. Mainly useful to build the
133
 
  standard input state.
134
 
 
135
 
%Obsolete?
136
 
%
137
 
%\item[{\tt -notactics}]\ 
138
 
%
139
 
%  Forbid the dynamic loading of tactics in the bytecode version of {\Coq}.
140
 
 
141
 
\item[{\tt -init-file} {\em file}]\ 
142
 
 
143
 
  Take {\em file} as the resource file.
144
 
 
145
 
\item[{\tt -q}]\ 
146
 
 
147
 
  Cause \Coq~not to load the resource file.
148
 
 
149
 
\item[{\tt -user} {\em username}]\ 
150
 
 
151
 
  Take resource file of user {\em username} (that is 
152
 
  \verb+~+{\em username}{\tt /.coqrc.7.0}) instead of yours.
153
 
 
154
 
\item[{\tt -load-ml-source} {\em file}]\ 
155
 
 
156
 
  Load the Caml source file {\em file}.
157
 
 
158
 
\item[{\tt -load-ml-object} {\em file}]\ 
159
 
 
160
 
  Load the Caml object file {\em file}.
161
 
 
162
 
\item[{\tt -l} {\em file}, {\tt -load-vernac-source} {\em file}]\ 
163
 
 
164
 
  Load \Coq~file {\em file}{\tt .v}
165
 
 
166
 
\item[{\tt -lv} {\em file}, {\tt -load-vernac-source-verbose} {\em file}]\ 
167
 
 
168
 
  Load \Coq~file {\em file}{\tt .v} with 
169
 
  a copy of the contents of the file on standard input.
170
 
 
171
 
\item[{\tt -load-vernac-object} {\em file}]\ 
172
 
 
173
 
  Load \Coq~compiled file {\em file}{\tt .vo}
174
 
 
175
 
%\item[{\tt -preload} {\em file}]\ \\
176
 
%Add {\em file}{\tt .vo} to the files to be loaded and opened
177
 
%before making the initial state.
178
 
%
179
 
\item[{\tt -require} {\em file}]\ 
180
 
 
181
 
  Load \Coq~compiled file {\em file}{\tt .vo} and import it ({\tt
182
 
    Require} {\em file}).
183
 
 
184
 
\item[{\tt -compile} {\em file}]\ 
185
 
 
186
 
  This compiles file {\em file}{\tt .v} into {\em file}{\tt .vo}.
187
 
  This option implies options {\tt -batch} and {\tt -silent}. It is
188
 
  only available for {\tt coqtop}.
189
 
 
190
 
\item[{\tt -compile-verbose} {\em file}]\ 
191
 
 
192
 
  This compiles file {\em file}{\tt .v} into {\em file}{\tt .vo} with
193
 
  a copy of the contents of the file on standard input.
194
 
  This option implies options {\tt -batch} and {\tt -silent}. It is
195
 
  only available for {\tt coqtop}.
196
 
 
197
 
\item[{\tt -verbose}]\ 
198
 
 
199
 
  This option is only for {\tt coqc}. It tells to compile the file with
200
 
  a copy of its contents on standard input.
201
 
 
202
 
\item[{\tt -batch}]\ 
203
 
 
204
 
  Batch mode : exit just after arguments parsing. This option is only
205
 
  used by {\tt coqc}.
206
 
 
207
 
%Mostly unused in the code
208
 
%\item[{\tt -debug}]\ 
209
 
%
210
 
%  Switch on the debug flag.
211
 
 
212
 
\item[{\tt -xml}]\ 
213
 
 
214
 
  This option is for use with {\tt coqc}. It tells \Coq\ to export on
215
 
  the standard output the content of the compiled file into XML format.
216
 
 
217
 
\item[{\tt -quality}]
218
 
 
219
 
  Improve the legibility of the proof terms produced by some tactics.
220
 
 
221
 
\item[{\tt -emacs}]\ 
222
 
 
223
 
  Tells \Coq\ it is executed under Emacs.
224
 
 
225
 
\item[{\tt -impredicative-set}]\ 
226
 
 
227
 
  Change the logical theory of {\Coq} by declaring the sort {\tt Set}
228
 
  impredicative; warning: this is known to be inconsistent with
229
 
  some standard axioms of classical mathematics such as the functional
230
 
  axiom of choice or the principle of description
231
 
 
232
 
\item[{\tt -dump-glob} {\em file}]\
233
 
 
234
 
  This dumps references for global names in file {\em file}
235
 
  (to be used by coqdoc, see~\ref{coqdoc})
236
 
 
237
 
\item[{\tt -dont-load-proofs}]\ 
238
 
 
239
 
  This avoids loading in memory the proofs of opaque theorems
240
 
  resulting in a smaller memory requirement and faster compilation;
241
 
  warning: this invalidates some features such as the extraction tool.
242
 
 
243
 
\item[{\tt -vm}]\ 
244
 
 
245
 
  This activates the use of the bytecode-based conversion algorithm
246
 
  for the current session (see section~\ref{SetVirtualMachine}).
247
 
 
248
 
\item[{\tt -image} {\em file}]\ 
249
 
 
250
 
  This option sets the binary image to be used to be {\em file}
251
 
  instead of the standard one. Not of general use.
252
 
 
253
 
\item[{\tt -bindir} {\em directory}]\ 
254
 
 
255
 
  Set for {\tt coqc} the directory containing \Coq\ binaries.
256
 
  It is equivalent to do \texttt{export COQBIN=}{\em directory}
257
 
  before lauching {\tt coqc}.
258
 
 
259
 
\item[{\tt -where}]\ 
260
 
 
261
 
  Print the \Coq's standard library location and exit.
262
 
 
263
 
\item[{\tt -v}]\ 
264
 
 
265
 
  Print the \Coq's version and exit.
266
 
 
267
 
\item[{\tt -h}, {\tt --help}]\ 
268
 
 
269
 
  Print a short usage and exit.
270
 
 
271
 
\end{description}
272
 
 
273
 
% {\tt coqtop} has an additional option:
274
 
 
275
 
% \begin{description}
276
 
% \item[{\tt -searchisos}]\ \\
277
 
%   Launch the {\sf Coq\_SearchIsos} toplevel
278
 
%   (see section~\ref{coqsearchisos}, page~\pageref{coqsearchisos}).
279
 
% \end{description}
280
 
 
281
 
% $Id: RefMan-com.tex 9044 2006-07-12 13:22:17Z herbelin $ 
282
 
 
283
 
%%% Local Variables: 
284
 
%%% mode: latex
285
 
%%% TeX-master: "Reference-Manual"
286
 
%%% End: