Incremental compiler
Encyclopedia
The term incremental compiler may refer to two different types of compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

.

Imperative programming

In imperative programming
Imperative programming
In computer science, imperative programming is a programming paradigm that describes computation in terms of statements that change a program state...

 and software development
Software development
Software development is the development of a software product...

, an incremental compiler is one that when invoked, takes only the changes of a known set of source files and updates any corresponding output files (in the compiler's target language, often bytecode
Bytecode
Bytecode, also known as p-code , is a term which has been used to denote various forms of instruction sets designed for efficient execution by a software interpreter as well as being suitable for further compilation into machine code...

) that may already exist from previous compilations.
By effectively building upon previously compiled output files, the incremental compiler avoids the wasteful recompiling of entire source files, where most of the code remains unchanged. For most incremental compilers, compiling a program with small changes to its source code is usually near instantaneous.
It can be said that an incremental compiler reduces the granularity of a language's traditional compiling units while maintaining the language's semantics
Semantics
Semantics is the study of meaning. It focuses on the relation between signifiers, such as words, phrases, signs and symbols, and what they stand for, their denotata....

, such that the compiler can append and replace smaller parts.

Many programming tool
Programming tool
A programming tool or software development tool is a program or application that software developers use to create, debug, maintain, or otherwise support other programs and applications...

s take advantage of incremental compilers to provide developers with a much more interactive programming environment. It is not unusual that an incremental compiler is invoked for every change of a source file, such that the developer is almost immediately informed about any compilation error
Compilation error
Compilation error refers to a state when a compiler fails to compile a piece of computer program source code, either due to errors from the compiler itself, or syntax errors in the code...

s that would arise as a result of his changes to the code. This scheme, in contrast with traditional compilation, shortens a programmer's development cycle significantly, because they would no longer have to wait for a long compile process before being informed of errors.

One downside to this type of incremental compiler is that it cannot easily optimize
Optimization (computer science)
In computer science, program optimization or software optimization is the process of modifying a software system to make some aspect of it work more efficiently or use fewer resources...

 the code that it compiles, due to locality and the limited scope of what is changed. This is usually not a problem, because for optimization is usually only carried out on release, an incremental compiler would be used throughout development, and a standard batch compiler would be used on release.

Interactive programming

In the interactive programming
Interactive programming
Interactive programming is the procedure of writing parts of a program while it is already active. This focuses on the program text as the main interface for a running process, rather than an interactive application, where the program is designed in development cycles and used thereafter...

 paradigm, e.g. in Poplog
Poplog
Poplog is a powerful multi-language, multiparadigm, reflective, incrementally compiled software development environment, originally created in the UK for teaching and research in Artificial Intelligence at the University of Sussex.-History:...

 related literature, and an interactive compiler refers to a compiler that is actually a part of the runtime system of the source language. The compiler can be invoked at runtime on some source code or data structure managed by the program, which then produces a new compiled program fragment containing machine code
Machine code
Machine code or machine language is a system of impartible instructions executed directly by a computer's central processing unit. Each instruction performs a very specific task, typically either an operation on a unit of data Machine code or machine language is a system of impartible instructions...

 that is then immediately available for use by the runtime system. If the newly compiled fragment replaces a previous compiled procedure the old one will be garbage collected
Garbage collection (computer science)
In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program...

. This scheme allows for a degree of self-modifying code
Self-modifying code
In computer science, self-modifying code is code that alters its own instructions while it is executing - usually to reduce the instruction path length and improve performance or simply to reduce otherwise repetitively similar code, thus simplifying maintenance...

 and requires metaprogramming
Metaprogramming
Metaprogramming is the writing of computer programs that write or manipulate other programs as their data, or that do part of the work at compile time that would otherwise be done at runtime...

 language features. The ability to add, remove and delete code while running is known as hot swapping
Hot swapping
Hot swapping and hot plugging are terms used to describe the functions of replacing computer system components without shutting down the system...

. Some interactive programming platforms mix the use of interpreted and compiled code to achieve the illusion that any changes to code are accessible by the program immediately.

List of incremental compilers

Incremental compilers for imperative language compiling:
  • 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...

     has branched off its development with the IncrementalCompiler project, concentrating in providing C
    C (programming language)
    C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

    /C++
    C++
    C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

     with a fast incremental compiler
  • The Eclipse
    Eclipse (software)
    Eclipse is a multi-language software development environment comprising an integrated development environment and an extensible plug-in system...

     platform has a Java
    Java (programming language)
    Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

     incremental compiler included as a part of the Java Development Tools project
  • The IBM VisualAge C++ compiler 4.0 is an incremental compiler for C++
  • Embarcadero Delphi, previously Borland Delphi


