IMP (programming language): Difference between revisions

Content deleted Content added
Typo: Institute for Defense Analysis -> Analyses
OAbot (talk | contribs)
m Open access bot: doi added to citation with #oabot.
 
(28 intermediate revisions by 23 users not shown)
Line 1:
{{about|Irons' IMP|the contemporary and unrelated programming language|Edinburgh IMP}}
'''IMP''' was a [[systems (programming)|systems]] [[programming language]] developed by [[Ned Irons]] in the late 1960s through early 1970s. Unlike most other systems programming languages, IMP was an [[:Category:Extensible syntax programming languages|extensible syntax programming language]].
{{Infobox programming language
| name = IMP
| logo = <!-- Filename only -->
| logo caption =
| screenshot = <!-- Filename only -->
| screenshot caption =
| paradigms = [[Multi-paradigm programming language|Multi-paradigm]]: [[Procedural programming|procedural]], [[Imperative programming|imperative]], [[Structured programming|structured]], [[Extensible programming|extensible]]
| family = [[ALGOL]]
| designer = Edgar T. Irons
| developer = [[National Security Agency]]
| released = {{Start date and age|1965}}<!-- If known, add |mm|dd|df=yes -->
| latest release version = IMP72
| latest release date = {{Start date and age|1972}}<!-- If known, add |mm|dd|df=yes -->
| typing = [[Static type|Static]], [[Strong and weak typing|strong]]
| scope = [[Scope (computer science)|Lexical]]
| programming language = [[ALGOL 60]]
| platform = [[CDC 6600]], [[Cray]], [[PDP-10]], [[PDP-11]]
| operating system = [[Chippewa Operating System|COS]], [[CDC SCOPE|SCOPE]], [[TOPS-10]], [[Unix]], others
| license = [[Proprietary software|Proprietary]]
| file ext =
| file format = <!-- or: | file formats = -->
| website = <!-- {{URL|www.example.com}} -->
| implementations = IMP65, IMP70, IMP72
| dialects =
| influenced by = [[ALGOL 60]]
| influenced =
}}
'''IMP''' wasis aan early [[systems (programming)|systems]] [[programming language]] that was developed by [[NedEdgar T. Irons]] in the late 1960s through early 1970s, at the [[National Security Agency]] (NSA). Unlike most other systems programming languages, IMP was ansupports [[:Category:Extensible syntaxSyntax (programming languages)|syntax]]-[[extensible syntax programming language]].
 
Even though {{citation needed span|date=June 2020|reason=While presumably true, the actual quote deserves a specific cite amongst a plethora of similar statements|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 forto programmingprogram 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'''.
 
IMP is unrelated to the [[Edinburgh IMP programming language]].
 
==Extensible syntax in IMP72==
Being an [[:Category:Extensible syntax programming languages|extensible syntax programming language]], IMP it allows thea programmer to extend its syntax, although no specific means are provided to add new datatypes[[data type]]s 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]] (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 [[macroMacro (programmingcomputer science)|macro]] to the casual user.
 
Basically, the syntax statement is an augmented BNF production with associated semantics added on the right:
 
Basically, the syntax statement is an augmented BNF production with associated [[Semantics (computer science)|semantics]] added on the right:
<syntaxhighlight lang="abnf">
<class> ::= syntax-part ::= semantic-part
</syntaxhighlight>
 
For example, to add the construct described by the following BNF:
<syntaxhighlight lang="abnf">
 
<EXP> ::= INCREMENT <VBL>
</syntaxhighlight>
 
with the semantics that <code>INCREMENT V</code> should translate to <code>V &larr; V + 1</code>, the programmer would only need to insert the following ''IMP statement'':
<syntaxhighlight lang="abnf">
 
<EXP> ::= INCREMENT <VBL,A> ::= "A&larr;AA←A+1"
</syntaxhighlight>
 
The semantic-part can also contain calls to ''semantic routines'', as in the following syntax statement:
<syntaxhighlight lang="abnf">
<ATOM> ::= ABS ( <ATOM,A> ) ::= DEWOP(214B,AREG1(1,13),A)
</syntaxhighlight>
The semantic part of this statement consists of a call on the semantic routine <code>DEWOP</code>. The arguments are the octal constant <code>214B</code>, the semantic routine call <code>AREG1(1,13)</code>, and <code>A</code>, which is the object on top of the stack at the moment this production is invoked. <code>DEWOP</code> 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 <code>214B</code> designates the <code>Load Magnitude</code> instruction, and thus the result of the above syntax statement will be to compile code to compute the absolute value of <code>A</code>.
 
==Folklore operating system==
IMP was the language used on NSA's homegrown [[time-sharing]] [[operating system]] named ''Folklore''.<ref>{{cite web |last=Cotter |first=George |title=High-Performance Computing at the National Security Agency |url=http://publishing.cdlib.org/ucpressebooks/view?docId=ft0f59n73z&chunk.id=d0e12339&toc.depth=1&toc.id=d0e12308&brand=ucpress |work=Frontiers of Supercomputing II |publisher=University of California Press |access-date=25 May 2012}}</ref>
 
==See also==
* [[Edinburgh IMP programming]] language]] (contrast)
 
==References==
{{Reflist}}
* ''Experience with an Extensible Language'', Irons E.T., '''CACM''', Vol. 13, No. 1, January 1970.
*{{Cite journal |last=Irons |first=Edgar T. |date=January 1970 |title=Experience with an Extensible Language |journal=[[Communications of the ACM]] |volume=13 |issue=1 |pages=31–40 |publisher=[[Association for Computing Machinery]]|doi=10.1145/361953.361966 |s2cid=17635545 |doi-access=free }}
* ''Syntax Extension and the IMP72 Programming Language'', Walter Bilofsky, Yale University, '''SIGPLAN Notices''', May 1974.
*{{Cite journal |last=Bilofsky |first=Walter |date=May 1974 |title=Syntax Extension and the IMP72 Programming Language |journal=SIGPLAN Notices |volume=9 |issue=5 |pages=13–30 |publisher=[[Association for Computing Machinery]] |doi=10.1145/987413.987416 |s2cid=2170981 |via=Yale University}}
 
==External links==
* [https://www.saildart.org/IMP.BO%5B11,DOC%5D1 PDP-10 IMP72 Reference Manual]
* [http://pdp-10.trailing-edge.com/decuslib10-03/ IMP72 Sources] <nowiki>(dcus:[43,50306]*.*)</nowiki>
 
{{ALGOL programming}}
 
{{DEFAULTSORT:Imp Programming Language}}
[[Category:Historical programming languages]]
[[Category:Extensible syntax programming languages]]
[[Category:Systems programming languages]]
[[Category:National Security Agency]]