Deforestation (computer science): Difference between revisions
Appearance
Content deleted Content added
No edit summary |
LucasBrown (talk | contribs) Adding local short description: "Program transformation to eliminate trees", overriding Wikidata description "computer science term" |
||
(27 intermediate revisions by 25 users not shown) | |||
Line 1: | Line 1: | ||
{{Short description|Program transformation to eliminate trees}} |
|||
In the theory of [[programming languages]] in [[computer science]], '''deforestation''' (also known as '''fusion''') is a [[program transformation]] to eliminate [[tree structure]]s. |
In the theory of [[programming languages]] in [[computer science]], '''deforestation''' (also known as '''fusion''') is a [[program transformation]] to eliminate intermediate lists or [[tree structure]]s that are created and then immediately consumed by a program. |
||
The term "deforestation" was originally coined by [[Philip Wadler]] in his paper "Deforestation: transforming programs to eliminate trees"<ref>{{cite journal |
The term "deforestation" was originally coined by [[Philip Wadler]] in his 1990 paper "Deforestation: transforming programs to eliminate trees".<ref>{{cite journal |
||
| url = http://homepages.inf.ed.ac.uk/wadler/papers/deforest/deforest.ps |
| url = http://homepages.inf.ed.ac.uk/wadler/papers/deforest/deforest.ps |
||
| first = Philip |
| first = Philip |
||
Line 10: | Line 11: | ||
| pages = 231–248 |
| pages = 231–248 |
||
| year = 1990 |
| year = 1990 |
||
| doi = 10.1016/0304-3975(90)90147-A |
| doi = 10.1016/0304-3975(90)90147-A |
||
| issue = 2| doi-access = free |
|||
⚫ | |||
Deforestation is typically applied to programs in [[functional programming languages]], particularly [[non-strict programming languages]] such as [[Haskell programming language|Haskell]]. One particular algorithm for deforestation, ''shortcut deforestation'',<ref>{{cite conference |
|||
| first = Andrew |
| first = Andrew |
||
| last = Gill |
| last = Gill |
||
| |
| author2=John Launchbury |author3=Simon Peyton Jones |
||
| title = A short cut to deforestation |
| title = A short cut to deforestation |
||
| url = http://research.microsoft.com/en-us/um/people/simonpj/papers/deforestation-short-cut.pdf |
|||
| |
| book-title = Proc. Conf. on Functional Programming Languages and Computer Architecture |
||
| doi = 10.1145/165180.165214 |
|||
| year = 1993 |
| year = 1993 |
||
| pages = |
| pages = 223–232}}</ref> is implemented in the [[Glasgow Haskell Compiler]].<ref>{{cite conference|last=Peyton Jones|first=Simon|year=2001|title=Playing by the rules: rewriting as a practical optimization technique in GHC|url=https://www.microsoft.com/en-us/research/wp-content/uploads/2001/09/rules.pdf|author2=Andrew Tolmach|author3=C.A.R. Hoare|book-title=Proc. ACM/SIGPLAN Haskell Workshop}}</ref> Deforestation is closely related to [[escape analysis]]. |
||
| first = Simon |
|||
| last = Peyton Jones |
|||
| coauthors = Andrew Tolmach, C.A.R. Hoare |
|||
| title = Playing by the rules: rewriting as a practical optimization technique in GHC |
|||
| booktitle = Proc. ACM/SIGPLAN Haskell Workshop |
|||
⚫ | |||
== See also == |
== See also == |
||
Line 31: | Line 30: | ||
== References == |
== References == |
||
{{reflist}} |
|||
<references/> |
|||
{{Compiler optimizations}} |
|||
⚫ | |||
[[Category: |
[[Category:Compiler optimizations]] |
||
[[Category: |
[[Category:Implementation of functional programming languages]] |
||
⚫ |
Latest revision as of 22:11, 7 June 2024
In the theory of programming languages in computer science, deforestation (also known as fusion) is a program transformation to eliminate intermediate lists or tree structures that are created and then immediately consumed by a program.
The term "deforestation" was originally coined by Philip Wadler in his 1990 paper "Deforestation: transforming programs to eliminate trees".[1]
Deforestation is typically applied to programs in functional programming languages, particularly non-strict programming languages such as Haskell. One particular algorithm for deforestation, shortcut deforestation,[2] is implemented in the Glasgow Haskell Compiler.[3] Deforestation is closely related to escape analysis.
See also[edit]
References[edit]
- ^ Wadler, Philip (1990). "Deforestation: transforming programs to eliminate trees". Theoretical Computer Science. 73 (2): 231–248. doi:10.1016/0304-3975(90)90147-A.
- ^ Gill, Andrew; John Launchbury; Simon Peyton Jones (1993). "A short cut to deforestation" (PDF). Proc. Conf. on Functional Programming Languages and Computer Architecture. pp. 223–232. doi:10.1145/165180.165214.
- ^ Peyton Jones, Simon; Andrew Tolmach; C.A.R. Hoare (2001). "Playing by the rules: rewriting as a practical optimization technique in GHC" (PDF). Proc. ACM/SIGPLAN Haskell Workshop.