home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / doc / ipd244.txt < prev    next >
Text File  |  1999-07-01  |  8KB  |  215 lines

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