icon.1 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. .co \" IPD244d: Manual page for Version 9 icon(1)
  2. .ds I \fHicont\fR and \fHiconc\fR
  3. .TH ICON 1 "29 November 1996 IPD244d"
  4. .SH NAME
  5. icon \- interpret or compile Icon programs
  6. .SH SYNOPSIS
  7. \fHicont\fR [ option ... ] file ... [ \fH\-x\fR arg ... ]
  8. .br
  9. \fHiconc\fR [ option ... ] file ... [ \fH\-x\fR arg ... ]
  10. .SH DESCRIPTION
  11. \*I each convert an Icon source program into executable form.
  12. \fHicont\fR translates quickly and provides interpretive execution.
  13. \fHiconc\fR takes longer to compile but produces programs that
  14. execute faster.
  15. \fHicont\fR and \fHiconc\fR for the most part can be used interchangeably.
  16. .PP
  17. This manual page describes both \*I. Where there
  18. there are differences in usage between \*I, these are noted.
  19. .PP
  20. \fBFile Names:\fR Files whose names end in \fH.icn\fR are assumed
  21. to be Icon source files. The \fH.icn\fR suffix may be omitted;
  22. if it is not present, it is supplied. The character \fH\-\fR can
  23. be used to indicate an Icon source file given in standard input.
  24. Several source files can be given on the same command line; if so, they
  25. are combined to produce a single program.
  26. .PP
  27. The name of the executable file is the base name of the
  28. first input file,
  29. formed by deleting the suffix, if present. \fHstdin\fR is used for
  30. source programs given in standard input.
  31. .PP
  32. \fBProcessing:\fR As noted in the synopsis above, \*I accept options followed
  33. by file names, optionally followed by \fH\-x\fR and arguments. If \fH\-x\fR
  34. is given, the program is executed automatically and any following
  35. arguments are passed to it.
  36. .PP
  37. \fHicont\fR: The processing performed by \fHicont\fR consists of two phases:
  38. \fItranslation\fR and \fIlinking\fR. During translation,
  39. each Icon source file is translated into an intermediate language called
  40. \fIucode\fR. Two ucode files are produced for each
  41. source file, with base names from the
  42. source file and suffixes \fH.u1\fR and \fH.u2\fR.
  43. During linking, the one or more pairs of ucode files are combined to
  44. produce a single
  45. \fIicode\fR file.
  46. The ucode files are deleted after the icode file is created.
  47. .PP
  48. Processing by \fHicont\fR can be terminated after translation by the
  49. \fH\-c\fR option. In this case, the ucode files are not deleted.
  50. The names of \fH.u1\fR files from previous translations can be given on the
  51. \fHicont\fR command line.
  52. These files and the corresponding \fH.u2\fR
  53. files are included in the linking phase after the translation of any source
  54. files.
  55. The suffix \fH.u\fR can be used in place of \fH.u1\fR; in this case
  56. the \fH1\fR is supplied automatically.
  57. Ucode files that are explicitly named are not deleted.
  58. .PP
  59. \fHiconc\fR: The processing performed by \fHiconc\fR consists of two
  60. phases: \fIcode generation\fR and \fIcompilation and linking\fR. The
  61. code generation phase produces C code, consisting of a \fH.c\fR and a \fH.h\fR
  62. file, with the base name of the first source file. These files are
  63. then compiled and linked to produce an executable binary file.
  64. The C files normally are deleted after compilation and linking.
  65. .PP
  66. Processing by \fHiconc\fR can be terminated after code generation by
  67. the \fH\-c\fR option. In this case, the C files are not deleted.
  68. .SH OPTIONS
  69. The following options are recognized by \*I:
  70. .TP 4
  71. \fH\-c\fR
  72. Stop after producing intermediate files and do not delete them.
  73. .TP 4
  74. \fH\-e\fR \fIfile\fR
  75. Redirect standard error output to \fIfile\fR.
  76. .TP
  77. \fH\-f s\fR
  78. Enable full string invocation.
  79. .TP
  80. \fH\-o \fIname\fR
  81. Name the output file \fIname\fR.
  82. .TP
  83. \fH\-s\fR
  84. Suppress informative messages.
  85. Normally, both informative messages and error messages are sent
  86. to standard error output.
  87. .TP
  88. \fH\-t\fR
  89. Arrange for \fH&trace\fR to have an initial value of \-1
  90. when the program is executed and for \fHiconc\fR enable debugging features.
  91. .TP
  92. \fH\-u\fR
  93. Issue warning messages for undeclared identifiers in the program.
  94. .TP
  95. \fH\-v \fIi\fR
  96. Set verbosity level of informative messages to \fIi\fH
  97. .TP
  98. \fH\-E\fR
  99. Direct the results of preprocessing to standard output and inhibit
  100. further processing.
  101. .PP
  102. The following additional options are recognized by \fHiconc\fR:
  103. .TP 4
  104. \fH\-f \fIstring\fR
  105. Enable features as indicated by the letters in \fIstring\fR:
  106. .TP 8
  107. \fHa\fR
  108. all, equivalent to \fHdelns\fR
  109. .TP 8
  110. \fHd\fR
  111. enable debugging features: \fHdisplay()\fR,
  112. \fHname()\fR, \fHvariable()\fR, error
  113. trace back, and the effect of \fH\-f n\fR (see below)
  114. .TP 8
  115. \fHe\fR
  116. enable error conversion
  117. .TP 8
  118. \fHl\fR
  119. enable large-integer arithmetic
  120. .TP 8
  121. \fHn\fR
  122. produce code that keeps track of line numbers and file names in the source code
  123. .TP 8
  124. \fHs\fR
  125. enable full string invocation
  126. .TP 4
  127. \fH\-n \fIstring\fR
  128. Disable specific optimizations. These are indicated by the
  129. letters in \fIstring\fR:
  130. .TP 8
  131. \fHa\fR
  132. all, equivalent to \fHcest\fR
  133. .TP 8
  134. \fHc\fR
  135. control flow optimizations other than switch statement optimizations
  136. .TP 8
  137. \fHe\fR
  138. expand operations in-line when reasonable
  139. (keywords are always put in-line)
  140. .TP 8
  141. \fHs\fR
  142. optimize switch statements associated with operation invocations
  143. .TP 8
  144. \fHt\fR
  145. type inference
  146. .TP 4
  147. \fH\-p \fIarg\fR
  148. Pass \fIarg\fR on to the C compiler used by \fHiconc\fR
  149. .TP 4
  150. \fH\-r \fIpath\fR
  151. Use the run-time system at \fIpath\fR, which must end with a slash.
  152. .TP 4
  153. .TP 4
  154. \fH\-C \fIprg\fR
  155. Have \fHiconc\fR use the C compiler given by \fIprg\fH
  156. .SH "ENVIRONMENT VARIABLES"
  157. When an Icon program is executed, several environment variables
  158. are examined to determine certain execution parameters.
  159. Values in parentheses are the default values.
  160. .TP 4
  161. \fHBLKSIZE\fR (500000)
  162. The initial size of the allocated block region, in bytes.
  163. .TP
  164. \fHCOEXPSIZE\fR (2000)
  165. The size, in words, of each co-expression block.
  166. .TP
  167. \fHDBLIST\fR
  168. The location of data bases
  169. for \fHiconc\fR to search before the standard one.
  170. The value of \fHDBLIST\fR should be a blank-separated
  171. string of the form \fIp1\0p2 ...\0 pn\fR where the \fIpi\fR name directories.
  172. .TP
  173. \fHICONCORE\fR
  174. If set, a core dump is produced for error termination.
  175. .TP 4
  176. \fHICONX\fR
  177. The location of \fHiconx\fR, the executor for icode files, is
  178. built into an icode file when it
  179. is produced. This location can be overridden by setting the
  180. environment variable \fHICONX\fR.
  181. If \fHICONX\fR is set, its value is used in place of the location
  182. built into the icode file.
  183. .TP 4
  184. \fHIPATH\fR
  185. The location of ucode files
  186. specified in link declarations for \fHicont\fR.
  187. \fHIPATH\fR is a blank-separated list of directories.
  188. The current directory is always searched first, regardless of the value of
  189. \fHIPATH\fR.
  190. .TP 4
  191. \fHLPATH\fR
  192. The location of source files
  193. specified in preprocessor \fH$include\fR directives and in link
  194. declarations for \fHiconc\fR.
  195. \fHLPATH\fR is otherwise similar to \fHIPATH\fR.
  196. .TP
  197. \fHMSTKSIZE\fR (10000)
  198. The size, in words, of the main interpreter stack for \fHicont\fR.
  199. .TP
  200. \fHNOERRBUF\fR
  201. By default, \fH&errout\fR is buffered. If this variable is set, \fH&errout\fR
  202. is not buffered.
  203. .TP
  204. \fHQLSIZE\fR (5000)
  205. The size, in bytes, of the region used for pointers
  206. to strings during garbage collection.
  207. .TP
  208. \fHSTRSIZE\fR (500000)
  209. The initial size of the string space, in bytes.
  210. .TP
  211. \fHTRACE\fR
  212. The initial value of \fH&trace\fR.
  213. If this variable has a value, it overrides the translation-time
  214. \fH\-t\fR
  215. option.
  216. .SH FILES
  217. .ta \w'\fHicont\fR 'u
  218. \fHicont\fR Icon translator
  219. .br
  220. \fHiconc\fR Icon compiler
  221. .br
  222. \fHiconx\fR Icon executor
  223. .br
  224. .SH SEE ALSO
  225. \fIThe Icon Programming Language\fR,
  226. Ralph E. Griswold and Madge T. Griswold,
  227. Peer-to-Peer Communications, Inc., Third Edition, 1996.
  228. .LP
  229. \fIVersion 9.3 of Icon\fR, Ralph E. Griswold, Clinton L. Jeffery,
  230. and Gregg M. Townsend, IPD278,
  231. Department of Computer Science, The University of Arizona, 1996.
  232. .LP
  233. \fIVersion 9 of the Icon Compiler\fR,
  234. Ralph E. Griswold, IPD237, Department of Computer Science,
  235. The University of Arizona, 1995.
  236. .LP
  237. icon_vt(1)
  238. .SH "LIMITATIONS AND BUGS"
  239. .LP
  240. The icode files for the
  241. interpreter do not stand alone; the Icon run-time system (\fHiconx\fR) must be
  242. present.
  243. .LP
  244. Stack overflow is checked using a heuristic that is not always effective.