Incremental compiler
The term incremental compiler may refer to two different types of compiler.
Definition
Imperative programming
In imperative programming and software development, 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) that may already exist from previous compilations. By effectively building upon previously compiled output files, the incremental compiler avoids the wasteful recompilation 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 compilation units while maintaining the language's semantics, such that the compiler can append and replace smaller parts.
Many software development tools 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 errors 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 he would no longer have to wait for a lengthy compile process before being informed of errors.
One downside to this type of incremental compiler is that it cannot easily optimize 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 upon release.
Interactive Programming
In the interactive programming paradigm, and particularly in Poplog related literature[1], an incremental 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 that is then immediately available for use by the runtime system. This scheme allows for a degree of self-modifying code and requires metaprogramming language features. The ability to add, remove and delete code while running is known as hot swapping. 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 compilation:
- GNU Compiler Collection has branched off[2] its development with the IncrementalCompiler project, concentrating in providing C/C++ with a fast incremental compiler.
- The Eclipse platform has a Java incremental compiler included as a part of the Java Development Tools project[3]
- The IBM VisualAge C++ compiler 4.0 is an incremental compiler for C++.
- CodeGear Delphi, previously Borland Delphi
Incremental compilers in interactive programming environments and runtime systems:
- Poplog (its core language POP-11 and its predecessor POP-2)
- some versions of LISP:
- some versions of Scheme:
- some versions of Prolog:
- versions of the ML programming language:
- Standard ML of New Jersey (Bell Labs' headquarters resides in New Jersey)
- Poplog ML
- Forth (programming language)
References
See also
External links
If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...