Shortcut fusion rules for the derivation of circular and higher-order monadic programs

Alberto Pardo, João Paulo Fernandes, João Saraiva

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

Abstract

Functional programs often combine separate parts using intermediate data structures for communicating results. These programs are modular, easier to understand and maintain, but suffer from inefficiencies due to the generation of those gluing data structures. To eliminate such redundant data structures, some program transformation techniques have been proposed. One such technique is shortcut fusion, and has been studied in the context of both pure and monadic functional programs. Recently, we have extended standard shortcut fusion: in addition to intermediate structures, the program parts may now communicate context information, and it still is possible to eliminate those structures. This is achieved by transforming the original function composition into a circular program. This new technique, however, has been studied in the context of purely functional programs only. In this paper, we propose an extension to this new form of fusion,but in the context of monadic programming: we derive monadic circular p ograms from strict ones, maintaining the global effects. Later, the circularities in the derived programs are traded by highorder definitions, using a well-known program transformation technique. We finally obtain very efficient deforested programs. An important feature of our extensions is that they can beuniformly defined for a wide class of data types and monads, using generic calculation rules.

Original languageEnglish (US)
Title of host publicationProceedings of the 2009 ACM SIGPLAN Symposium on Partial Evaluation and Program Manipulation, PEPM'09
Pages81-90
Number of pages10
DOIs
StatePublished - 2009
Event2009 ACM SIGPLAN Symposium on Partial Evaluation and Program Manipulation, PEPM'09 - Savannah, GA, United States
Duration: Jan 19 2009Jan 20 2009

Publication series

NameProceedings of the 2009 ACM SIGPLAN Symposium on Partial Evaluation and Program Manipulation, PEPM'09

Conference

Conference2009 ACM SIGPLAN Symposium on Partial Evaluation and Program Manipulation, PEPM'09
Country/TerritoryUnited States
CitySavannah, GA
Period1/19/091/20/09

Keywords

  • Circular programming
  • Deforestation
  • Monadic programming
  • Program calculation
  • Shortcut fusion

ASJC Scopus subject areas

  • Computer Science Applications
  • Software

Fingerprint

Dive into the research topics of 'Shortcut fusion rules for the derivation of circular and higher-order monadic programs'. Together they form a unique fingerprint.

Cite this