ACM Home Page
Please provide us with feedback. Feedback
Shortcut fusion rules for the derivation of circular and higher-order monadic programs
Full text PdfPdf (480 KB)
Source
ACM/SIGPLAN Workshop Partial Evaluation and Semantics-Based Program Manipulation archive
Proceedings of the 2009 ACM SIGPLAN workshop on Partial evaluation and program manipulation table of contents
Savannah, GA, USA
SESSION: Program transformation I table of contents
Pages 81-90  
Year of Publication: 2009
ISBN:978-1-60558-327-3
Authors
Alberto Pardo  Universidad de la Republica, Montevideu, Uruguay
João Paulo Fernandes  Universidade do Minho & Universidade Atlâântica, Braga, Portugal
João Saraiva  Universidade do Minho, Braga, Portugal
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 3,   Downloads (12 Months): 48,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1480945.1480958
What is a DOI?

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 programs from strict ones, maintaining the global effects. Later, the circularities in the derived programs are traded by high-order 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 be uniformly defined for a wide class of data types and monads, using generic calculation rules.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
 
2
 
3
 
4
Richard S. Bird. Using circular programs to eliminate multiple traversals of data. Acta Inf, 21:239--250, 1984.
 
5
O. Chitil. Type-inference based deforestation of functional programs. PhD thesis, RWTH Aachen, October 2000.
 
6
R. Cockett and D. Spencer. Strong Categorical Datatypes I. In R.A.C. Seely, editor, International Meeting on Category Theory 1991, volume 13 of Canadian Mathematical Society Conference Proceedings, pages 141--169, 1991.
 
7
8
9
10
 
11
N. Ghani and P. Johann. Short Cut Fusion of Recursive Programs with Computational Effects. In Symposium on Trends in Functional Programming (TFP 2008), 2008.
 
12
 
13
A. Gill. Cheap Deforestation for Non-strict Functional Languages. PhD thesis, Department of Computing Science, University of Glasgow, UK, 1996.
14
 
15
Dennis Kugler Harald Baier and Marian Margraf. Elliptic Curve Cryptography Based on ISO 15946. Technical Report TR-03111, Federal Office for Information Security, 2007.
 
16
17
 
18
C. Manzino and A. Pardo. Short Cut Fusion of Monadic Programs. In Brazilian Symposium on Programming Languages (SBLP), 2008.
 
19
 
20
Alberto Pettorossi and Andrzej Skowron. The lambda abstraction strategy for program derivation. In Fundamenta Informaticae XII, pages 541--561, 1987.
 
21
Doaitse Swierstra. Tutorial on attribute grammars. In Generative Programming and Component Engineering, 1993.
 
22
S. D. Swierstra, Arthur Baars, and Andres Loh. The UU-AG attribute grammar system.
23
24
 
25
Janis Voigtlander. Semantics and pragmatics of new shortcut fusion rules. In FLOPS '08: Proceedings of the 2008 International Symposium on Functional and Logic Programming, pages 163--179. Springer-Verlag, 2008.
26
 
27
 
28

Collaborative Colleagues:
Alberto Pardo: colleagues
João Paulo Fernandes: colleagues
João Saraiva: colleagues