Hostname: page-component-6766d58669-nqrmd Total loading time: 0 Render date: 2026-05-15T17:03:29.242Z Has data issue: false hasContentIssue false

Manipulating accumulative functions by swapping call-time and return-time computations*

Published online by Cambridge University Press:  08 May 2012

AKIMASA MORIHATA
Affiliation:
Tohoku University, Sendai, Japan (e-mail: morihata@riec.tohoku.ac.jp)
KAZUHIKO KAKEHI
Affiliation:
University of Tokyo, Tokyo, Japan
ZHENJIANG HU
Affiliation:
National Institute of Informatics, Chiyoda, Tokyo, Japan
MASATO TAKEICHI
Affiliation:
National Institution for Academic Degrees and University Evaluation, Kodaira-shi, Tokyo, Japan
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

Functional languages are suitable for transformational developments of programs. However, accumulative functions, or in particular tail-recursive functions, are known to be less suitable for manipulation. In this paper, we propose a program transformation named “IO swapping” that swaps call-time and return-time computations. It moves computations in accumulative parameters to results and thereby enables interesting transformations. We demonstrate effectiveness of IO swapping by several applications: deforestation, higher order removal, program inversion, and manipulation of circular programs.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 2012
Submit a response

Discussions

No Discussions have been published for this article.