Results 1 - 10
of
62
The Lazy Lambda Calculus
- Research Topics in Functional Programming
, 1990
"... Introduction The commonly accepted basis for functional programming is the -calculus; and it is folklore that the -calculus is the prototypical functional language in puri ed form. But what is the -calculus? The syntax is simple and classical; variables, abstraction and application in the pure cal ..."
Abstract
-
Cited by 218 (3 self)
- Add to MetaCart
Introduction The commonly accepted basis for functional programming is the -calculus; and it is folklore that the -calculus is the prototypical functional language in puri ed form. But what is the -calculus? The syntax is simple and classical; variables, abstraction and application in the pure calculus, with applied calculi obtained by adding constants. The further elaboration of the theory, covering conversion, reduction, theories and models, is laid out in Barendregt's already classical treatise [Bar84]. It is instructive to recall the following crux, which occurs rather early in that work (p. 39): Meaning of -terms: rst attempt The meaning of a -term is its normal form (if it exists). All terms without normal forms are identi ed. This proposal incorporates such a simple and natural interpretation of the -calculus as
Lambda Lifting: Transforming Programs to Recursive Equations
, 1985
"... Lambda lifting is a technique for transforming a functional program with local function definitions, possibly with free variables in the function definitions, into a program consisting only of global function (combinator) definitions which will be used as rewrite rules. Different ways of doing lambd ..."
Abstract
-
Cited by 159 (4 self)
- Add to MetaCart
Lambda lifting is a technique for transforming a functional program with local function definitions, possibly with free variables in the function definitions, into a program consisting only of global function (combinator) definitions which will be used as rewrite rules. Different ways of doing lambda lifting are presented, as well as reasons for rejecting or selecting the method used in our Lazy ML compiler. An attribute grammar and a functional program implementing the chosen algorithm is given. Originally publised in Proceedings 1985 Conference on Functional Programming Languages and Computer Architecture, Lecture Notes in Computer Science 201, Nancy, France, 1985. Springer Verlag. y As part B of author's thesis. Main addition: the attribute grammar formulation. 1 Introduction When compiling a lazy functional language using the technique described in [Joh84] it is presumed that the input program is in the form of a set of function definitions, possibly mutually recursive, tog...
Views: A way for pattern matching to cohabit with data abstraction
, 1986
"... Pattern matching and dta abstraction are important concepts in designing programs, but they do not it well together. Pattern matching depend on making public a free data type mpresentaiion, while data abstraction depends on hiding the repreentaiion. This paper proposes the vdws mechanism at a means ..."
Abstract
-
Cited by 119 (0 self)
- Add to MetaCart
Pattern matching and dta abstraction are important concepts in designing programs, but they do not it well together. Pattern matching depend on making public a free data type mpresentaiion, while data abstraction depends on hiding the repreentaiion. This paper proposes the vdws mechanism at a means of reconc'dlng this conflict. A view allows any type to be viewed at a free data type, thus combining the clarity of pattern matching with the eiclency of data abstraction.
Projections for Strictness Analysis
, 1987
"... Contexts have been proposed as a means of performing strictness analysis on non-flat domains. Roughly speaking, a context describes how much a sub-expression will be evaluated by the surrounding program. This paper shows how contexts can be represented using the notion of projection from domain theo ..."
Abstract
-
Cited by 91 (4 self)
- Add to MetaCart
Contexts have been proposed as a means of performing strictness analysis on non-flat domains. Roughly speaking, a context describes how much a sub-expression will be evaluated by the surrounding program. This paper shows how contexts can be represented using the notion of projection from domain theory. This is clearer than the previous explanation of contexts in terms of continuations. In addition, this paper describes finite domains of contexts over the non-flat list domain. This means that recursive context equations can be solved using standard fixpoint techniques, instead of the algebraic manipulation previously used. Praises of lazy functional languages have been widely sung, and so have some curses. One reason for praise is that laziness supports programming styles that are inconvenient or impossible otherwise [Joh87, Hug84, Wad85a]. One reason for cursing is that laziness hinders efficient implementation. Still, acceptable efficiency for lazy languages is at last being achieved...
Attribute Grammars as a Functional Programming Paradigm
- Functional Programming Languages and Computer Architecture, volume 274 of LNCS
, 1987
"... The purpose of this paper is twofold. Firstly we show how attributes in an attribute grammar can be simply and efficiently evaluated using a lazy functional language. The class of attribute grammars we can deal with are the most general ones possible: attributes may depend on each other in an arbitr ..."
Abstract
-
Cited by 71 (2 self)
- Add to MetaCart
The purpose of this paper is twofold. Firstly we show how attributes in an attribute grammar can be simply and efficiently evaluated using a lazy functional language. The class of attribute grammars we can deal with are the most general ones possible: attributes may depend on each other in an arbitrary way, as long as there are no truly circular data dependencies. Secondly, we describe a methodology based on attribute grammars, where, in a fairly straightforward way, we can develop efficient functional programs where direct, conventional solutions yield less efficient programs. We review two examples from a paper by R. Bird (Using circular programs to eliminate multiple traversals of data, Acta Informatica, 21, 1984) where he transforms simple but inefficient multipass programs into more efficient single pass ones, but which on their own can be very hard to understand. We show how such efficient but tangled programs can have natural formulations as attribute grammars. We also propose a...
Polymorphism and Type Inference in Database Programming
"... In order to find a static type system that adequately supports database languages, we need to express the most general type of a program that involves database operations. This can be achieved through an extension to the type system of ML that captures the polymorphic nature of field selection, toge ..."
Abstract
-
Cited by 37 (10 self)
- Add to MetaCart
In order to find a static type system that adequately supports database languages, we need to express the most general type of a program that involves database operations. This can be achieved through an extension to the type system of ML that captures the polymorphic nature of field selection, together with a technique that generalizes relational operators to arbitrary data structures. The combination provides a statically typed language in which generalized relational databases may be cleanly represented as typed structures. As in ML types are inferred, which relieves the programmer of making the type assertions that may be required in a complex database environment. These extensions may also be used to provide static polymorphic typechecking in object-oriented languages and databases. A problem that arises with object-oriented databases is the apparent need for dynamic typechecking when dealing with queries on heterogeneous collections of objects. An extension of the type system needed for generalized relational operations can also be used for manipulating collections of dynamically typed values in a statically typed language. A prototype language based on these ideas has been implemented. While it lacks a proper treatment of persistent data, it demonstrates that a wide variety of database structures can be cleanly represented in a polymorphic programming language.
A history of Haskell: Being lazy with class
- In Proceedings of the 3rd ACM SIGPLAN Conference on History of Programming Languages (HOPL-III
, 2007
"... This paper describes the history of Haskell, including its genesis and principles, technical contributions, implementations and tools, and applications and impact. 1. ..."
Abstract
-
Cited by 29 (0 self)
- Add to MetaCart
This paper describes the history of Haskell, including its genesis and principles, technical contributions, implementations and tools, and applications and impact. 1.
Adaptive Pattern Matching
, 1992
"... Pattern matching is an important operation used in many applications such as functional programming, rewriting and rule-based expert systems. By preprocessing the patterns into a DFA-like automaton, we can rapidly select the matching pattern(s) in a single scan of the relevant portions of the inp ..."
Abstract
-
Cited by 20 (4 self)
- Add to MetaCart
Pattern matching is an important operation used in many applications such as functional programming, rewriting and rule-based expert systems. By preprocessing the patterns into a DFA-like automaton, we can rapidly select the matching pattern(s) in a single scan of the relevant portions of the input term. This automaton is typically based on left-to-right traversal of the patterns. By adapting the traversal order to suit the set of input patterns, it is possible to considerably reduce the space and matching time requirements of the automaton.

