Swapping arguments and results of recursive functions

Akimasa Morihata, Kazuhiko Kakehi, Zhenjiang Hu, Masato Takeichi

Research output: Chapter in Book/Report/Conference proceedingConference contribution

5 Citations (Scopus)

Abstract

Many useful calculation rules, such as fusion and tupling, rely on well-structured functions, especially in terms of inputs and outputs. For instance, fusion requires that well-produced outputs should be connected to well-consumed inputs, so that unnecessary intermediate data structures can be eliminated. These calculation rules generally fail to work unless functions are well-structured. In this paper, we propose a new calculation rule called 10 swapping. IO swapping exchanges call-time computations (occurring in the arguments) and return-time computations (occurring in the results) of a function, while guaranteeing that the original and resulting function compute the same value. IO swapping enables us to rearrange inputs and outputs so that the existing calculation rules can be applied. We present new systematic derivations of efficient programs for detecting palindromes, and a method of higher-order removal that can be applied to defunctionalize function arguments, as two concrete applications.

Original languageEnglish
Title of host publicationMathematics of Program Construction - 8th International Conference, MPC 2006, Proceedings
PublisherSpringer-Verlag
Pages379-396
Number of pages18
ISBN (Print)3540356312, 9783540356318
DOIs
Publication statusPublished - 2006 Jan 1
Event8th International Conference on Mathematics of Program Construction, MPC 2006 - Kuressaare, Estonia
Duration: 2006 Jul 32006 Jul 5

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume4014 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Other

Other8th International Conference on Mathematics of Program Construction, MPC 2006
Country/TerritoryEstonia
CityKuressaare
Period06/7/306/7/5

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Computer Science(all)

Fingerprint

Dive into the research topics of 'Swapping arguments and results of recursive functions'. Together they form a unique fingerprint.

Cite this