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:
.\" <> 
.\" Please send any bug reports, improvements, comments, patches, 
.\" etc. to Steve Cheng <>.
.TH "CDUCE" "1" "23 February 2004" "" ""
7 8 9 10 11

cduce \- The CDuce interpreter

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


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

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

20 21 22 23
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
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).
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
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.  
40 41 42
\fB--compile \fIfile\fB\fR
Produces a file in an intermediate code that can be run by cduce --run
\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.
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.
\fB-h, --help\fR
51 52 53
Display a short help message and exit.
Show license information and exit.
56 57 58 59 60
\fB--load \fIfile\fB\fR
Restore the environment previously saved in
\fIfile\fR by the \fB--save\fR option.
Use the PXP parser for loading XML documents. Cannot be used in conjuction with the \fB--expat\fR option.
63 64 65 66 67
Suppress normal output (typing, results). It is normally
used when the CDuce interpreter is used in the context of batch
68 69 70
Executes .cdo files produced by cduce --compile.
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
77 78 79 80 81
\fB-v, --version\fR
Show version information and exit.
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).
Report bugs to <>.
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:
Alain Frisch <> with small contributions of
Giuseppe Castagna <>, and Stefano Zacchiroli <>.