Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Extensible syntax in IMP72  





2 Folklore operating system  





3 See also  





4 References  





5 External links  














IMP (programming language)






فارسی
 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


IMP
ParadigmsMulti-paradigm: procedural, imperative, structured, extensible
FamilyALGOL
Designed byEdgar T. Irons
DeveloperNational Security Agency
First appeared1965; 59 years ago (1965)
Stable release

IMP72 / 1972; 52 years ago (1972)

Typing disciplineStatic, strong
ScopeLexical
Implementation languageALGOL 60
PlatformCDC 6600, Cray, PDP-10, PDP-11
OSCOS, SCOPE, TOPS-10, Unix, others
LicenseProprietary
Major implementations
IMP65, IMP70, IMP72
Influenced by
ALGOL 60

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"[citation needed], IMP excludes many defining features of that language, while supporting a very non-ALGOL-like one: syntax extensibility.

Acompiler 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[edit]

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:

 <class> ::= syntax-part ::= semantic-part

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

 <EXP> ::= INCREMENT <VBL>

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

 <EXP> ::= INCREMENT <VBL,A> ::= "A←A+1"

The semantic-part can also contain calls to semantic routines, as in the following syntax statement:

 <ATOM> ::= ABS ( <ATOM,A> ) ::= 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 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[edit]

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

See also[edit]

References[edit]

  1. ^ Cotter, George. "High-Performance Computing at the National Security Agency". Frontiers of Supercomputing II. University of California Press. Retrieved 25 May 2012.

External links[edit]


Retrieved from "https://en.wikipedia.org/w/index.php?title=IMP_(programming_language)&oldid=1136170923"

Categories: 
Extensible syntax programming languages
Systems programming languages
National Security Agency
Hidden categories: 
All articles with unsourced statements
Articles with unsourced statements from June 2020
 



This page was last edited on 29 January 2023, at 02:21 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki