[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/12276.13332acmconferencesArticle/Chapter ViewAbstractPublication PagesplanConference Proceedingsconference-collections
Article
Free access

Efficient compilation of linear recursive functions into object level loops

Published: 01 July 1986 Publication History

Abstract

Whilst widely recognised as an excellent means for solving problems and for designing software, functional programming languages have suffered from their inefficient implementations on conventional computers. A route to improved runtime performance is to transform recursively defined functions into programs which execute more quickly and/or consume less space. We derive equivalent imperative programming language loops for a large class of linear recursive functions of which the tail-recursive functions form a very small subset. We first identify a small set of primitive function defining expressions for which we determine the corresponding loop-expressions. We then determine the loop-expressions for linear functions defined by any expressions which are formed from those primitives. In this way, a very general class of linear functions can be transformed automatically into loops in the parsing phase of a compiler, since the parser has in any case to determine the hierarchical structure of function definitions. Further transformation may involve specific properties of particular defining expressions, and adopt previous schemes. In addition, equivalent linear functions can be found for many non-linear ones which can therefore also be transformed into loops.

References

[1]
J W Backus; 'Can Programming be Liberated from the yon Neumann Style? A Functional Style and its Algebra of Programs', CACM 21,8, pp 613-641, (1978)
[2]
J W Backus; 'The Algebra of functional programs: Function level reasoning, linear equations and extended definitions', In Lecture Notes in Computer Science, Vol 107" Formalization of Programming Concepts, Springer-Verlag, New York, pp 1- 43, (1981)
[3]
R M Burstall, J Darlington;' A transformation system for developing recursive programs', JACM 24,1 (1977)
[4]
R S Bird;'The promotion and accumulationstrategiesin transformationalprogramming', ACM Transactionson Programming Languages and Systems, 6,4 (1984)
[5]
F L Bauer, H Wossner; Algorithmic Language and Pro&ram Development, Spingerverlag, Berlin, (1982)
[6]
E W Dijkstra;'Lecture Notes on Program Development',In Proceedings of International Summer School on Program .Construction, Marktoberdorf, West Germany, (1978)
[7]
J S Givler, R B Kieburtz;'Schema Recognition for Program Transforamtion', ACM Symposium on LISP and Functional Programming, pp 74-85, (1984)
[8]
P G Harrison; 'Optimisation of FP programs by Linearisation', Research report Doc 85/2, Department of Computing, Imperial College, (1985)
[9]
D E Knuth, P Bendix; Simple word problems in universal algebras. Computational Problems in Abstact Algebra, Pergamon Press, pp 263-297, (I 970)
[10]
R B Ki ebur tz, J Shul ti s; ' Transformations of FP Program Schemes', in Proceedings of ACM Conference o__nn Functional Languages and Computer Architecture, Portsmouth, New Hampshire (1981)
[11]
Z Manna, R Waldinger ;' The origin of the binary- search paradigm', SRI International, Technical Note 352, (April 1985)
[12]
J H Williams ;'On the Development o~ the Algebra of Functional Programs', ACM Transactions on Programming Languages and Systems, Vol 4, pp 733-757, (1982)

Cited By

View all
  • (2007)Recursive function data allocation to scratch-pad memoryProceedings of the 2007 international conference on Compilers, architecture, and synthesis for embedded systems10.1145/1289881.1289897(65-74)Online publication date: 30-Sep-2007
  • (2005)A Functional Programming environment supporting execution, partial execution and transformationPARLE '89 Parallel Architectures and Languages Europe10.1007/3540512845_46(286-305)Online publication date: 26-Jun-2005
  • (2005)InvX: An automatic function inverterRewriting Techniques and Applications10.1007/3-540-51081-8_139(564-568)Online publication date: 31-May-2005
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
SIGPLAN '86: Proceedings of the 1986 SIGPLAN symposium on Compiler construction
July 1986
275 pages
ISBN:0897911970
DOI:10.1145/12276

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 July 1986

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

SCC86
Sponsor:
SCC86: SIGPLAN Symposium on Compiler Construction
June 25 - 27, 1986
California, Palo Alto, USA

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)126
  • Downloads (Last 6 weeks)28
Reflects downloads up to 16 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2007)Recursive function data allocation to scratch-pad memoryProceedings of the 2007 international conference on Compilers, architecture, and synthesis for embedded systems10.1145/1289881.1289897(65-74)Online publication date: 30-Sep-2007
  • (2005)A Functional Programming environment supporting execution, partial execution and transformationPARLE '89 Parallel Architectures and Languages Europe10.1007/3540512845_46(286-305)Online publication date: 26-Jun-2005
  • (2005)InvX: An automatic function inverterRewriting Techniques and Applications10.1007/3-540-51081-8_139(564-568)Online publication date: 31-May-2005
  • (2003)Compiler support for efficient processing of XML datasetsProceedings of the 17th annual international conference on Supercomputing10.1145/782814.782823(42-52)Online publication date: 23-Jun-2003
  • (1994)Linear logic and permutation stacks—the Forth shall be firstACM SIGARCH Computer Architecture News10.1145/181993.18199922:1(34-43)Online publication date: 1-Mar-1994
  • (1992)Fundamentals of Deductive Program SynthesisIEEE Transactions on Software Engineering10.1109/32.15337918:8(674-704)Online publication date: 1-Aug-1992
  • (1989)Schematic rules within unfold/fold approach to program transformationFourth IEEE Region 10 International Conference TENCON10.1109/TENCON.1989.177109(1047-1052)Online publication date: 1989
  • (1988)Linearisation: an optimisation for nonlinear functional programsScience of Computer Programming10.1016/0167-6423(88)90052-410:3(281-318)Online publication date: 1-Jul-1988

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media