| |
|
| |
No. UU-CS-2009-024. (November 2009)
Abstract
Programs in functional programming languages with algebraic datatypes are often datatype-centric and use folds or fold-like functions. Incrementalization of such a program can significantly improve its performance. Functional incrementalization separates the recursion from the calculation and significantly reduces redundantcomputation. In this paper, we motivate incrementalization with a simple exampleand present a library for transforming programs using upwards, downwards, andcircular incrementalization. We also give a datatype-generic implementation for the library and demonstrate the incremental zipper, a zipper extended with attributes. ...
|
| |
In ICFP '09: Proceedings of the 14th ACM SIGPLAN international conference on Functional programming (2009), pp. 1-2, doi:10.1145/1596550.1596551
Abstract
Alan Perlis, inverting OscarWilde's famous quip about cynics, once suggested, decades ago, that a Lisp programmer is one who knows the value of everything and the cost of nothing. Now that the conference on Lisp and Functional Programming has become ICFP, some may think that OCaml and Haskell programmers have inherited this (now undeserved) epigram. I do believe that as multicore processors are becoming prominent, and soon ubiquitous, it behooves all programmers to rethink their programming style, strategies, and tactics, so that ...
Note (first note only)
I want to find the slides for this talk.
|
| |
(November 2007)
Abstract
Interpretation is an implicit part of today's programming; it has great power but is overused and has significant costs. For example, interpreters are typically significantly hard to understand and hard to reason about. The methodology of "Totally Functional Programming" (TFP) is a reasoned attempt to redress the problem of interpretation. It incorporates an awareness of the undesirability of interpretation with observations that definitions and a certain style of programming appear to offer alternatives to it. Application of TFP is expected to ...
|
| |
In Proceedings of the 5th ACM conference on Functional programming languages and computer architecture (1991), pp. 124-144
Abstract
We develop a calculus for lazy functional programming based on recursion operators associated with data type definitions. For these operators we derive various algebraic laws that are useful in deriving and manipulating programs. We shall show that all example functions in Bird and Wadler's "Introduction to Functional Programming" can expressed using these operators. ...
|
| |
In Proceedings of the seventh international conference on Functional programming languages and computer architecture (1995), pp. 324-333, doi:10.1145/224164.224225
Abstract
Fold and unfold are general purpose functionals for processing and constructing lists. By using the categorical approach of modelling recursive datatypes as fixed points of functors, these functionals and their algebraic properties were generalised from lists to polynomial (sum-of-product) datatypes. However, the restriction to polynomial datatypes is a serious limitation: it precludes the use of exponentials (function-spaces), whereas it is central to functional programming that functions are first-class values, and so exponentials should be able to be used freely in ...
|
| |
In ICFP '98: Proceedings of the third ACM SIGPLAN international conference on Functional programming (1998), pp. 280-288, doi:10.1145/289423.289457
Abstract
In this paper we explain how recursion operators can be used to structure and reason about program semantics within a functional language. In particular, we show how the recursion operator fold can be used to structure denotational semantics, how the dual recursion operator unfold can be used to structure operational semantics, and how algebraic properties of these operators can be used to reason about program semantics. The techniques are explained with the aid of two main examples, the first concerning arithmetic ...
|
| |
In ICFP '98: Proceedings of the third ACM SIGPLAN international conference on Functional programming (1998), pp. 273-279, doi:10.1145/289423.289455
Abstract
Folds are appreciated by functional programmers. Their dual, unfolds, are not new, but they are not nearly as well appreciated. We believe they deserve better. To illustrate, we present (indeed, we calculate) a number of algorithms for computing the breadth-first traversal of a tree. We specify breadth-first traversal in terms of level-order traversal, which we characterize first as a fold. The presentation as a fold is simple, but it is inefficient, and removing the inefficiency makes it no longer a fold. ...
|
| |
Electronic Notes in Theoretical Computer Science In CMCS 2001, Coalgebraic Methods in Computer Science (a Satellite Event of ETAPS 2001), Vol. 44, No. 1. (May 2001), pp. 146-160, doi:10.1016/s1571-0661(04)80906-x
posted to fold recursion set-theory unfold
by spl
on 2008-08-08 16:37:29
Abstract
We give a necessary and sufficient condition for when a set-theoretic function can be written using the recursion operator fold, and a dual condition for the recursion operator unfold. The conditions are simple, practically useful, and generic in the underlying datatype. ...
|
| |
Abstract
One well known algorithm is the Fast Fourier Transform (FFT). An efficient iterative version of the FFT algorithm performs as a first step a bit-reversal permutation of the input list. The bit-reversal permutation swaps elements whose indices have binary representations that are the reverse of each other. Using an amortized approach, this operation can be made to run in linear time on a random-access machine. An intriguing question is whether a linear-time implementation is also feasible on a pointer machine, that ...
|
| |
Abstract
Lists are often used as "glue" to connect separate parts of a program together. We propose an automatic technique for improving the efficiency of such programs, by removing many of these intermediate lists, based on a single, simple, local transformation. We have implemented the method in the Glasgow Haskell compiler. ...
|