IMP(ID:512/imp002)

Extensible dialect of ALGOL-60 


Extensible dialect of ALGOL-60, on CDC 1604.

Ned Irons, Communication Research Division of Institute of Defense Analyses (CRD/IDA), Princeton

Used to write IDASYS, Folklore

(later Center for Communications Research of IDA CCR/IDA)


Related languages
ALGOL 60 => IMP   Extension of
IMP => IMP72   Implementation

References:
  • Irons, Edgar T. "Experience with an Extensible Language" view details Abstract: An operational extensible language system is described. The system and its base language are appraised with respect to efficiency, flexibility, and utility for different categories of users. DOI Extract: Introduction
    A family of extensible languages which have been used for general programming in the IDA-CRD computing center for several years is presented, and aspects of this experience which are of general interest are examined. One of the principal incentives for the language system was to produce a language and compiler which was a "real world" tool: one which was suitable for general programming use (particularly for "system programming" including programming of the compiler) and whose compiler was good enough to compete with standard commercial software.
    Other hopes for the project were to use the mechanisms for extensibility to produce an "elegantly bootstrapped" compiler, to find formal systems for specifying the translation processes (particularly code optimizing processes), and yet to maintain a conciseness and simplicity of devices which allow the use of the more interesting properties of the system by users of average sophistication.
    The language system, which has come to be called IMP, began in early 1965 as a compiler, written first in machine language and then in its own language, for the Control Data 1604 computer. As plans developed for replacing the 1604 computer with a 6600, the compiler was carried over to the 6600 in two versions, one each for the central processor and peripheral processors, and was used exclusively for the programming of the CRD time-sharing system, which has been in continuous use since late 1967 at CRD.
    The IMP language has been in general use on the 6600 since then, suffering somewhat from economies of implementation, but nonetheless a productive tool. The most recent work on the language system has been to consolidate lessons learned from the first implementations by reorganizing and reprogramming the compiler to provide a firm base for further work and a more gentle and sympathetic servant for everyday tasks.
    Extract: The IMP Language
    The IMP Language
    A complete description of the IMP family of languages is not required for this paper, but we shall describe some of the facilities it contains, with details where appropriate to facilitate further discussion. In brief, the language is ALGOL 60 except: without block structure; with completely dynamic storage of arrays; without type-dependent operators; with basic list processing capabilities; with syntactic extensibility; and including recursively callable procedures where the recursive capability is specifically requested.

    By way of example, the complete program



    is composed entirely of the definition of a subroutine which locates its parameter A in the vector WORDS if it occurs, and otherwise appends A to WORDS. Before the first execution of the subroutine, the vector WORDS is empty.
    The constructions which have been used in this program include most of the basic ones and are described briefly here. Following each IMP expression, where applicable, is an equivalent ALGOL 60 construction in parentheses, as well as a brief statement of the meaning of the expression.



    In the subroutine APPEND, the vector WORDS is assumed to contain N items. The vector is initially empty and the fact that all variables are initialized to zero is used for N. Each time APPEND is called, the parameter A is compared with each item in WORDS. If A matches an items its index in WORDS is the value of APPEND. If not, A is added to the end of WORDS, N is made one larger and is compared with the currently allocated size of WORDS which by convention is addressed as the rightmost 18 bits of the (-2) item of every vector. In the event that WORDS will be too small, function REALLOT is invoked to make the vector WORDS larger by 100 words.
    Extract: Syntactic Extensions
    Syntactic Extensions
    The grammar for the IMP language is a context-free grammar [3], and the extension mechanism allows specifications in a notation which is isomorphic to such a grammar.
    The associated parsing procedure is a refinement of that in [8]. However, considerable attention has been given to both the extension notation and to the structure of the base grammar so that for simple extensions only the essentials of the extension need to be specified and no knowledge of the base grammar is required.
    The most general form of a syntactic extension is exemplified by the definition of a right assignment operator:

    EXPR :: (A,EXPR) → (B,NAME) :: 'B ← A'


    This extension specifies that the syntactic entity EXPR may be formed from three items in sequence:
    1. A syntactic entity EXPR (labeled A).
    2. The symbol →.
    3. A syntactic entity NAME (labeled B).
    (The equivalent production given in the notation of the ALGOL 60 report [10] is <EXPR>::=<EXPR> →<NAME>.)
    The expression B ← A gives the semantic portion of the extension. It must be an expression from the base language including all extensions up to this one. This expression specifies the effect that an occurrence of the defined construction will have in a program. The effect is that of the expression B ← A, but with A replaced by the NAME (comprising item 3 above) and B replaced by the EXPR (item 1). For example if X + Y → Z is an occurrence of the construction in a program, its effect is that of B ← A with A replaced by X + Y and with B replaced by Z, i.e. Z ← X + Y. Thus A and B are formal parameters of the defining expression A ← B. They are marked as such by their association with the syntactic items in the definition: A in (A, EXPR) and B in (B, NAME ).
    An extension such as the one given above is similar to a procedure declaration in ALGOL 60, except that the syntactic form of a call of the procedure is fixed in ALGOL 60, whereas in IMP it is separately specified in each declaration.
    Thus the above extension is like the ALGOL 60 declaration procedure ASSIGN(A, B); B := A, except that the syntactic form for a call of the procedure is X → Y instead of ASSIGN(X, Y). In IMP, the parameter passing mechanism is implemented by literally copying the procedure body in place of the call, but replacing formal parameters in the body by actual parameters in the call. Thus the calling mechanism corresponds exactly to the ALGOL 60 call by name. Since this calling form is the most general of those in current use, it allows the FORTRAN "address passing" call or the ALGOL 60 value passing call to be implemented within the existing framework. The call of a definition can be implemented by actual substitution (as usually done for macros in assemblers) or by generating only once a closed-form subroutine which is used for each call (as is generally done for compiler-generated subroutine definitions). Which of these is more efficient is usually determined by the length of the definition.
    The ability (or requirement) to specify the syntactic form for a call individually for each subroutine can be a mixed blessing, however. The power of this facility is great enough to allow the whole compiler (including the syntax for syntax) to be specified within its framework. However, many extensions are so simple in form that the requirement to specify syntactic types is too great, especially since most users will not be aware of the syntactic names associated with constructions of the language. Therefore, it is permissible to write an extension leaving out any or all of the syntactic names. The above extension rewritten in this way is:
    (A) → (B) :: 'B ← A'
    The missing syntactic specifications are filled in automatically. Some care must be taken, however, in the design of the base language to make this automatic filling in of syntactic types produce reasonable results. Since nearly every construction in IMP is of the type EXPR (or expression), the convention is adopted that the syntactic type EXPR will be filled in for all missing specifications, except that, to avoid ambiguities and to select right nesting for unparenthesized expressions, the left-most of the constituent categories will be chosen as PRIMARY (roughly including names and parenthesized expressions).
    So the result of presenting the short form of the definition (A) → (B) :: 'B ← A' is the same as having written:
    EXPR :: (A, PRIMARY) → (B, EXPR) :: 'B ← A'
    For this example the automatic choices are not quite the best, since they will usually require parenthesizing the left side when using this definition (X + Y → Z will be interpreted as X + (Y → Z)). Also we have allowed an expression to be used on the right where we probably would like a name. (What does A → (P + Q) mean?)
    Furthermore, a consequence of having the same syntactic
    category for all constructions would be that the
    operators + and ? occur at the same priority level, so that
    A * B + C would mean A * (B + C) and not (A * B) + C,
    as would be more natural to the mathematician. To establish a system of operator priorities, a syntactic category is established for each priority, perhaps with such suggestive names as LIKEPLUS and LIKETIMES, so that the syntactic parts of the extensions for + and * are
    LIKEPLUS :: (A, LIKEPLUS) + (B, LIKETIMES) :: ...
    LIKETIMES :: (A, LIKETIMES) * (B, PRIMARY) :: ...
    Then to define A - B at the same priority as A + B one would write
    LIKEPLUS :: (A) -- (B) : : . . .
    which would be taken as
    LIKEPLUS :: (A, LIKEPLUS) -- (B, LIKETIMES) :: ....
    The automatic filling in of intuitively correct categories for '(A) → (B)' is more difficult, and no attempt has yet been made in the IMP systems to improve on the method we have discussed. However, we can at least say that many extensions will be satisfactorily filled in this way. Of the 130 extensions defining one of the IMP languages, 76 or about 60 percent were filled in automatically.

          in [ACM] CACM 13(01) (Jan 1970) view details
  • Sammet, Jean E. "Brief survey of languages used for systems implementation" view details Extract: IMP
    Unlike most of the other languages discussed here, IMP [Irons, 1970] is an extensible language. A compiler for IMP existed in 1965 and was used for programming the time-sharing system on the CDC 6600; the time-sharing system has been in use since late 1967 at the Communications Research Division of IDA (Institute for Defense Analysis). While the language is purportedly based on ALGOL, it excludes many features from that language and includes extensibility features. For complex computers, some of the machine aspects must be treated outside of the extensibility mechanism. Although the compiler is somewhat slower than more standard ones, Irons states that it can be - and has been - used for practical and production work.
          in [ACM] SIGPLAN Notices 6(10) October 1971 Proceedings of the SIGPLAN symposium on Languages for system implementation 1971, Lafayette, Indiana, United States; October, 1971 view details
  • Bilofsky, W., "IMP Reference Manual" (CDC6600), Workin Paper No. 363, Communication Research Division, Institute for Defense Analysis, Princeton, New Jersey, 1972 view details
          in [ACM] SIGPLAN Notices 6(10) October 1971 Proceedings of the SIGPLAN symposium on Languages for system implementation 1971, Lafayette, Indiana, United States; October, 1971 view details
  • Rosen, S. "Programming Systems and Languages 1965-1975" view details Abstract: In spite of impressive gains by PL/I, Fortran and Cobol remain the languages in which most of the world's production programs are written and will remain so into the foreseeable future. There is a great deal of theoretical interest in Algol 68 and in extensible languages, but so far at least they have had little practical impact. Problem-oriented languages may very well become the most important language development area in the next five to ten years. In the operating system area all major computer manufacturers set out to produce very ambitious multiprogramming systems, and they all ran into similar problems. A number of university projects, though not directly comparable to those of the manufacturers, have contributed greatly to a better understanding of operating system principles. Important trends include the increased interest in the development of system measurement and evaluation techniques, and increased use of microprogramming for some programming system functions. DOI
          in [ACM] CACM 15(07) (July 1972) view details
  • Sammet, Jean E. "Roster of Programming Languages for 1973" p147 view details
          in ACM Computing Reviews 15(04) April 1974 view details
  • Stock, Marylene and Stock, Karl F. "Bibliography of Programming Languages: Books, User Manuals and Articles from PLANKALKUL to PL/I" Verlag Dokumentation, Pullach/Munchen 1973 296 view details Abstract: PREFACE  AND  INTRODUCTION
    The exact number of all the programming languages still in use, and those which are no longer used, is unknown. Zemanek calls the abundance of programming languages and their many dialects a "language Babel". When a new programming language is developed, only its name is known at first and it takes a while before publications about it appear. For some languages, the only relevant literature stays inside the individual companies; some are reported on in papers and magazines; and only a few, such as ALGOL, BASIC, COBOL, FORTRAN, and PL/1, become known to a wider public through various text- and handbooks. The situation surrounding the application of these languages in many computer centers is a similar one.

    There are differing opinions on the concept "programming languages". What is called a programming language by some may be termed a program, a processor, or a generator by others. Since there are no sharp borderlines in the field of programming languages, works were considered here which deal with machine languages, assemblers, autocoders, syntax and compilers, processors and generators, as well as with general higher programming languages.

    The bibliography contains some 2,700 titles of books, magazines and essays for around 300 programming languages. However, as shown by the "Overview of Existing Programming Languages", there are more than 300 such languages. The "Overview" lists a total of 676 programming languages, but this is certainly incomplete. One author ' has already announced the "next 700 programming languages"; it is to be hoped the many users may be spared such a great variety for reasons of compatibility. The graphic representations (illustrations 1 & 2) show the development and proportion of the most widely-used programming languages, as measured by the number of publications listed here and by the number of computer manufacturers and software firms who have implemented the language in question. The illustrations show FORTRAN to be in the lead at the present time. PL/1 is advancing rapidly, although PL/1 compilers are not yet seen very often outside of IBM.

    Some experts believe PL/1 will replace even the widely-used languages such as FORTRAN, COBOL, and ALGOL.4) If this does occur, it will surely take some time - as shown by the chronological diagram (illustration 2) .

    It would be desirable from the user's point of view to reduce this language confusion down to the most advantageous languages. Those languages still maintained should incorporate the special facets and advantages of the otherwise superfluous languages. Obviously such demands are not in the interests of computer production firms, especially when one considers that a FORTRAN program can be executed on nearly all third-generation computers.

    The titles in this bibliography are organized alphabetically according to programming language, and within a language chronologically and again alphabetically within a given year. Preceding the first programming language in the alphabet, literature is listed on several languages, as are general papers on programming languages and on the theory of formal languages (AAA).
    As far as possible, the most of titles are based on autopsy. However, the bibliographical description of sone titles will not satisfy bibliography-documentation demands, since they are based on inaccurate information in various sources. Translation titles whose original titles could not be found through bibliographical research were not included. ' In view of the fact that nany libraries do not have the quoted papers, all magazine essays should have been listed with the volume, the year, issue number and the complete number of pages (e.g. pp. 721-783), so that interlibrary loans could take place with fast reader service. Unfortunately, these data were not always found.

    It is hoped that this bibliography will help the electronic data processing expert, and those who wish to select the appropriate programming language from the many available, to find a way through the language Babel.

    We wish to offer special thanks to Mr. Klaus G. Saur and the staff of Verlag Dokumentation for their publishing work.

    Graz / Austria, May, 1973
          in ACM Computing Reviews 15(04) April 1974 view details
  • Sammet, Jean E "Roster of programming languages for 1976-77" pp56-85 view details
          in SIGPLAN Notices 13(11) Nov 1978 view details
  • Gordon, Howard "Compilers on High Performance Computers" March 12, 1999 view details Extract: IMP

    IMP



    • A C like programing language
      developed by Ned Irons at CCR.
    • IMP was extensible. Not the same a
      macros
    • Bit constructs
    • No structures
    • Integral malloc like facility
    • Ported from 6600 to 7600 to CRI
      machines
    • Non-optimizing on later machines.


          in SIGPLAN Notices 13(11) Nov 1978 view details