COMP0020: Functional Programming
Example Programs
COMP0020 Functional Programming Lecture 16
Introduction to Implementation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 7 / 25
COMP0020: Functional Programming
Example Programs
Contents
What is ¡°implementation” ? Lambda calculus versus combinators Graph Reduction
I ¡°Abstract machines” Automatic Memory Management
I Memory allocation I Garbage Collection
Parallel Graph Reduction
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 8 / 25
COMP0020: Functional Programming
Example Programs
Language implementation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 9 / 25
COMP0020: Functional Programming
Example Programs
Language implementation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 10 / 25
COMP0020: Functional Programming
Example Programs
Language implementation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 11 / 25
COMP0020: Functional Programming
Example Programs
Language implementation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 12 / 25
COMP0020: Functional Programming
Example Programs
Language implementation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 13 / 25
COMP0020: Functional Programming
Example Programs
Language implementation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 14 / 25
COMP0020: Functional Programming
Example Programs
Language implementation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 15 / 25
COMP0020: Functional Programming
Example Programs
Language implementation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 16 / 25
COMP0020: Functional Programming
Example Programs
Language implementation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 17 / 25
COMP0020: Functional Programming
Example Programs
Language implementation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 18 / 25
COMP0020: Functional Programming
Example Programs
Language implementation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 19 / 25
COMP0020: Functional Programming
Example Programs
Language implementation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 20 / 25
COMP0020: Functional Programming
Example Programs
Memory management
Recycling / reusing memory
I Limited resources
I Programmer does not control placement of data in memory
Issues :
I Memory Allocation
I Garbage Identification I Garbage Collection
I Fragmentation
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 21 / 25
COMP0020: Functional Programming
Example Programs
Summary
Summary
What is ¡°implementation” ? Lambda calculus versus combinators Graph Reduction
I ¡°Abstract machines” Automatic Memory Management
I Memory allocation I Garbage Collection
Parallel Graph Reduction
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 22 / 25
COMP0020: Functional Programming
Example Programs
Summary
END OF LECTURE
Christopher D. Clack (University College London)
COMP0020: Functional Programming
Academic Year 2018-2019 23 / 25