Lectures will be given on Mondays and Fridays from one until three, but both
slots will not be used every week. The planned schedule of lectures is:
Week 2, Friday.
Week 3, Friday.
Week 4 -- no lectures.
Week 5, Friday.
Week 6, Monday and Friday.
Week 7 -- no lectures.
Week 8, Friday.
Week 9 -- no lectures.
Week 10, Friday.
All lectures will be given in Seminar Room 4.
Lecture Plan
Introduction to Abstract Interpretation. Explains the basic
ideas of abstract interpretation in the context of functional programs:
the lattice of abstract values, the safety relation, abstract functions,
interpretation of conditionals, recursion and fixed point iteration. The
examples used are sign analysis and strictness analysis. Discusses
various approaches to fixpoint iteration, using minimal function graphs,
pending analysis, frontiers (briefly), and symbolic representations.
Dataflow analysis of applicative programs using minimal
function graphs. Jones, N.D. and Mycroft, POPL,
1986. Describes the idea of a minimal function graph, although
here it's used as an analysis in its own right, rather than a
method for computing fixed points.
Finding Fixpoints in Function Spaces, J. Young,
P. Hudak. Yale Univ. Dept. CS Report YALE/DCS/RR-505,
1986. Introduces the idea of pending analysis.
A Syntactic Approach to Fixed Point Computation on Finite
Domains, T-R. Chuang, B. Goldberg, in ACM Lisp and Functional
Programming, 1992. Describes a way of representing abstract
functions by lambda-terms.
Systematic Design of Abstract Interpretations. Shows how
abstract interpretations can be proved correct using logical relations,
and introduces at the same time the idea of an expected form, taking BHA
strictness analysis as the example. Goes on to discuss analyses derived
from non-standard semantics, using a monadic presentation. The example
here is a form of control flow analysis: `what functions might this
variable be bound to'. Lastly the use of abstract closures to represent
functions is discussed.
Recommended Reading:
Strictness Analysis for Higher Order Functions, Geoffrey
L. Burn, Chris L. Hankin, S. Abramsky. In Science of Computer
Programming, 7 pp249-278, 1986. Presents the first strictness
analysis for the lambda calculus.
A Relational Framework for Abstract Interpretation, Alan
Mycroft,Neil D. Jones, in LNCS 217, 1985. The first paper to use
logical relations to prove an abstract interpretation correct.
A collecting interpretation of expressions (without
powerdomains), P. Hudak and J. Young. POPL '88. Describes a
`collecting semantics' like the cache semantics in the lecture.
Path Analysis and the Optimization of Nonstrict Functional
Programs, Adrienne Bloss, ACM Toplas Vol 16 No 3, May 1994.
An analysis to discover evaluation order.
Introduction to Type Inference. Types, their meanings, type
inference rules, proving soundness. Type inference algorithm. The
advantages and disadvantages of type-based analysis vs. abstract
interpretation.
An Ideal Model for Recursive Polymorphic Types. David
MacQueen, Gordon G. Plotkin, Ravi Sethi. POPL 1984: 165-174. Gives
a semantics to types, admitting the solution of recursive type
equations.
Abstract Interpretation vs. Type Inference: A
Topological Perspective, T. Jensen, in Functional Programming,
Glasgow 1990.
Type Based Program Analysis. Expressing program analyses as type
systems. Example: closure analysis. Subtypes and anti-monotonicity. Type
inference with subtypes. Polymorphism. Some applications.
Recommended reading:
Type Inference with Simple Subtypes, John C. Mitchell,
Journal of Functional Programming 1, 3 (1991), 245-286.
On Strictness and its Analysis. Tsung-Min Kuo, Prateek
Mishra.POPL 1987: 144-155.
Polymorphic
Type, Region and Effect Inference, Talpin, J. P., and
Jouvelot, P., Journal of
Functional Programming, Vol. 2(3), Cambridge University Press,
1992. A type system which guarantees safe use of polymorphic
references.
Implementation of the Typed Call-by-value lambda-calculus
using a Stack of Regions, Mads Tofte and Jean-Pierre Talpin,
POPL 1994.
Introduction to program transformation. The fold-unfold
method. Fusion and tupling, eureka definitions. Deriving cyclic programs
by transformation. Problems with fold-unfold.
Recommended Reading:
A Transformation System for Developing Recursive Programs,
R.M. Burstall, J. Darlington. JACM 24,1, pp 44-67,1977.
Using Circular Programs to Eliminate Multiple Traversals of
Data, Richard S. Bird. Acta Informatica 21, 3, pp239-250,
1984.
Total Correctness by Local Improvement in Program
Transformation, D. Sands, POPL '95.
How powerful are folding/unfolding transformations?, Hong
Zhu, Journal of Functional Programming, 4(1):89-112, January 1994.
For examples of an algebraic approach to program transformation, see
many of Richard Bird's Functional Pearls in the Journal of Functional
Programming.
Partial evaluation. What is partial evaluation. Bounded static
variation. The Futamura projections. Offline partial evaluation. The
specialiser projections. Speciliasing a simple interpreter. Binding-time
improvements: separating static and dynamic data, The Trick,
continuation passing. Inherited limits and optimal specialisation. Arity
raising.
Recommended Reading:
to be filled in.
A partial evaluator for a subset of Haskell is available from Rogardt Heldal.
Compile-time program transformation. Program transformation is a
regular part of optimising compilation, especially of functional
languages. But compile-time transformations must be of a special sort:
they cannot require user guidance, and must guarantee both to terminate
and not to make programs worse. In this lecture we look at methods for
deforestation, CPS-based compilation, and unboxing transformations.