Book ChapterDOI
Program development using lambda abstraction
Alberto Pettorossi
- pp 420-434
Reads0
Chats0
TLDR
The solution proposed works for the call-by-value evaluation rule and it does not require local recursion, and it is shown that higher order functions allow us to simulate the use of pointers of a Pascal-like language.Abstract:
We study the problem of avoiding multiple traversals of data structures in functional programming A solution proposed in [Bir84] makes use of lazy evaluation and local recursion We show that analogous perfomances can be achieved using higher order functions and lambda abstractions The solution we propose works for the call-by-value evaluation rule and it does not require local recursion We also show through some examples that higher order functions allow us to simulate the use of pointers of a Pascal-like language We finally spend a few words on a theory of strategies for program developmentread more
Citations
More filters
Proceedings ArticleDOI
Tupling calculation eliminates multiple data traversals
TL;DR: This work proposes a new method to expose recursive structures in recursive definitions and shows how this structural information can be explored for calculating out efficient programs by means of tupling.
Journal Article
There and Back Again
Olivier Danvy,Mayer Goldberg +1 more
TL;DR: There And Back Again (TABA) as discussed by the authors is a programming pattern where a recursive function defined over a data structure traverses another data structure at return time, where the recursive calls get us "there" by traversing the first data structure and the returns get us 'back again' while traversing a second data structure.
Journal ArticleDOI
A transformation method for dynamic-sized tabulation
Wei-Ngan Chin,Masami Hagiya +1 more
TL;DR: In previous works by Chin and Khoo, a safe (terminating) fold/unfold transformation algorithm was developed for some classes of functions which are guaranteed to be successfully tupled.
Book ChapterDOI
Derivation of programs which traverse their input data only once
TL;DR: This chapter analyzes the transformation process from locally recursive programs to nonlocal recursive ones and presents the comparison of abstraction strategy with the techniques of lazy evaluation and local recursion, and discusses synergism between lambda abstraction and Tupling.
Journal Article
On deforesting parameters of accumulating maps
TL;DR: This work shows how intermediate lists built by a selected class of functional programs, namely 'accumulating maps', can be deforested using a single composition rule, and introduces a new function dmap, a symmetric extension of the familiar function map.
References
More filters
Journal ArticleDOI
Can programming be liberated from the von Neumann style?: a functional style and its algebra of programs
TL;DR: A new class of computing systems uses the functional programming style both in its programming language and in its state transition rules; these systems have semantics loosely coupled to states—only one state transition occurs per major computation.
Journal ArticleDOI
A Transformation System for Developing Recursive Programs
Rod M. Burstall,John Darlington +1 more
TL;DR: A system of rules for transforming programs, with the programs in the form of recursion equations, are described, with an initially very simple, lucid, and hopefully correct program transformed into a more efficient one by altering the recursion structure.
Book ChapterDOI
An introduction to the theory of lists
TL;DR: In these lectures a notation and a calculus for specifying and manipulating computable functions over lists are introduced, used to derive efficient solutions for a number of problems, including problems in text processing.
Book ChapterDOI
Can programming be liberated from the von Neumann style?: a functional style and its algebra of programs
TL;DR: Combining forms can be used to transform programs and solve equations whose unknowns are programs in much the same way one tranforms equations in high school algebra as discussed by the authors, which is an algebra of programs whose variables range over programs and whose operations are combining forms.
Journal ArticleDOI
Proving Theorems about LISP Functions
TL;DR: Some simple heuristics combining evaluation and mathematical induction are described which are implemented in a program that automatically proves a wide variety of theorems about recursive LISP functions.