ArticleslgStudy

science

IMP (programming language)

IMP (programming language) is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand IMP (programming language) rather than just read about it. In short: IMP is an early systems programming language that was developed by Edgar T. Irons in the late 1960s through early 1970s, at the National Security Agency (NSA).

Key takeaways

  • IMP (programming language) belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect IMP (programming language) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of IMP (programming language) from memory before moving on to harder problems.

Reference excerpt

IMP is an early systems programming language that was developed by Edgar T. Irons in the late 1960s through early 1970s, at the National Security Agency (NSA). Unlike most other systems languages, IMP supports syntax-extensible programming. 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 to program 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, Cray, PDP-10 and PDP-11 computers. Important IMP versions were IMP65, IMP70, and IMP72.

Extensible syntax in IMP72 Being an extensible syntax programming language, IMP allows a programmer to extend its syntax, although no specific means are provided to add new data types 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 Backus–Naur form (BNF) productions to the graph. IMP72's syntax is extended by means of extended-BNF syntax statements included in a source code 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 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 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.

Folklore operating system IMP was the language used on NSA's homegrown time-sharing operating system named Folklore.

See also Edinburgh IMP language (contrast)

References

Irons, Edgar T. (January 1970). "Experience with an Extensible Language". Communications of the ACM. 13 (1). Association for Computing Machinery: 31–40. doi:10.1145/361953.361966. S2CID 17635545. Bilofsky, Walter (May 1974). "Syntax Extension and the IMP72 Programming Language". SIGPLAN Notices. 9 (5). Association for Computing Machinery: 13–30. doi:10.1145/987413.987416. S2CID 2170981 – via Yale University.

External links PDP-10 IMP72 Reference Manual IMP72 Sources (dcus:[43,50306]*.*)

Worked examples

Example 1 — a first encounter with IMP (programming language)

Start with the simplest possible case. Write down what IMP (programming language) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to IMP (programming language) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about IMP (programming language) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of IMP (programming language)

In research
IMP (programming language) appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses IMP (programming language) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
IMP (programming language) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Extensible syntax programming languages, National Security Agency, Systems programming languages, so understanding it makes those chapters shorter.
In everyday life
Look for IMP (programming language) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study IMP (programming language) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what IMP (programming language) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain IMP (programming language) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is IMP (programming language) in simple terms?

IMP is an early systems programming language that was developed by Edgar T. Irons in the late 1960s through early 1970s, at the National Security Agency (NSA).

Why does IMP (programming language) matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study IMP (programming language)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on IMP (programming language).

Tags

  • Extensible syntax programming languages
  • National Security Agency
  • Systems programming languages

Keep exploring