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

Akimasa Morihata, Kazuhiko Kakehi, Zhenjiang Hu, Masato Takeichi

Research output: Contribution to journalArticlepeer-review

1 Citation (Scopus)

Abstract

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.

Original languageEnglish
Pages (from-to)275-299
Number of pages25
JournalJournal of Functional Programming
Volume22
Issue number3
DOIs
Publication statusPublished - 2012 May

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'Manipulating accumulative functions by swapping call-time and return-time computations'. Together they form a unique fingerprint.

Cite this