Results 1  10
of
41
A Transformation System for Developing Recursive Programs
, 1977
"... A system of rules for transforming programs is described, with the programs in the form of recursion equations An initially very simple, lucid. and hopefully correct program IS transformed into a more efficient one by altering the recursion structure Illustrative examples of program transformations ..."
Abstract

Cited by 574 (3 self)
 Add to MetaCart
A system of rules for transforming programs is described, with the programs in the form of recursion equations An initially very simple, lucid. and hopefully correct program IS transformed into a more efficient one by altering the recursion structure Illustrative examples of program transformations are given, and a tentative implementation !s described Alternative structures for programs are shown, and a possible initial phase for an automatic or semiautomatic program manipulation system is lndmated KEY WORDS AND PHRASES program transformation, program mampulatlon, optimization, recursion CR CATEGORIES' 3 69, 4 12, 4 22, 5 24, 5 25 1.
Linear Types Can Change the World!
 PROGRAMMING CONCEPTS AND METHODS
, 1990
"... The linear logic of J.Y. Girard suggests a new type system for functional languages, one which supports operations that "change the world". Values belonging to a linear type must be used exactly once: like the world, they cannot be duplicated or destroyed. Such values require no reference counti ..."
Abstract

Cited by 134 (9 self)
 Add to MetaCart
The linear logic of J.Y. Girard suggests a new type system for functional languages, one which supports operations that "change the world". Values belonging to a linear type must be used exactly once: like the world, they cannot be duplicated or destroyed. Such values require no reference counting or garbage collection, and safely admit destructive array update. Linear types extend Schmidt's notion of single threading; provide an alternative to Hudak and Bloss' update analysis; and offer a practical complement to Lafont and HolmstrÃ¶m's elegant linear languages.
A Fold for All Seasons
 IN PROC. CONFERENCE ON FUNCTIONAL PROGRAMMING LANGUAGES AND COMPUTER ARCHITECTURE
, 1993
"... Generic control operators, such as fold, can be generated from algebraic type definitions. The class of types to which these techniques are applicable is generalized to all algebraic types definable in languages such as Miranda and ML, i.e. mutually recursive sumsofproducts with tuples and functio ..."
Abstract

Cited by 113 (15 self)
 Add to MetaCart
Generic control operators, such as fold, can be generated from algebraic type definitions. The class of types to which these techniques are applicable is generalized to all algebraic types definable in languages such as Miranda and ML, i.e. mutually recursive sumsofproducts with tuples and function types. Several other useful generic operators, also applicable to every type in this class, also are described. A normalization algorithm which automatically calculates improvements to programs expressed in a language based upon folds is described. It reduces programs, expressed using fold as the exclusive control operator, to a canonical form. Based upon a generic promotion theorem, the algorithm is facilitated by the explicit structure of fold programs rather than using an analysis phase to search for implicit structure. Canonical programs are minimal in the sense that they contain the fewest number of fold operations. Because of this property, the normalization algorithm has important ...
Is there a use for linear logic?
, 1991
"... Past attempts to apply Girard's linear logic have either had a clear relation to the theory (Lafont, Holmstrom, Abramsky) or a clear practical value (Guzm'an and Hudak, Wadler), but not both. This paper defines a sequence of languages based on linear logic that span the gap between theory and practi ..."
Abstract

Cited by 88 (7 self)
 Add to MetaCart
Past attempts to apply Girard's linear logic have either had a clear relation to the theory (Lafont, Holmstrom, Abramsky) or a clear practical value (Guzm'an and Hudak, Wadler), but not both. This paper defines a sequence of languages based on linear logic that span the gap between theory and practice. Type reconstruction in a linear type system can derive information about sharing. An approach to linear type reconstruction based on use types is presented. Applications to the array update problem are considered.
Warm Fusion: Deriving BuildCatas from Recursive Definitions
 In Conf. on Func. Prog. Languages and Computer Architecture
, 1995
"... Program fusion is the process whereby separate pieces of code are fused into a single piece, typically transforming a multipass algorithm into a single pass. Recent work has made it clear that the process is especially successful if the loops or recursions are expressed using catamorphisms (e.g.fol ..."
Abstract

Cited by 72 (2 self)
 Add to MetaCart
Program fusion is the process whereby separate pieces of code are fused into a single piece, typically transforming a multipass algorithm into a single pass. Recent work has made it clear that the process is especially successful if the loops or recursions are expressed using catamorphisms (e.g.foldr) and constructorabstraction (e.g. build). In this paper we show how to transform recursive programs into this form automatically, thus enabling the fusion transformation to be applied more easily than before. 1 Introduction There are significant advantages to multipass algorithms, in which intermediate datastructures are created and traversed. In particular, each of the passes may be relatively simple, so are both easier to write and are potentially more reusable. By separating many distinct phases it becomes possible to focus on a single task, rather than attempting to do many things at the same time. The classic toy example of this is to compute the sum of the squares of the numbe...
Structured programming with go to statements
 Computing Surveys
