Generic Accumulators for Program Calculation

Graduate Thesis. Supervised by Alberto Pardo. 2004 PS PDF

Abstract

Accumulations are recursive functions widely used in the context of functional programming. They maintain intermediate results in additional parameters, called accumulators, that may be used in later stages of computing. In a former work [Par02] a generic recursion operator named afold was presented. Afold makes it possible to write accumulations defined by structural recursion for a wide spectrum of datatypes (lists, trees, etc.). Also, a number of algebraic laws were provided that served as a formal tool for reasoning about programs with accumulations. In this work, we present an extension to afold that allows a greater flexibility in the kind of accumulations that may be represented. This extension, in essence, provides the expressive power to allow accumulations to have more than one recursive call in each subterm, with different accumulator values —something that was not previously possible. The extension is conservative, in the sense that we obtain similar algebraic laws for the extended operator. We also present a case study that illustrates the use of the algebraic laws in a calculational setting and a technique for the improvement of fused programs that do not eliminate all intermediate structures.

BibTeX

@mastersthesis{Jaskelioff:2004,
	Address = {Rosario, Argentina},
	Author = {Mauro Jaskelioff},
	School = {Universidad Nacional de Rosario},
	Title = {Generic Accumulations for Program Calculation},
	Year = {2004}}