Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Incremental compiler
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{original research|date=November 2016}} An '''incremental compiler''' is a kind of [[incremental computation]] applied to the field of [[compiler|compilation]]. Quite naturally, whereas ordinary compilers make a so-called '''clean build''', that is, (re)build all program modules, an incremental compiler recompiles only modified portions of a program. ==Definition== ===Imperative programming=== In [[imperative programming]] and [[software development]], incremental compilation takes only the ''changes'' of a known set of [[source file]]s 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, an 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#Computing|granularity]] of a language's traditional compiling units while maintaining the language's [[semantics]], such that the compiler can append and replace smaller parts. Many [[programming tool]]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]]s that would arise as a result of their 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 [[optimization (computer science)|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 [[software release cycle|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]] paradigm, e.g. in [[Poplog]] related literature,<ref name="poplog">http://www.cs.bham.ac.uk/research/projects/poplog/primer/node14.html {{Webarchive|url=https://web.archive.org/web/20080105215259/http://www.cs.bham.ac.uk/research/projects/poplog/primer/node14.html |date=2008-01-05 }}, teaching primer to Poplog</ref> and <ref>The Smith, Sloman and Gibson 1992 paper below (now available online)</ref> 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]] 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 collection (computer science)|garbage collected]]. 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== ;Imperative and functional languages: * The PECAN Programming Environment Generator was an incremental compiler, developed by Steven P. Reiss in the early 1980s.<ref>{{cite web|title=Steven P. Reiss Home Page|date=9 June 2011|publisher= Brown University|url=http://cs.brown.edu/~spr/|archiveurl=https://web.archive.org/web/20130210083842/http://cs.brown.edu/~spr|archivedate=10 February 2013|url-status=live|accessdate=8 August 2014}}</ref><ref>{{cite thesis|type=Honours thesis|last=Popple|first=James|author-link=James Popple|title=Incremental Compilation and its Implementation in the PECAN Programming Environment Generator|year=1987|publisher=Australian National University|url=http://cs.anu.edu.au/~James.Popple/publications/theses/hons.pdf|archiveurl=https://web.archive.org/web/20140815211645/http://cs.anu.edu.au/~James.Popple/publications/theses/hons.pdf|archivedate=15 August 2014|url-status=live|accessdate=8 March 2013}} [https://archive.org/details/IncrementalCompilationAndItsImplementationInThePecanProgramming Alt URL] Also {{Google books|ETWv2rygERIC|available}}.</ref> * [[GNU Compiler Collection]] has branched off<ref>https://gcc.gnu.org/ml/gcc/2007-07/msg00496.html , the announcement made beginning the IncrementalCompiler branch of GCC</ref> its development with the [https://gcc.gnu.org/wiki/IncrementalCompiler IncrementalCompiler] project, concentrating in providing [[C (programming language)|C]]/[[C++]] with a fast incremental compiler * The [[Eclipse (software)|Eclipse]] [[software development platform|platform]] has included an incremental compiler for [[Java (programming language)|Java]] as a part of the ''Java Development Tools'' project<ref>http://www.eclipse.org/jdt/core/index.php , a description of the JDT Core Component</ref> * The [[Gradle]] build tool has supported incremental Java compilation since version 2.1.<ref>https://docs.gradle.org/2.1/release-notes.html , release notes of Gradle version 2.1</ref> * [[IBM VisualAge]] C++ compiler 4.0 * [[Embarcadero Delphi]] * The [[.NET Compiler Platform]] ([[C Sharp (programming language)|C#]] and [[Visual Basic .NET]]) * [[Rust (programming language)|Rust]]<ref>{{Cite web|url=https://doc.rust-lang.org/edition-guide/rust-2018/the-compiler/incremental-compilation-for-faster-compiles.html|title=Announcing Rust 1.24 | Rust Blog}}</ref> * [[Go (programming language)|Go]]<ref>{{Cite web|url=https://golang.org/doc/go1.10#build|title = Go 1.10 Release Notes - the Go Programming Language}}</ref> * [[Forth (programming language)|Forth]] * [[Ceylon (programming language)|Ceylon]] * [[OCaml]] * [[GNAT]], the GNU Ada compiler * [[PTC_(software_company)|PTC]] ObjectAda ;Interactive environments and runtime systems: * [[Poplog]] (its core language [[POP-11]] and its predecessor [[POP-2]]) * Versions of [[Lisp (programming language)|Lisp]]: ** [[Steel Bank Common Lisp]] ** [[Carnegie Mellon University Common Lisp]] ** [[Scieneer Common Lisp]] ** GNU [[CLISP]] ** [[Franz Allegro Common Lisp]] * Versions of [[Scheme (programming language)|Scheme]]: ** [[Ikarus (Scheme implementation)|Ikarus]] ** [[Chez Scheme]] * Versions of [[Prolog]]: ** [[SWI-Prolog]] ** [[Yap Prolog]] ** [[XSB]] * Versions of [[ML (programming language)|ML]]: ** [[Standard ML of New Jersey]] ([[Bell Labs]]' headquarters resides in [[New Jersey]]) ** [[Poplog]] ML ==See also== * [[Dynamic compilation]] * {{section link|Hot swapping|Software}} * [[Incremental build (build system)]] ==References== <references /> ==External links== *[http://www.ddj.com/cpp/184410345?pgno=1 Dr. Dobb's Journal about making an incremental C++ compiler] *[http://www.cs.bham.ac.uk/research/projects/cogaff/10.html#1005 R. Smith, A. Sloman and J. Gibson, POPLOG's two-level virtual machine support for interactive languages, in Research Directions in Cognitive Science Volume 5: Artificial Intelligence], Eds. [[Derek H. Sleeman|D. Sleeman]] and N. Bernsen, Lawrence Erlbaum, 1992, pp 203β231 [[Category:Compilers]] [[Category:Incremental computing]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite thesis
(
edit
)
Template:Cite web
(
edit
)
Template:Google books
(
edit
)
Template:Original research
(
edit
)
Template:Section link
(
edit
)
Template:Webarchive
(
edit
)