Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ icont(1) — Ultrix WS 2.0 VAX

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

iconc(1)

m4(1)

prof(1)

monitor(3)

ICONT(1)

NAME

icont − translate Icon programs for interpretive execution

SYNOPSIS

icont [ option ... ] file ... [ −x arg ... ]

DESCRIPTION

Icont is a translator for Version 5 of the Icon programming language, which produces a file suitable for interpretation by the Icon interpreter.  Translation consists of two phases: translation and linking. During translation, each Icon source file is translated into an intermediate language; during linking, the intermediate language files are combined and a single output file is produced. The output file from the linker is referred to as an interpretable file.  Unless the −o option is specified, the name of the resulting interpretable file is formed by deleting the suffix of the first input file named on the command line.  If the −x argument is used, the file is automatically executed by the interpreter and any arguments following the −x are passed as execution arguments to the Icon program itself. 

Files whose names end in ‘.icn’ are assumed to be Icon source programs; they are translated, and the intermediate code is left in two files of the same name with ‘.u1’ and ‘.u2’ substituted for ‘.icn’.  The intermediate code files normally are deleted when compilation has finished.  Files whose names end in ‘.u1’ or ‘.u2’ are assumed to be intermediate code files from a previous translation (only one should be named — the other is assumed); these files are included in the linking phase after any ‘.icn’ files have been translated.  A ‘.u1’ or ‘.u2’ file that is explicitly named is not deleted.  Icon source programs may be read from standard input.  The argument − signifies the use of standard input as a source file.  In this case, the intermediate code is placed in ‘stdin.u1’ and ‘stdin.u2’ and the interpretable file is ‘stdin’. 

The following options are recognized by icont.

−c Suppress the linking phase.  The intermediate code files are not deleted. 

−m Preprocess each ‘.icn’ source file with the m4(1) macro processor before translation.

−o output
Name the interpretable file output.

−s Suppress any informative messages from the translator and linker.  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.  Normally, &trace has an initial value of 0. 

−u Issue warning messages for undeclared identifiers in the program.  The warnings are issued during the linking phase. 

The interpretable file produced by the Icon linker is directly executable.  For example, the command

icont hello.icn

produces a file named hello that can be run by the command

hello

The method used to make interpretable files appear to be directly executable is system dependent. See the Icon installation guide for complete details. For most intents and purposes, interpretable files are executable programs in the same sense that files produced by ld(1) are executable programs.

Arguments can be passed to the Icon program by following the program name with the arguments.  Any such arguments are passed to the main procedure as a list of strings. 

When an Icon program is executed, a number of environment variables are examined to determine certain execution parameters.  The values assigned to these variables should be numbers.  The variables that affect execution and the interpretations of their values are as follows:

TRACE
Initialize the value of &trace.  If this variable has a value, it overrides the translation-time −t option. 

NBUFS
The number of i/o buffers to use for files. When a file is opened, it is assigned an i/o buffer if one is available and the file is not a tty. If no buffer is available, the file is not buffered. &input, &output, and &errout are buffered if buffers are available.  On VAX systems, ten buffers are allocated initially; on PDP-11 systems, five buffers are allocated initially. 

NOERRBUF
If set, &errout is not buffered. 

STRSIZE
The initial size of the string space, in bytes. The string space grows if necessary, but it never shrinks. On VAX systems, the string space is initially 51,200 bytes; on PDP-11 systems, 10,240 bytes initially.

HEAPSIZE
The initial size of the heap, in bytes. The heap grows if necessary, but it never shrinks. On VAX systems, the heap is initially 51,200 bytes; on PDP-11 systems, 10,240 bytes initially.

NSTACKS
The number of stacks initially available for co-expressions. On VAX systems, four stacks are initially allocated; on PDP-11 systems, two stacks are initially allocated. More are automatically allocated if needed.  It is unwise to set NSTACKS to 1. 

STKSIZE
The size of each co-expression stack, in words. On VAX systems, stacks are normally 2000 words; on PDP-11 systems, stacks are normally 1000 words.

PROFILE
Turn on execution profiling of the runtime system. The value of this variable specifies the sampling resolution, in words. If the value is zero, profiling is not done. When a profiled program finishes, a file named ‘mon.out’ is created containing the results of the profile. The program prof(1) can be used to examine the results. This produces a profile of the runtime system, not the user program.

FILES

v5g/int/bin/utranicon translator
v5g/int/bin/ulinkicon linker
v5g/int/bin/iconxicon interpreter
mon.outresults of profiling

SEE ALSO

The Icon Programming Language, Ralph E. Griswold and Madge T. Griswold, Prentice-Hall Inc., Englewood Cliffs, New Jersey, 1983. 

Installation and Maintenance Guide for Release 5g of Icon, Department of Computer Science, The University of Arizona, March 1983. 

iconc(1), m4(1), prof(1), monitor(3)

BUGS

Downward compatibility of interpretable files will not be maintained in subsequent releases of Icon.  No checks are performed to determine if the interpretable file and the interpreter are compatible.  Peculiar program behavior is the only indication of such incompatibility. 

Interpretable files do not stand alone; the Icon interpreter must be present on the system.  This implies that an interpretable file produced on one system will not work on another system unless the Icon interpreter is in the same place on both systems and that the interpreter is of the same version of Icon as the translator that produced the interpretable file. 

Because of the way that co-expressions are implemented, there is a possibility that programs in which they are used may malfunction mysteriously. 

Integer overflow on multiplication is not detected. 

If the −m option is used, line numbers reported in error messages or tracing messages are from the file after, not before, preprocessing. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026