All Topics  
Intermediate language

 

   Email Print
   Bookmark   Link






 

Intermediate language



 
 
In computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
, an intermediate language is the language of an abstract machine
Abstract machine

An abstract machine, also called an abstract computer, is a theoretical model of a computer hardware or software system used in Automata theory....
 designed to aid in the analysis of computer program
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
s. The term comes from their use in compiler
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
s, where a compiler first translates the source code of a program into a form more suitable for code-improving transformations, as an intermediate step before generating object
Object file

In computer science, object code, or an object file, is the representation of code that a compiler or assembler generates by processing a source code file....
 or machine code for a target machine. The design of an intermediate language typically differs from that of a practical machine language in three fundamental ways:



A popular format for intermediate languages is three address code
Three address code

In computer science, three-address code is a form of representing intermediate language used by compilers to aid in the implementation of code-improving transformations....
.

A variation in the meaning of this term, is those languages used as an intermediate language by some high-level
High-level programming language

In computing, a high-level programming language is a programming language with strong Abstraction from the details of the computer. In comparison to low-level programming languages, it may use natural language elements, be easier to use, or more Porting across platforms....
 programming
Computer programming

Computer programming is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language....
 language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
s which do not output object or machine code, but output the intermediate language only, to submit to a compiler for such language, which then outputs finished object or machine code.






Discussion
Ask a question about 'Intermediate language'
Start a new discussion about 'Intermediate language'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
, an intermediate language is the language of an abstract machine
Abstract machine

An abstract machine, also called an abstract computer, is a theoretical model of a computer hardware or software system used in Automata theory....
 designed to aid in the analysis of computer program
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
s. The term comes from their use in compiler
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
s, where a compiler first translates the source code of a program into a form more suitable for code-improving transformations, as an intermediate step before generating object
Object file

In computer science, object code, or an object file, is the representation of code that a compiler or assembler generates by processing a source code file....
 or machine code for a target machine. The design of an intermediate language typically differs from that of a practical machine language in three fundamental ways:

  • Each instruction represents exactly one fundamental operation; e.g. "shift-add" addressing modes common in microprocessors are not present.
  • Control flow
    Control flow

    In computer science control flow refers to the order in which the individual statement , Instruction or function calls of an imperative programming or functional programming computer program are execution or evaluated....
     information may not be included in the instruction set.
  • The number of registers available may be large, even limitless.


A popular format for intermediate languages is three address code
Three address code

In computer science, three-address code is a form of representing intermediate language used by compilers to aid in the implementation of code-improving transformations....
.

A variation in the meaning of this term, is those languages used as an intermediate language by some high-level
High-level programming language

In computing, a high-level programming language is a programming language with strong Abstraction from the details of the computer. In comparison to low-level programming languages, it may use natural language elements, be easier to use, or more Porting across platforms....
 programming
Computer programming

Computer programming is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language....
 language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
s which do not output object or machine code, but output the intermediate language only, to submit to a compiler for such language, which then outputs finished object or machine code. This is usually done to gain optimization
Optimization (computer science)

In computing, optimization is the process of modifying a system to make some aspect of it work more efficiently or use fewer resources. For instance, a computer program may be optimized so that it executes more rapidly, or is capable of operating with less Computer data storage or other resources, or draw less power....
 much as treated above, or portability
Porting

In computer science, porting is the process of adapting software so that an executable Computer program can be created for a computing environment that is different from the one for which it was originally designed ....
 by using an intermediate language that has compilers for many processors
Central processing unit

A central processing unit is an electronic circuit that can execute computer programs. This broad definition can easily be applied to many early computers that existed long before the term "CPU" ever came into widespread usage....
 and operating systems, such as C
C (programming language)

C is a general-purpose computer programming language originally developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories to implement the Unix operating system....
. Languages used for this fall in complexity between high-level languages and low-level
Low-level programming language

In computer science, a low-level programming language is a programming language that provides little or no abstraction from a computer's instruction set architecture....
 languages, such as assembly language
Assembly language

An assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture....
s.

Languages

Some intermediate programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
s:

C
C (programming language)

C is a general-purpose computer programming language originally developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories to implement the Unix operating system....
 is used as an intermediate language by many programming languages including Eiffel
Eiffel (programming language)

Eiffel is an International Organization for Standardization-standardized, object-oriented programming language designed to enable programmers to efficiently develop extensible, reusable, reliable software....
, Sather
Sather

