IMP programming language

IMP programming language

IMP was a systems programming language developed by Ned Irons in the late 1960s through early 1970s. Unlike most other systems programming languages, IMP was an .

Even though its designer refers to the language as "being based on ALGOL", IMP excludes many "defining" features of that language, while supporting a very non-ALGOL-like one: syntax extensibility.

A compiler for IMP existed as early as 1965 and was used for programming the CDC 6600 time-sharing system, which was in use at the Institute for Defense Analyses since 1967. Although the compiler is slower than comparable ones for non-extensible languages, it has been used for practical production work.

IMP compilers were developed for the CDC-6600, PDP-10 and PDP-11 computers. Important IMP versions were IMP65, IMP70, and IMP72.

IMP is unrelated to the Edinburgh IMP programming language.

Extensible syntax in IMP72

Being an , IMP allows the programmer to extend its syntax, although no specific means are provided to add new datatypes or structures to it. To achieve its syntax-extensibility, IMP uses a powerful parse algorithm based on a syntax graph and several connectivity matrices. The programmer may add new BNF productions to the graph.

IMP72's syntax is extended by means of extended-BNF "syntax statements" included in a source program. The mechanism is so powerful, that it allowed the implementation of the language by itself, i.e., by an IMP72 source file consisting entirely of syntax statements, which was input to a trivial compiler which was initially able to translate the simplest case of the syntax statement. There is also a simple form of the syntax statement which looks like a macro to the casual user.

Basically, the syntax statement is an augmented BNF production with associated semantics added on the right:

::= syntax-part ::= semantic-part

For example, to add the construct described by the following BNF:

::= INCREMENT

with the semantics that INCREMENT V should translate to V ← V + 1, the programmer would only need to insert the following "IMP statement":

::= INCREMENT ::= "A←A+1"

The semantic-part can also contain calls to "semantic routines", as in the following syntax statement: ::= ABS ( ) ::= DEWOP(214B,AREG1(1,13),A)The semantic part of this statement consists of a call on the semantic routine DEWOP. The arguments are the octal constant 214B, the semantic routine call AREG1(1,13), and A, which is the object on top of the stack at the moment this production is invoked. DEWOP is a semantic routine which respectively takes as its arguments a PDP-10 machine language opcode, a register object, and any other object, and produces an object whose value is the result of executing the designated machine instruction using as address field the object which is its last argument. In this specific example, the opcode 214B designates the Load Magnitude instruction, and thus the result of the above syntax statement will be to compile code to compute the absolute value of A.

ee also

* Edinburgh IMP programming language (contrast)

References

* "Experience with an Extensible Language", Irons E.T., CACM, Vol. 13, No. 1, January 1970.
* "Syntax Extension and the IMP72 Programming Language", Walter Bilofsky, Yale University, SIGPLAN Notices, May 1974.


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • IMP — NOTOC IMP or imp may mean: * Imp, a fantasy creature. * Imp (Dungeons Dragons), a type of fictional lower level devil in the Dungeons Dragons role playing game. * Imparja Television (callsign IMP), an Australian television broadcaster * Hillman… …   Wikipedia

  • Edinburgh IMP — is a development of ATLAS Autocode, initially developed around 1966 1969 at Edinburgh University, Scotland. IMP was a general purpose programming language which was used heavily for systems programming.Expressively, IMP is extremely similar to… …   Wikipedia

  • List of programming languages — Programming language lists Alphabetical Categorical Chronological Generational The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and historical ones, in… …   Wikipedia

  • Atlas Autocode — (AA) was a programming language developed around 1965 at Manchester University for the Atlas Computer. It was developed by Tony Brooker and Derrick Morris as an improvement on the ALGOL programming languages, removing some of Algol s poorer… …   Wikipedia

  • Edinburgh Multiple Access System — The Edinburgh Multi Access System (EMAS) was a mainframe computer operating system developed at the University of Edinburgh, Scotland, during the 1970s. EMAS was developed because none of the manufacturers operating systems (nor independent… …   Wikipedia

  • Core War — A game of Core War running under the pMARS simulator Original author(s) D. G. Jones A. K. Dewdney Initial release 1984 Type Pro …   Wikipedia

  • Objective-C — Paradigm(s) reflective, object oriented Appeared in 1983 Designed by Tom Love Brad Cox Developer Apple Inc. Typing discipline …   Wikipedia

  • Список языков программирования — Списки языков программирования Алфавитный По категориям Хронологический Генеалогический Цель этого алфавитного списка языков программирования состоит в том, чтобы дать полный перечень всех существующих языков программирования, как используемых в… …   Википедия

  • Name mangling — This article is about name mangling in computer languages. For name mangling in file systems, see filename mangling. In compiler construction, name mangling (also called name decoration) is a technique used to solve various problems caused by the …   Wikipedia

  • ALGOL — This article is about the programming language family. For other uses, see Algol (disambiguation). ALGOL Paradigm(s) procedural, imperative, structured Appeared in 1958 Designed by Bauer, Bottenbruch, Rutishauser, Samelson, Backus, Katz, Perlis …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”