} IIIICCCCOOOONNNN((((1111)))) IIIICCCCOOOONNNN((((1111)))) 11113333 MMMMaaaarrrrcccchhhh 1111999999993333 IIIIPPPPDDDD222211119999 NNNNAAAAMMMMEEEE icon - interpret or compile Icon programs SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS icont [ option ... ] file ... [ -x arg ... ] iconc [ option ... ] file ... [ -x arg ... ] DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN icont and iconc each convert an Icon source program into executable form. icont translates quickly and provides interpretive execution. iconc takes longer to compile but produces programs that execute faster. icont and iconc for the most part can be used interchangeably. This manual page describes both icont and iconc. Where there there are differences in usage between icont and iconc, these are noted. FFFFiiiilllleeee NNNNaaaammmmeeeessss:::: Files whose names end in .icn are assumed to be Icon source files. The .icn suffix may be omitted; if it is not present, it is supplied. The character - can be used to indicate an Icon source file given in standard input. Several source files can be given on the same command line; if so, they are combined to produce a single program. The name of the executable file is the base name of the first input file, formed by deleting the suffix, if present. stdin is used for source programs given in standard input. PPPPrrrroooocccceeeessssssssiiiinnnngggg:::: As noted in the synopsis above, icont and iconc accept options followed by file names, optionally followed by -x and arguments. If -x is given, the program is executed automatically and any following arguments are passed to it. icont: The processing performed by icont consists of two phases: _t_r_a_n_s_l_a_t_i_o_n and _l_i_n_k_i_n_g. During translation, each Icon source file is translated into an intermediate language called _u_c_o_d_e. Two ucode files are produced for each source file, with base names from the source file and suffixes .u1 and .u2. During linking, the one or more pairs of ucode files are combined to produce a single _i_c_o_d_e file. The ucode files are deleted after the icode file is created. Processing by icont can be terminated after translation by the -c option. In this case, the ucode files are not deleted. The names of .u1 files from previous translations can be given on the icont command line. These files and the corresponding .u2 files are included in the linking phase after the translation of any source files. The suffix .u can be used in place of .u1; in this case the 1 is supplied automatically. Ucode files that are explicitly named are not deleted. iconc: The processing performed by iconc consists of two phases: _c_o_d_e _g_e_n_e_r_a_t_i_o_n and _c_o_m_p_i_l_a_t_i_o_n _a_n_d _l_i_n_k_i_n_g. The code generation phase - 1 - Formatted: December 9, 1994 IIIICCCCOOOONNNN((((1111)))) IIIICCCCOOOONNNN((((1111)))) 11113333 MMMMaaaarrrrcccchhhh 1111999999993333 IIIIPPPPDDDD222211119999 produces C code, consisting of a .c and a .h file, with the base name of the first source file. These files are then compiled and linked to produce an executable binary file. The C files normally are deleted after compilation and linking. Processing by iconc can be terminated after code generation by the -c option. In this case, the C files are not deleted. OOOOPPPPTTTTIIIIOOOONNNNSSSS The following options are recognized by icont and iconc: -c Stop after producing intermediate files and do not delete them. -e _f_i_l_e Redirect standard error output to _f_i_l_e. -m Preprocess each .icn source file with the _m_4(_1) macro processor. -o _n_a_m_e Name the output file _n_a_m_e. -s Suppress informative messages. Normally, both informative messages and error messages are sent to standard error output. -t Arrange for &trace to have an initial value of -1 when the program is executed and for iconc enable debugging features. -u Issue warning messages for undeclared identifiers in the program. -E Direct the results of preprocessing to standard output and inhibit further processing. The following additional options are recognized by iconc: -f _s_t_r_i_n_g Enable features as indicated by the letters in _s_t_r_i_n_g: a all, equivalent to delns d enable debugging features: display(), name(), variable(), error trace back, and the effect of -f n (see below) e enable error conversion l enable large-integer arithmetic n produce code that keeps track of line numbers and file names in the source code s enable full string invocation - 2 - Formatted: December 9, 1994 IIIICCCCOOOONNNN((((1111)))) IIIICCCCOOOONNNN((((1111)))) 11113333 MMMMaaaarrrrcccchhhh 1111999999993333 IIIIPPPPDDDD222211119999 -n _s_t_r_i_n_g Disable specific optimizations. These are indicated by the letters in _s_t_r_i_n_g: a all, equivalent to cest c control flow optimizations other than switch statement optimizations e expand operations in-line when reasonable (keywords are always put in-line) s optimize switch statements associated with operation invocations t type inference -p _a_r_g Pass _a_r_g on to the C compiler used by iconc -r _p_a_t_h Use the run-time system at _p_a_t_h, which must end with a slash. -v _i Set verbosity level of informative messages to _i -_C _p_r_g Have iconc use the C compiler given by _p_r_g EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS When an Icon program is executed, several environment variables are examined to determine certain execution parameters. Values in parentheses are the default values. BLKSIZE (65000) The initial size of the allocated block region, in bytes. COEXPSIZE (2000) The size, in words, of each co-expression block. DBLIST The location of data bases for iconc to search before the standard one. The value of DBLIST should be a blank-separated string of the form _p_1 _p_2 ... _p_n where the _p_i name directories. ICONCORE If set, a core dump is produced for error termination. ICONX The location of iconx, the executor for icode files, is built into an icode file when it is produced. This location can be overridden - 3 - Formatted: December 9, 1994 IIIICCCCOOOONNNN((((1111)))) IIIICCCCOOOONNNN((((1111)))) 11113333 MMMMaaaarrrrcccchhhh 1111999999993333 IIIIPPPPDDDD222211119999 by setting the environment variable ICONX. If ICONX is not set and iconx is not found on the built-in path, PATH is searched for it. If this environment variable is set, it specifies the location of iconx to use to execute an icode file. IPATH The location of ucode files specified in link declarations for icont. IPATH is a blank-separated list of directories. The current directory is always searched first, regardless of the value of IPATH. LPATH The location of source files specified in link declarations for iconc. LPATH is otherwise similar to IPATH. MSTKSIZE (10000) The size, in words, of the main interpreter stack for icont. NOERRBUF By default, &errout is buffered. If this variable is set, &errout is not buffered. QLSIZE (5000) The size, in bytes, of the region used for pointers to strings during garbage collection. STRSIZE (65000) The initial size of the string space, in bytes. TRACE The initial value of &trace. If this variable has a value, it overrides the translation-time -t option. FFFFIIIILLLLEEEESSSS icont Icon translator iconc Icon compiler iconx Icon executor SSSSEEEEEEEE AAAALLLLSSSSOOOO _T_h_e _I_c_o_n _P_r_o_g_r_a_m_m_i_n_g _L_a_n_g_u_a_g_e, Ralph E. Griswold and Madge T. Griswold, Prentice-Hall Inc., Englewood Cliffs, New Jersey, Second Edition, 1990. _V_e_r_s_i_o_n _8._1_0 _o_f _I_c_o_n, Ralph E. Griswold, Clinton L. Jeffery, and Gregg M. Townsend, IPD212, Department of Computer Science, The University of Arizona, 1993. _U_s_i_n_g _V_e_r_s_i_o_n _8._1_0 _o_f _t_h_e _I_c_o_n _C_o_m_p_i_l_e_r, Ralph E. Griswold, IPD214, Department of Computer Science, The University of Arizona, 1993. m4(1), icon_vt(1) LLLLIIIIMMMMIIIITTTTAAAATTTTIIIIOOOONNNNSSSS AAAANNNNDDDD BBBBUUUUGGGGSSSS The icode files for the interpreter do not stand alone; the Icon run- time system (iconx) must be present. Stack overflow is checked using a heuristic that is not always effective. If the -m option is used, - 4 - Formatted: December 9, 1994 IIIICCCCOOOONNNN((((1111)))) IIIICCCCOOOONNNN((((1111)))) 11113333 MMMMaaaarrrrcccchhhh 1111999999993333 IIIIPPPPDDDD222211119999 line numbers reported in error messages and tracing messages are from the file after, not before, preprocessing. - 5 - Formatted: December 9, 1994