, 1974
"... A consideration of several different examples sheds new light on the problem of ereating reliable, wellstructured programs that behave efficiently. This study focuses largely on two issues: (a) improved syntax for iterations and error exits, making it possible to write a larger class of programs c ..."
Abstract

Cited by 55 (3 self)
 Add to MetaCart
A consideration of several different examples sheds new light on the problem of ereating reliable, wellstructured programs that behave efficiently. This study focuses largely on two issues: (a) improved syntax for iterations and error exits, making it possible to write a larger class of programs clearly and efficiently without go to state
A Logic Programming Approach To Manipulating Formulas And Programs
 IEEE Symp. Logic Programming
, 1994
"... : Firstorder Horn clause logic can be extended to a higherorder setting in which function and predicate symbols can be variables and terms are replaced with simply typed terms. For such a logic programming language to be complete in principle, it must incorporate higherorder unification. Althoug ..."
Abstract

Cited by 49 (14 self)
 Add to MetaCart
: Firstorder Horn clause logic can be extended to a higherorder setting in which function and predicate symbols can be variables and terms are replaced with simply typed terms. For such a logic programming language to be complete in principle, it must incorporate higherorder unification. Although higherorder unification is more complex than usual firstorder unification, its availability makes writing certain kinds of programs far more straightforward. In this paper, we present such programs written in a higherorder version of Prolog called Prolog. These programs manipulate structures, such as formulas and programs, which contain abstractions or bound variables. We show how a simple natural deduction theorem prover can be implemented in this language. Similarly we demonstrate how several simple program transformers for a functional programming language can be written in Prolog. These Prolog programs exploit the availability of conversion and higherorder unification to elegantly ...
Proving Theorems about LISP Functions
, 1975
"... Program verification is the idea that properties of programs can be precisely stated and proved in the mathematical sense. In this paper, some simple heuristics combining evaluation and mathematical induction are described, which the authors have implemented in a program that automatically proves a ..."
Abstract

Cited by 48 (2 self)
 Add to MetaCart
Program verification is the idea that properties of programs can be precisely stated and proved in the mathematical sense. In this paper, some simple heuristics combining evaluation and mathematical induction are described, which the authors have implemented in a program that automatically proves a wide variety of theorems about recursive LISP functions. The method the program uses to generate induction formulas is described at length. The theorems proved by the program include that REVERSE is its own inverse and that a particular SORT program is correct. A list of theorems proved by the program is given. key words and phrases: LISP, automatic theoremproving, structural induction, program verification cr categories: 3.64, 4.22, 5.21 1 Introduction We are concerned with proving theorems in a firstorder theory of lists, akin to the elementary theory of numbers. We use a subset of LISP as our language because recursive list processing functions are easy to write in LISP and because ...
A Survey and Classification of some Program Transformation Approaches and Techniques
 In TC2 IFIP Working Conference on Program Specification and Transformation
, 1987
"... Program transformation is a means to formally develop efficient programs from lucid specifications. A representative sample of the diverse range of program transformation research is classified into several different approaches based upon the motivations for and styles of constructing such formal de ..."
Abstract

Cited by 44 (0 self)
 Add to MetaCart
Program transformation is a means to formally develop efficient programs from lucid specifications. A representative sample of the diverse range of program transformation research is classified into several different approaches based upon the motivations for and styles of constructing such formal developments. Individual techniques for supporting construction of developments are also surveyed, and are related to the various approaches.
Compilation by Transformation in NonStrict Functional Languages
, 1995
"... In this thesis we present and analyse a set of automatic sourcetosource program transformations that are suitable for incorporation in optimising compilers for lazy functional languages. These transformations improve the quality of code in many different respects, such as execution time and memory ..."
Abstract

Cited by 32 (1 self)
 Add to MetaCart
In this thesis we present and analyse a set of automatic sourcetosource program transformations that are suitable for incorporation in optimising compilers for lazy functional languages. These transformations improve the quality of code in many different respects, such as execution time and memory usage. The transformations presented are divided in two sets: global transformations, which are performed once (or sometimes twice) during the compilation process; and a set of local transformations, which are performed before and after each of the global transformations, so that they can simplify the code before applying the global transformations and also take advantage of them afterwards. Many of the local transformations are simple, well known, and do not have major effects on their own. They become important as they interact with each other and with global transformations, sometimes in nonobvious ways. We present how and why they improve the code, and perform extensive experiments wit...