Results 1 - 10
of
10
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...
Heap Profiling of Lazy Functional Programs
- JOURNAL OF FUNCTIONAL PROGRAMMING
, 1993
"... We describe the design, implementation and use of a new kind of profiling tool that yields valuable information about the memory use of lazy functional programs. The tool has two parts: a modified functional language implementation which generates profiling information during the execution of progra ..."
Abstract
-
Cited by 49 (11 self)
- Add to MetaCart
We describe the design, implementation and use of a new kind of profiling tool that yields valuable information about the memory use of lazy functional programs. The tool has two parts: a modified functional language implementation which generates profiling information during the execution of programs, and a separate program which converts this information to graphical form. With the aid of profile graphs, one can make alterations to a functional program which dramatically reduce its space consumption. We demonstrate this in the case of a genuine example --- the first to which the tool was applied --- for which the results are strikingly successful.
Complexity Analysis for a Lazy Higher-Order Language
- In Proceedings of the 3rd European Symposium on Programming
, 1990
"... This paper is concerned with the time-analysis of functional programs. Techniques which enable us to reason formally about a program's execution costs have had relatively little attention in the study of functional programming. We concentrate here on the construction of equations which compute t ..."
Abstract
-
Cited by 44 (2 self)
- Add to MetaCart
This paper is concerned with the time-analysis of functional programs. Techniques which enable us to reason formally about a program's execution costs have had relatively little attention in the study of functional programming. We concentrate here on the construction of equations which compute the time-complexity of expressions in a lazy higher-order language. The problem with higher-order functions is that complexity is dependent on the cost of applying functional parameters. Structures called cost-closures are introduced to allow us to model both functional parameters and the cost of their application. The problem with laziness is that complexity is dependent on context. Projections are used to characterise the context in which an expression is evaluated, and cost-equations are parameterised by this context-description to give a compositional time-analysis. Using this form of context information we introduce two types of time-equation: sufficient-time equations and nece...
Improving List Comprehension Database Queries
- In Proceedings of TENCON'89
, 1989
"... The task of increasing the efficiency of database queries has recieved considerable attention. In this paper we describe the improvement of queries expressed as list comprehensions in a lazy functional language. The database literature identifies four algebraic and two implementation-based improveme ..."
Abstract
-
Cited by 29 (3 self)
- Add to MetaCart
The task of increasing the efficiency of database queries has recieved considerable attention. In this paper we describe the improvement of queries expressed as list comprehensions in a lazy functional language. The database literature identifies four algebraic and two implementation-based improvement strategies. For each strategy we show an equivalent improvement for queries expressed as list comprehensions. This means that welldeveloped database algorithms that improve queries using several of these strategies can be emulated to improve comprehension queries. We are also able to improve queries which require greater power than that provided by the relational algebra. Most of the improvements entail transforming a simple, inefficient query into a more complex, but more efficient form. We illustrate each improvement using examples drawn from the database literature. 1 Introduction The functional programming community is often accused of being too inward looking. Functional languages a...
Non-Strict Languages - Programming and Implementation
, 1994
"... Non-strict evaluation improves the expressive power of functional languages at the expense of an apparent loss of efficiency. In this paper we give examples of this expressive power, taking as an example an interactive functional program and describing the programming techniques depending on non-str ..."
Abstract
-
Cited by 19 (0 self)
- Add to MetaCart
Non-strict evaluation improves the expressive power of functional languages at the expense of an apparent loss of efficiency. In this paper we give examples of this expressive power, taking as an example an interactive functional program and describing the programming techniques depending on non-strict evaluation which improved its design. Implementation methods for non-strict languages have delivered poor performance precisely when such programming techniques have been used. This need not be the case, however, and in the second part of the paper we describe Tim, a method of implementing non-strict languages for which the penalty for using lazy evaluation is very small. 1 Introduction Effort in the functional programming community is today divided into two main activities: making efficient implementations of functional languages and exploiting the expressive power of these languages by writing elegant programs. To a large extent these activities are carried out by separate groups of p...
TIP in Haskell - another exercise in functional programming
- Proc. Glasgow Workshop on Functional Programming 1991
, 1991
"... Requests and Responses Working from the C-TIP routine headers of Figure 1, it is a straightforward exercise to write most of the corresponding definitions of TipRequest and TipResponse shown in Figure 2. The introduction of the type YX for screen co-ordinates is perhaps the most immediately appare ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
Requests and Responses Working from the C-TIP routine headers of Figure 1, it is a straightforward exercise to write most of the corresponding definitions of TipRequest and TipResponse shown in Figure 2. The introduction of the type YX for screen co-ordinates is perhaps the most immediately apparent change, but other less obvious changes are more significant. The new relationship of function and argument between TIP and the application means, first, that there is no need for requests Tstart or Tstop: tip simply wraps the evaluation of its argument in an appropriate context. Secondly, data TipRequest = data TipResponse = Tbell Tkey Char --- Tbox YX YX --- Tres Response --- Tnobox YX YX --- Tvoid --- Ttitle String YX YX --- Tyx YX --- Tclear --- Tmove YX --- Trelmove YX --- Tprintf YX Int String [String] --- Tputc Char --- Tputs String --- Tread --- Trefresh type YX = (Int,Int) --- Treq Request --- Tmax --- Tpos Figure 2: Level 1 H-TIP Interface. since tip controls all I/O on behalf...
Object-Oriented Functional Spreadsheets
- Proc. 10th Glasgow Workshop on Functional Programming (GlaFP’97
, 1997
"... . The spreadsheet is one of the most successful computer applications. This popularity derives from an intuitive user interface which both closely mimics traditional bookkeeping and allows non-programmers to develop simple numerical applications. Unfortunately, the current user interface is frustrat ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
. The spreadsheet is one of the most successful computer applications. This popularity derives from an intuitive user interface which both closely mimics traditional bookkeeping and allows non-programmers to develop simple numerical applications. Unfortunately, the current user interface is frustrating and limiting: we believe that the computational model can be simplified to improve usability for non-programmers, extended to provide additional functionality, redesigned to facilitate reuse (to improve performance and integrity), and embedded in an environment which supports a spreadsheet inheritance hierarchy. We propose a new spreadsheet paradigm which incorporates many functional programming features such as higher-order functions, a strong type system, curried partial applications, referential transparency and lazy evaluation. It also incorporates many object-oriented programming features such as a class hierarchy, inheritance, overloading, overriding, subsumption, and dynamic desp...
Graphical application and visualization of lazy functional computation
, 1995
"... Mere academic toys or the tools of the future? Lazy functional programming languages have undoubted attractive properties. This thesis explores their potential, from the programmer's point of view, for implementing interactive and graphical applications to which they do not seem immediately suited. ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
Mere academic toys or the tools of the future? Lazy functional programming languages have undoubted attractive properties. This thesis explores their potential, from the programmer's point of view, for implementing interactive and graphical applications to which they do not seem immediately suited. The discussion is centred round two example applications. One is a graphical design program based on an idea of the artist M. C. Escher. The thesis argues that the graphical user interface may be encapsulated in an "interpret " function that when applied by a mouse click to an interface of appropriate type yields the required behaviour. The second example is a monitoring interpreter for a functional language. The idea is that if the mechanics of the reduction are presented at a suitable level of abstraction, this may be used to give insight into what is going on. On the basis of this the programmer might modify the code so that a program runs more efficiently in terms of speed and memory requirements. Problems of displaying the reduction are addressed, and solutions proposed for overcoming these: displaying the graph as a spanning tree, to ensure planarity, with extra leaves
Purity, Impurity and Efficiency in Graph Algorithms
"... Introduction This chapter initially considers pure lazy functional languages: their philosophy, advantages and disadvantages. We then examine how to develop efficient lazy functional programs. One way to achieve efficiency is to introduce impurities. In the final section the two schools of lazy fun ..."
Abstract
- Add to MetaCart
Introduction This chapter initially considers pure lazy functional languages: their philosophy, advantages and disadvantages. We then examine how to develop efficient lazy functional programs. One way to achieve efficiency is to introduce impurities. In the final section the two schools of lazy functional programming, pure and impure, are assessed. The assessment centres around two partial implementations of the Hopcroft Tarjan graph planarity algorithm. Profiling tools are used to make an experimental comparison and optimisation of each program. 4.1 Lazy Functional Programming In his book [42] Reade suggests that the user of a traditional imperative language is required to do the following: 1. describe the result to be computed; 2. impose an order on the steps required in the computation; 3. create and destroy, as required, any data structures used by the computation. 74 The first item is concerned with the extensional prope

