[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / docs / abstracts / abstracts92.tex
1 \documentstyle[11pt,slpj,abstracts]{article}
2 \begin{document}
3
4 % ======================================================
5
6 \title{Abstracts of GRIP/GRASP-related papers and reports, 1992
7 }
8
9 \author{The GRASP team \\ Department of Computing Science \\
10 University of Glasgow G12 8QQ
11 }
12
13 \maketitle
14
15 \begin{abstract}
16 We present a list of papers and reports related to the GRIP 
17 and GRASP projects,
18 covering {\em the design, compilation technology,
19 and parallel implementations of functional programming languages, especially
20 \Haskell{}}.
21
22 Most of them can be obtained by FTP.  Connect to {\tt ftp.dcs.glasgow.ac.uk},
23 and look in {\tt pub/glasgow-fp/papers}, {\tt pub/glasgow-fp/drafts}, {\tt pub/glasgow-fp/tech\_reports},
24 or {\tt pub/glasgow-fp/grasp-and-aqua-docs}.
25
26 They can also be obtained by writing to 
27 Alexa Stewart, Department of Computing Science,
28 University of Glasgow G12 8QQ, UK.   Her electronic mail address is
29 alexa@dcs.glasgow.ac.uk.
30 \end{abstract}
31
32 \section{Book}
33
34 \reference{Simon Peyton Jones and David Lester}
35 {Implementing functional languages}
36 {Prentice Hall, 1992}
37 {
38 This book gives a practical approach to understanding implementations
39 of non-strict functional languages using lazy graph reduction.
40
41 An unusual feature of the book is that the text of each chapter is
42 itself a directly-executable Miranda(TM) program, constituting a
43 minimal but complete compiler and interpreter for a particular
44 abstract machine.  The complete source code for the book, and a
45 Tutor's Guide containing solutions to the exercises, is available in
46 machine-readable form by network file transfer (FTP).
47
48 Written to allow the reader to modify, extend and experiment with the
49 implementations provided in the text, this book will help to make a
50 course on functional-langauge implementation "come alive".
51
52 {\bf Contents}.  The Core Language.  Template instantiation.  The G-machine.
53 The Three Instruction Machine.  A parallel G-machine.  Lambda lifting
54 and full laziness.  Appendices.  Bibliography.  Index.
55 }
56
57
58 \section{Published papers}
59
60 \reference{Simon L Peyton Jones}
61 {Implementing lazy functional languages on stock hardware: 
62 the Spineless Tagless G-machine}
63 {Journal of Functional Programming 2(2) (Apr 1992)}
64 {The Spineless Tagless G-machine is an abstract machine designed
65 to support non-strict higher-order 
66 functional languages.  This presentation of the machine
67 falls into three parts.  Firstly, we give a general discussion of
68 the design issues involved in implementing non-strict functional
69 languages.
70
71 Next, we present the {\em STG language},
72 an austere but recognisably-functional language, which as well as
73 a {\em denotational} meaning has a well-defined {\em operational} semantics.
74 The STG language is the ``abstract machine code'' for the Spineless
75 Tagless G-machine.
76
77 Lastly, we discuss the mapping of the STG language onto stock hardware.
78 The success of an abstract machine model depends largely on how efficient
79 this mapping can be made, though this topic is often relegated to a short
80 section.  Instead, we give a detailed discussion of the design issues and
81 the choices we have made.  Our principal target is the C language, treating
82 the C compiler as a portable assembler.
83
84 This paper used to be called ``The Spineless Tagless G-machine: a second
85 attempt'', but has been retitled and substantially expanded with new
86 material which tries to set the machine in the context of compiler
87 technology for other languages.  The paper is very long (65 pages) and
88 has an index.
89 }
90
91 \reference{Philip Wadler}
92 {The essence of functional programming}
93 {Invited talk, 19'th Annual Symposium on Principles of
94 Programming Languages, Santa Fe, New Mexico, Jan 1992}
95 {
96 This paper explores the use monads to structure functional programs.
97 No prior knowledge of monads or category theory is required.
98
99 Monads increase the ease with which programs may be modified.  They can
100 mimic the effect of impure features such as exceptions, state, and
101 continuations; and also provide effects not easily achieved with such
102 features.  The types of a program reflect which effects occur.
103
104 The first section is an extended example of the use of monads.  A
105 simple interpreter is modified to support various extra features: error
106 messages, state, output, and non-deterministic choice.  The second
107 section describes the relation between monads and continuation-passing
108 style.  The third section sketches how monads are used in a compiler
109 for Haskell that is written in Haskell.
110 }
111
112 \reference{A Santos and SL Peyton Jones}
113 {On program transformation and the Glasgow Haskell compiler}
114 {\GlasgowNinetyTwo{}, pp240-251}
115 {We describe a series of program transformations that are implemented
116 in the Glasgow Haskell Compiler.  They are semantics preserving
117 transformations and suitable for automatic application by a compier.
118 We describe the transformations, how they interact, and their impact
119 on the time/space behaviour of some programs.}
120
121 \reference{P Sansom and SL Peyton Jones}
122 {Profiling lazy functional languages}
123 {\GlasgowNinetyTwo{}, pp227-239}
124 {Profiling tools, which measure and display the dynamic space
125 and time behaviour of programs, are essential for identifying
126 execution bottlenecks.  A variety of such tools exist for conventional
127 languages, but almost none for non-strict functional languages.  There
128 is a good reason for this: lazy evaluation means that the program is
129 executed in an order which is not immediately apparent from the source
130 code, so it is difficult to relate dynamically-gathered statistics
131 back to the original source.
132
133 We present a new technique which solves this problem.  The framework is
134 general enough to profile both space and time behaviour.  Better still,
135 it is cheap to implement, and we describe how to do so in the
136 context of the Spineless Tagless G-machine.
137 }
138
139 \reference{CV Hall, K Hammond, WD Partain, SL Peyton Jones, and PL Wadler}
140 {The Glasgow Haskell Compiler: a retrospective}
141 {\GlasgowNinetyTwo{}, pp62-71}
142 {We've spent much of our time over the last
143 two years implementing a new compiler for the functional language Haskell
144 In this effort, we've been joined by Andy Gill, who has implemented a
145 strictness analyser, Andre Santos, who has contributed a `simplifier', and
146 Patrick Sansom, who wrote garbage collectors for our runtime system.
147
148 This paper describes some of the things we have learned, what we might 
149 do differently, and where we go from here.
150 }
151
152 \reference{D King and PL Wadler}
153 {Combining monads}
154 {\GlasgowNinetyTwo{}, pp134-143}
155 {Monads provide a way of structuring functional programs.
156 Most real applications require a combination of primitive monads.
157 Here we describe how some monads may be combined with others to
158 yield a {\em combined monad}.}
159
160 \reference{J Launchbury, A Gill, RJM Hughes, S Marlow, SL Peyton Jones, and PL Wadler}
161 {Avoiding unnecessary updates}
162 {\GlasgowNinetyTwo{}, pp144-153}
163 {Graph reduction underlies most implementations of lazy functional
164 languages, allowing separate computations to share results when
165 sub-terms are evaluated. Once a term is evaluated, the node of the
166 graph representing the computation is {\em updated} with the value of
167 the term. However, in many cases, no other computation requires this
168 value, so the update is unnecessary. In this paper we take some steps
169 towards an analysis for determining when these updates may be omitted.
170 }
171
172 \reference{S Marlow and PL Wadler}
173 {Deforestation for higher-order functions}
174 {\GlasgowNinetyTwo{}, pp154-165}
175 {Deforestation is an automatic transformation scheme for functional
176 programs which attempts to remove unnecessary intermediate data
177 structures. The algorithm presented here is a variant of the original,
178 adapted for a higher order language. A detailed description of how
179 this may be implemented in an optimising compiler is also given.
180 }
181
182 \reference{WD Partain}
183 {The nofib benchmark suite of Haskell programs}
184 {\GlasgowNinetyTwo{}, pp195-202}
185 {This position paper describes the need for, make-up of, and
186 ``rules of the game'' for a benchmark suite of Haskell programs.  (It
187 does not include results from running the suite.) Those of us working
188 on the Glasgow Haskell compiler hope this suite will encourage sound,
189 quantitative assessment of lazy functional programming systems.  This
190 version of this paper reflects the state of play at the initial
191 pre-release of the suite.
192 }
193
194 \reference{PL Wadler}
195 {Monads for functional programming}
196 {Proceedings of the Marktoberdorf Summer School on Programming Calculi, 
197 ed M Broy, July-August 1992, Springer Verlag}
198 {The use of monads to structure functional programs is
199 described.  Monads provide a convenient framework for simulating
200 effects found in other languages, such as global state, exception
201 handling, output, or non-determinism.  Three case studies are looked at
202 in detail: how monads ease the modification of a simple evaluator;
203 how monads act as the basis of a datatype of arrays subject to in-place
204 update; and how monads can be used to build parsers.
205 }
206
207 \reference{K Hammond, P Trinder, P Sansom and D McNally}
208 {Improving persistent data manipulation for functional languages}
209 {\GlasgowNinetyTwo{}, pp72-85}
210 {Although there is a great deal of academic interest in
211 functional languages, there are very few large-scale functional
212 applications. The poor interface to the file system seems to be a
213 major factor preventing functional languages being used for
214 large-scale programming tasks. The interfaces provided by some
215 widely-used languages are described and some problems encountered with
216 using these interfaces to access persistent data are discussed. Three
217 means of improving the persistent data manipulation facilities of
218 functional languages are considered: an improved interface to the file
219 system, including a good binary file implementation; an interface to a
220 database; and the provision of orthogonal persistence.  Concrete
221 examples are given using the functional programming language, Haskell.
222 }
223
224 \reference{Kevin Hammond and Simon Peyton Jones}
225 {Profiling scheduling strategies on the GRIP parallel reducer}
226 {Proc 1992 Workshop on Parallel Implementations of Functional Languages, Aachen,
227 ed Kuchen, Sept 1992}
228 {It is widely claimed that functional languages are particularly
229 suitable for programming parallel computers.  A claimed advantage is
230 that the programmer is not burdened with details of task creation,
231 placement, scheduling, and synchronisation, these decisions being
232 taken by the system instead.
233
234 Leaving aside the question of whether a pure functional language is
235 expressive enough to encompass all the parallel algorithms we might
236 wish to program, there remains the question of how effectively the
237 compiler and run-time system map the program onto a real parallel
238 system, a task usually carried out mostly by the programmer.  This is
239 the question we address in our paper.
240
241 We first introduce the system architecture of GRIP, a shared-memory
242 parallel machine supporting an implementation of the functional
243 language Haskell.  GRIP executes functional programs in parallel using
244 compiled supercombinator graph reduction, a form of 
245 declarative rule system.
246
247 We then to describe several strategies for run-time resource
248 control which we have tried, presenting comprehensive measurements of
249 their effectiveness.  We are particularly concerned with strategies
250 controlling task creation, in order to improve task granularity and
251 minimise communication overheads.  This is, so far as we know, one of
252 the first attempts to make a systematic study of task-control
253 strategies in a high-performance parallel functional-language system.
254 GRIP's high absolute performance render these results credible for
255 real applications.
256 }
257
258 \section{Technical reports}
259
260 \reference{CV Hall, K Hammond, SL Peyton Jones, PL Wadler}
261 {Type classes in Haskell}
262 {Department of Computing Science, University of Glasgow}
263 {This paper defines a set of type inference rules for resolving
264 overloading introduced by type classes.  Programs including type
265 classes are transformed into ones which may be typed by the
266 Hindley-Milner inference rules.  In contrast to an other work on type
267 classes, the rules presented here relate directly to user programs.  An
268 innovative aspect of this work is the use of second-order lambda
269 calculus to record type information in the program.
270 }
271
272 \shortreference{CV Hall}
273 {A transformed life: introducing optimised lists automatically}
274 {submitted to FPCA 93}
275 {}
276
277 \shortreference{K Hammond}
278 {The Spineless Tagless G-machine --- NOT!}
279 {submitted to FPCA 93}
280
281 \shortreference{CV Hall}
282 {An optimists view of Life}
283 {submitted to Journal of Functional Programming, 1993}
284 {}
285 % ~cvh/Public/Papers/An_Optimists_View.dvi
286
287 \end{document}
288
289
290
291
292