Results 1 -
9 of
9
A Naïve Time Analysis and its Theory of Cost Equivalence
- Journal of Logic and Computation
, 1995
"... Techniques for reasoning about extensional properties of functional programs are well understood, but methods for analysing the underlying intensional or operational properties have been much neglected. This paper begins with the development of a simple but useful calculus for time analysis of non-s ..."
Abstract
-
Cited by 40 (7 self)
- Add to MetaCart
Techniques for reasoning about extensional properties of functional programs are well understood, but methods for analysing the underlying intensional or operational properties have been much neglected. This paper begins with the development of a simple but useful calculus for time analysis of non-strict functional programs with lazy lists. One limitation of this basic calculus is that the ordinary equational reasoning on functional programs is not valid. In order to buy back some of these equational properties we develop a non-standard operational equivalence relation called cost equivalence, by considering the number of computation steps as an `observable' component of the evaluation process. We define this relation by analogy with Park's definition of bisimulation in CCS. This formulation allows us to show that cost equivalence is a contextual congruence (and thus is substitutive with respect to the basic calculus) and provides useful proof techniques for establishing cost-equivalen...
Proving the Correctness of Compiler Optimisations Based on a Global Analysis: A Study of Strictness Analysis
, 1992
"... A substantial amount of work has been devoted to the proof of correctness of various program analyses but much less attention has been paid to the correctness of compiler optimisations based on these analyses. In this paper we tackle the problem in the context of strictness analysis for lazy functio ..."
Abstract
-
Cited by 15 (3 self)
- Add to MetaCart
A substantial amount of work has been devoted to the proof of correctness of various program analyses but much less attention has been paid to the correctness of compiler optimisations based on these analyses. In this paper we tackle the problem in the context of strictness analysis for lazy functional languages. We show that compiler optimisations based on strictness analysis can be expressed formally in the functional framework using continuations. This formal presentation has two benefits: it allows us to give a rigorous correctness proof of the optimised compiler; and it exposes the various optimisations made possible by a strictness analysis. 1 Introduction Realistic compilers for imperative or functional languages include a number of optimisations based on non-trivial global analyses. Proving the correctness of such optimising compilers can be done in three steps: 1. proving the correctness of the original (unoptimised) compiler; Correspondence regarding this paper should be ...
Effective Optimisation of Multiple Traversals in Lazy Languages
- University of Aarhus
, 1999
"... Tupling transformation strategy can be applied to eliminate redundant calls in a program and also to eliminate multiple traversals of data structures. While the former application can produce super-linear speedup in the transformed program, the effectiveness of the latter has yet to be appreciated. ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
Tupling transformation strategy can be applied to eliminate redundant calls in a program and also to eliminate multiple traversals of data structures. While the former application can produce super-linear speedup in the transformed program, the effectiveness of the latter has yet to be appreciated. In this paper, we investigate the pragmatic issues behind elimination of multiple data traversal in the context of lazy languages, and propose a framework of tupling tactic called strictness-guided tupling . This tactic is capable of exploiting specialised strictness contexts where possible to effect tupling optimisation. Two further enhancements of the tupling tactic are also proposed. One achieves circular tupling when multiple traversals from nested recursive calls are eliminated. The other exploits speculative strictness to further improve the performance of tupling. Benchmarks are given throughout the paper to illustrate the performance gains due to these tactics. Keywords: Tupling, ...
Proving the Correctness of Compiler Optimisations Based on Strictness Analysis
- in Proceedings 5th int. Symp. on Programming Language Implementation and Logic Programming, LNCS 714
, 1993
"... . We show that compiler optimisations based on strictness analysis can be expressed formally in the functional framework using continuations. This formal presentation has two benefits: it allows us to give a rigorous correctness proof of the optimised compiler; and it exposes the various optimisatio ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
. We show that compiler optimisations based on strictness analysis can be expressed formally in the functional framework using continuations. This formal presentation has two benefits: it allows us to give a rigorous correctness proof of the optimised compiler; and it exposes the various optimisations made possible by a strictness analysis. 1 Introduction Realistic compilers for imperative or functional languages include a number of optimisations based on non-trivial global analyses. Proving the correctness of such optimising compilers can be done in three steps: 1. proving the correctness of the original (unoptimised) compiler; 2. proving the correctness of the analysis; and 3. proving the correctness of the modifications of the simple-minded compiler to exploit the results of the analysis. A substantial amount of work has been devoted to steps (1) and (2) but there have been surprisingly few attempts at tackling step (3). In this paper we show how to carry out this third step in the...
Demand Transformation Analysis for Concurrent Constraint Programs
, 1994
"... Domain In this section we construct a domain of abstract constraints called ACon, which abstracts the domain #(C). In the construction of ACon, we use two domains called D and D V , also introduced in this section, which consist of non-ground, downwards-closed types representing sets of terms in #( ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
Domain In this section we construct a domain of abstract constraints called ACon, which abstracts the domain #(C). In the construction of ACon, we use two domains called D and D V , also introduced in this section, which consist of non-ground, downwards-closed types representing sets of terms in #(H V ) and some basic types, such as the set of integers. (H V is ordered by t 1 t 2 if t 1 is a substitution instance of t 2 .) The domain of types is given by D ::= ? j? j j c(D; : : : ; D) j numj D D j :D. Program variables are not mentioned by types in D. In the syntax of D, c ranges over constructor symbols and is a fixpoint operator. Type variables are given by 2 TV , which are used only for fixpoint constructions. The base types ?, ? (read, "non-var"), and num represent H V , H V n V , and the set of integers, respectively. Example 3.1. fX = ?; Y = ?g is an element of ACon representing the downwardsclosed set of constraints where X is constrained arbitrarily (including not at all...
Cps-Translation and the Correctness of Optimising Compilers
, 1992
"... We show that compiler optimisations based on strictness analysis can be expressed formally in the functional framework using continuations. This formal presentation has two benefits: it allows us to give a rigorous correctness proof of the optimised compiler; and it exposes the various optimisations ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
We show that compiler optimisations based on strictness analysis can be expressed formally in the functional framework using continuations. This formal presentation has two benefits: it allows us to give a rigorous correctness proof of the optimised compiler; and it exposes the various optimisations made possible by a strictness analysis. These benefits are especially significant in the presence of partially evaluated data structures. 1 Introduction Realistic compilers for imperative or functional languages include a number of optimisations based on non-trivial global analyses. Proving the correctness of such optimising compilers should involve three steps: 1. proving the correctness of the original (unoptimised) compiler; 2. proving the correctness of the analysis; and 3. proving the correctness of the modifications of the simple-minded compiler to exploit the results of the analysis. A substantial amount of work has been devoted to steps (1) and (2) but there has been surprisingly ...
Measuring the Effectiveness of a Simple Strictness Analyser
- In Functional Programming
, 1993
"... We describe a simple strictness analyser for purely-functional programs, show how its results are used to improve programs, and provide measurements of the effects of these improvements. These measurements are given both in terms of overall run-time, and in terms of internal operations such as alloc ..."
Abstract
- Add to MetaCart
We describe a simple strictness analyser for purely-functional programs, show how its results are used to improve programs, and provide measurements of the effects of these improvements. These measurements are given both in terms of overall run-time, and in terms of internal operations such as allocations, updates, etc. Despite its simplicity, the analyser handles higher-order functions, and non-flat domains provided they are non-recursive. Ths paper appears in Functional Programming, Glasgow 1993, ed Hammond and O'Donnell, Springer Workshops in Computer Science, 1993, pp201-220. 1 Introduction A lot has been written about strictness analysis for non-strict functional programs, usually in the hope that the results of the analysis can be used to reduce run-time. On the other hand, few papers present measurements of how well it works in practice. Usually, all that is presented are the run-times of a variety of (usually small) programs, with and without strictness analysis enabled (eg Sm...
Strictness Analysis - Another Method
, 1993
"... Strictness analysis is a compile time analysis applicable to lazy functional programming languages. Strictness analysis can be used to significantly improve uniprocessor implementation speed and to derive non-speculative parallelism. Many methods for doing strictness analysis have been proposed. Mos ..."
Abstract
- Add to MetaCart
Strictness analysis is a compile time analysis applicable to lazy functional programming languages. Strictness analysis can be used to significantly improve uniprocessor implementation speed and to derive non-speculative parallelism. Many methods for doing strictness analysis have been proposed. Most of these are based on abstract interpretation and require fixpoint iteration. In this thesis we survey existing methods and then go on to define a new method which does not require fixpoint iteration. The new method is significantly more efficient than methods based on abstract interpretation. The abstract domain used is not fixed and can be expanded to obtain better accuracy. Our method is also easy to prove correct. We discuss further work necessary for the new method to realise its potential as a framework for fast and practical analyses.

