cduce.1 3.89 KB
Newer Older
1 2 3 4 5 6
.\" This manpage has been automatically generated by docbook2man 
.\" from a DocBook document.  This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
.\" Please send any bug reports, improvements, comments, patches, 
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "CDUCE" "1" "23 February 2004" "" ""
7 8 9 10 11

.SH NAME
cduce \- The CDuce interpreter
.SH SYNOPSIS

12
\fBcduce\fR [ \fB  OPTIONS\fR\fI ...\fR ] [ \fB  \fIfile[.cd]\fB\fR\fI ...\fR ] [ \fB--arg \fIargument\fB\fR\fI ...\fR ]
13

14

15
\fBcduce --compile\fR [ \fB  OPTIONS\fR\fI ...\fR ] [ \fB  \fIfile[.cd]\fB\fR\fI ...\fR ]
16 17


18
\fBcduce --run\fR [ \fB  OPTIONS\fR\fI ...\fR ] [ \fB  \fIfile[.cdo]\fB\fR\fI ...\fR ] [ \fB--arg \fIargument\fB\fR\fI ...\fR ]
19

20 21 22 23
.SH "DESCRIPTION"
.PP
The \fBcduce\fR command considers all the .cd files on the command
line that follow the options as CDuce sources, and executes them
24 25 26
successively. With the --compile option it produce a file with intermediate code
that can be run by cduce --run (without options the two steps are piped) All the
arguments that follow the --arg option are passed to the source file(s).
27 28 29 30
.PP
If no CDuce file is given on the command line
then the interpreter uses the standard input and behaves as an interactive
toplevel. Toplevel phrases are processed after each \fB;;\fR. Mutually recursive declarations of types or functions must be contained in a single adjacent sequence of phrases (without \fB;;\fR inbetween).
31
In order to allow persistence (options \fB--dump\fR, \fB--load\fR, and \fB--save\fR) to operate, you must quit the toplevel with \fB#quit\fR toplevel directive and not with \fBCtrl-D\fR or \fBCtrl-C\fR.
32 33
.SH "OPTIONS"
.PP
34
This program follows usual syntax,
35 36 37 38 39
with long options starting with two dashes (`--'). A
summary of the options supported by \fBcduce\fR
is included below.  
.SS "GENERIC OPTIONS"
.TP
40 41 42
\fB--compile \fIfile\fB\fR
Produces a file in an intermediate code that can be run by cduce --run
.TP
43
\fB--dump \fIfile\fB\fR
44 45 46 47
This option is equivalent to restore the environment previously saved in
\fIfile\fR by the \fB--load \fIfile\fB\fR \fB--save \fIfile\fB\fR.
.TP
\fB--expat\fR
48
Use the Expat parser for loading XML documents (this option is available only if CDuce was built with  Expat support; in that case it is the default option). Cannot be used in conjuction with the \fB--pxp\fR option.
49
.TP
50
\fB-h, --help\fR
51 52 53
Display a short help message and exit.
.TP
\fB--license\fR
54
Show license information and exit.
55
.TP
56 57 58 59 60
\fB--load \fIfile\fB\fR
Restore the environment previously saved in
\fIfile\fR by the \fB--save\fR option.
.TP
\fB--pxp\fR
61
Use the PXP parser for loading XML documents. Cannot be used in conjuction with the \fB--expat\fR option.
62
.TP
63 64 65 66 67
\fB--quiet\fR
Suppress normal output (typing, results). It is normally
used when the CDuce interpreter is used in the context of batch
processing.
.TP
68 69 70
\fB--run\fR
Executes .cdo files produced by cduce --compile.
.TP
71 72 73 74 75 76
\fB--save \fIfile\fB\fR
This options allows persistence between several invocations of the
interpreter: the current environment (i.e., the set defined types and values) is saved in
\fIfile\fR when the interpreter terminates so that it
can be succesively restored by using \fB--load\fR option
.TP
77 78 79 80 81
\fB-v, --version\fR
Show version information and exit.
.SS "PROGRAM OPTIONS"
.PP
.TP
82 83
\fB--arg \fIarguments\fB\fR
All the arguments following \fB--arg\fR are passed to the CDuce
84 85 86 87 88 89 90 91 92 93 94 95 96 97
program, in the variable \fBargv\fR (of type \fB[ String*
]\fR, which means sequence of character strings).
.SH "REPORTING BUGS"
.PP
Report bugs to <bugs@cduce.org>.
.SH "SEE ALSO"
.PP
A complete documentation, reference manual, tutorial, technical articles on
implementation and theoretical issues, benchmarks, source code, mailing lists
and forums can be found on the \fBCDuce\fR website:
\fIhttp://www.cduce.org\fR.
.SH "AUTHOR"
.PP
Alain Frisch <Alain.Frisch@ens.fr> with small contributions of
98
Giuseppe Castagna <Giuseppe.Castagna@ens.fr>, and Stefano Zacchiroli <zack@di.ens.fr>.