Incremental compilers in interactive programming environments and runtime systems:
  • Poplog
    Poplog
    Poplog is a powerful multi-language, multiparadigm, reflective, incrementally compiled software development environment, originally created in the UK for teaching and research in Artificial Intelligence at the University of Sussex.-History:...

     (its core language POP-11
    POP-11
    POP-11 is a reflective, incrementally compiled programming language with many of the features of an interpreted language. It is the core language of the Poplog programming environment developed originally by the University of Sussex, and recently in the at the...

     and its predecessor POP-2
    POP-2
    POP-2, often referred to as POP2 was a programming language developed around 1970 from the earlier language POP-1 by Robin Popplestone and Rod Burstall at the University of Edinburgh. It drew roots from many sources: the languages LISP and ALGOL 60, and theoretical ideas from Landin...

    )
  • Some versions of Lisp:
    • Steel Bank Common Lisp
      Steel Bank Common Lisp
      Steel Bank Common Lisp is a free Common Lisp implementation that features ahigh performance native compiler, Unicode support and threading....

    • Carnegie Mellon University Common Lisp
    • Scieneer Common Lisp
      Scieneer Common Lisp
      Scieneer Common Lisp is a commercial implementation of the Common Lisp programming language featuring support for Symmetric multiprocessing on a range of Linux, Solaris and HP-UX platforms. The compiler generates fast 64-bit and 32-bit native code.-License:...

    • GNU CLISP
      CLISP
      In computing, CLISP is an implementation of the programming language Common Lisp originally developed by Bruno Haible and Michael Stoll for the Atari ST...

    • Franz Allegro Common Lisp
  • Some versions of Scheme:
    • Ikarus
      Ikarus (Scheme implementation)
      Ikarus Scheme is a free software optimizing incremental compiler for R6RS Scheme that compiles directly to the x86 architecture. Ikarus is the first public implementation of a large part of R6RS, the most recent Scheme standard.- Design :...

  • Most versions of Prolog
    Prolog
    Prolog is a general purpose logic programming language associated with artificial intelligence and computational linguistics.Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is declarative: the program logic is expressed in terms of...

    :
    • SWI-Prolog
      SWI-Prolog
      SWI-Prolog is an open source implementation of the programming language Prolog, commonly used for teaching and semantic web applications.It has a rich set of features, libraries forconstraint logic programming,multithreading,unit testing,GUI,...

      , Yap Prolog
      YAP Prolog
      YAP is an open source, high-performance implementation of the Prolog programming language developed at LIACC/Universidade do Porto and at COPPE Sistemas/UFRJ. Its Prolog engine is based in the WAM , with several optimizations for better performance...

      , XSB
      XSB
      XSB is the name of a dialect of the Prolog programming language and its implementation developed at Stony Brook University in collaboration with the Katholieke Universiteit Leuven, the New University of Lisbon, Uppsala University and software vendor XSB, Inc....

      , Ciao
      Ciao (programming language)
      Ciao is a general-purpose programming language which supports logic, constraint, functional, higher-order, and object-oriented programming styles. Its main design objectives are high expressive power, extensibility, safety, reliability, and efficient execution....

  • Versions of ML:
    • Standard ML of New Jersey
      Standard ML of New Jersey
      Standard ML of New Jersey is a compiler and programming environment for Standard ML. Aside from its runtime system, which is written in C, SML/NJ is written in Standard ML...

       (Bell Labs
      Bell Labs
      Bell Laboratories is the research and development subsidiary of the French-owned Alcatel-Lucent and previously of the American Telephone & Telegraph Company , half-owned through its Western Electric manufacturing subsidiary.Bell Laboratories operates its...

      ' headquarters resides in New Jersey
      New Jersey
      New Jersey is a state in the Northeastern and Middle Atlantic regions of the United States. , its population was 8,791,894. It is bordered on the north and east by the state of New York, on the southeast and south by the Atlantic Ocean, on the west by Pennsylvania and on the southwest by Delaware...

      )
    • Poplog
      Poplog
      Poplog is a powerful multi-language, multiparadigm, reflective, incrementally compiled software development environment, originally created in the UK for teaching and research in Artificial Intelligence at the University of Sussex.-History:...

       ML
  • Forth
    • Kerridge KCML

See also

  • Compiler
    Compiler
    A compiler is a computer program that transforms source code written in a programming language into another computer language...

  • Interpreter (computing)
    Interpreter (computing)
    In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language...

  • Dynamic compilation
    Dynamic compilation
    Dynamic compilation is a process used by some programming language implementations to gain performance during program execution. Although the technique originated in the Self programming language, the best-known language that uses this technique is Java...

  • Hot swapping#Software

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK