IMP programming language
Encyclopedia
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 extensible syntax programming language.
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.
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 ::= "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
, 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
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....
developed by Ned Irons in the late 1960s through early 1970s. Unlike most other systems programming languages, IMP was an extensible syntax programming language.
Even though its designer refers to the language as "being based on ALGOL
ALGOL
ALGOL is a family of imperative computer programming languages originally developed in the mid 1950s which greatly influenced many other languages and became the de facto way algorithms were described in textbooks and academic works for almost the next 30 years...
", 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
CDC 6600
The CDC 6600 was a mainframe computer from Control Data Corporation, first delivered in 1964. It is generally considered to be the first successful supercomputer, outperforming its fastest predecessor, IBM 7030 Stretch, by about three times...
time-sharing system, which was in use at the Institute for Defense Analyses
Institute for Defense Analyses
The Institute for Defense Analyses is a non-profit corporation that administers three federally funded research and development centers to assist the United States government in addressing important national security issues, particularly those requiring scientific and technical expertise...
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
PDP-10
The PDP-10 was a mainframe computer family manufactured by Digital Equipment Corporation from the late 1960s on; the name stands for "Programmed Data Processor model 10". The first model was delivered in 1966...
and PDP-11
PDP-11
The PDP-11 was a series of 16-bit minicomputers sold by Digital Equipment Corporation from 1970 into the 1990s, one of a succession of products in the PDP series. The PDP-11 replaced the PDP-8 in many real-time applications, although both product lines lived in parallel for more than 10 years...
computers. Important IMP versions were IMP65, IMP70, and IMP72.
IMP is unrelated to the Edinburgh IMP programming language.
Extensible syntax in IMP72
Being an extensible syntax programming language, 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 BNFBackus–Naur form
In computer science, BNF is a notation technique for context-free grammars, often used to describe the syntax of languages used in computing, such as computer programming languages, document formats, instruction sets and communication protocols.It is applied wherever exact descriptions of...
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:
For example, to add the construct described by the following BNF:
with the semantics that
INCREMENT V
should translate to V ← V + 1
, the programmer would only need to insert the following IMP statement:The semantic-part can also contain calls to semantic routines, as in the following syntax statement:
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 opcodeOpcode
In computer science engineering, an opcode is the portion of a machine language instruction that specifies the operation to be performed. Their specification and format are laid out in the instruction set architecture of the processor in question...
, 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
.External links
- PDP-10 IMP72 Reference Manual
- IMP72 Sources
(dcus:[43,50306]*.*)