Sather is an object-oriented programming language. It originated circa 1990 at the International Computer Science Institute at the University of California, Berkeley, developed by an international team led by Steve Omohundro....
, Esterel
Esterel

Esterel is a synchronous programming language programming language for the development of complex reactive systems. The imperative programming style of Esterel allows the simple expression of parallel computing and preemption ....
; some dialect
Programming language dialect

A dialect of a programming language is a variation or extension of the language that does not change its intrinsic nature. With languages such as Scheme and Forth , standards may be considered insufficient, inadequate or even illegitimate by implementors, so often they will deviate from the standard, making a new dialect....
s of Lisp (Lush, Gambit
Gambit (Scheme implementation)

Gambit, also called Gambit-C, is a free software Scheme implementation, consisting of a Scheme Interpreter , and a compiler which compiles Scheme to C ....
), Haskell
Haskell (programming language)

Haskell is a standardized, purely functional programming language with non-strict programming language, named after logician Haskell Curry. The goals of the language are described as:...
 (Glasgow Haskell Compiler
Glasgow Haskell Compiler

The Glorious Glasgow Haskell Compilation System, more commonly known as the Glasgow Haskell Compiler or GHC, is an open source Machine language compiler for the functional programming Computer programming Programming language Haskell ....
); Squeak
Squeak

The Squeak programming language is a Smalltalk implementation, derived directly from Smalltalk-80 by a group at Apple Computer that included some of the original Smalltalk-80 developers....
's C-subset Slang, and others. Variants of C have been designed to provide C's features as a portable assembly language
Assembly language

An assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture....
, including one of the two languages called C--
C--

C-- is a C -like programming language. Its creators, functional programming researchers Simon Peyton Jones and Norman Ramsey , designed it to be generated mainly by compilers for very high-level languages rather than written by human programmers....
, the and the Low Level Virtual Machine.

In effect, Sun Microsystem's Java bytecode
Java bytecode

Java bytecode is the form of instructions that the Java virtual machine executes. Each bytecode instruction or opcode is one byte in length; however, not all of the possible 256 instructions are used....
 is the intermediate language used by all compilers targeting the Java Virtual Machine
Java Virtual Machine

A Java Virtual Machine is a set of computer software programs and data structures which use a virtual machine model for the execution of other computer programs and Scripting language....
. The JVM can then do just-in-time compilation
Just-in-time compilation

In computing, just-in-time compilation , also known as dynamic translation, is a technique for improving the runtime performance of a computer program....
 to get executable machine code to improve performances. Similarly, Microsoft's Common Intermediate Language
Common Intermediate Language

Common Intermediate Language is the lowest-level human-readable programming language in the Common Language Infrastructure and in the .NET Framework....
 is an intermediate language designed to be shared by all compilers for the .NET Framework
.NET Framework

The Microsoft .NET Framework is a software framework that is available with several Microsoft Windows operating systems. It includes a large Library of coded solutions to prevent common programming problems and a virtual machine that manages the execution of programs written specifically for the Software framework....
, before static or dynamic compilation to machine code.

The GNU Compiler Collection
GNU Compiler Collection

The GNU Compiler Collection is a compiler system produced by the GNU Project supporting various programming languages. GCC is a key component of the GNU toolchain....
 (GCC) uses internally several intermediate languages to simplify portability and cross-compilation. Among these languages are

  • the historical Register Transfer Language
    Register Transfer Language

    In computer science, register transfer language is a term used to describe a kind of intermediate representation that is very close to assembly language, such as that which is used in a compiler....
     (RTL)
  • the tree language GENERIC
    Generic

    Generic is something that is general, comon, or inclusive rather than specific, unique, or selective.* Generic mood, a grammatical mood used to make generalized statements like Snow is white...
  • the SSA
    Static single assignment form

    In compiler design, static single assignment form is an intermediate representation in which every variable is assigned exactly once. Existing variables in the original IR are split into versions, new variables typically indicated by the original name with a subscript, so that every definition gets its own version....
    -based GIMPLE
    GIMPLE

    In the GNU Compiler Collection, GIMPLE is an intermediate representation of the Computer program in which complex Expression s are split into a three address code using temporary variables....
    .


See also


  • Intermediate representation
    Intermediate representation

    In computing, an intermediate representation is a data structure that is constructed from input data to a computer program, and from which part or all of the output data of the program is constructed in turn....
  • abstract syntax tree
    Abstract syntax tree

    In computer science, an abstract syntax tree , or just syntax tree, is a directed tree representation of the abstract syntactic structure of source code written in a certain programming language....