160 likes | 273 Views
GC16/3011 Functional Programming Lecture 16 Introduction to Implementation. Contents. What is “implementation”? Lambda calculus versus combinators Graph Reduction “Abstract machines” Automatic Memory Management Memory allocation Garbage Collection Parallel Graph Reduction. Combinators.
E N D
GC16/3011 Functional ProgrammingLecture 16Introduction to Implementation
Contents • What is “implementation”? • Lambda calculus versus combinators • Graph Reduction • “Abstract machines” • Automatic Memory Management • Memory allocation • Garbage Collection • Parallel Graph Reduction
Combinators Compiler translates to: l-calculus string tree graph = instruction set memory management Language implementation Language (e.g. Miranda (lazy) or SML (strict)) Fixed set or Variable set combinator rewriting/reduction environment reduction graph reduction AMs: interpreted/compiled/strict/lazy
Language implementation Language (e.g. Miranda (lazy) or SML (strict)) Compiler translates to: l-calculus
string tree graph Language implementation Language (e.g. Miranda (lazy) or SML (strict)) Compiler translates to: l-calculus
string tree graph Language implementation Language (e.g. Miranda (lazy) or SML (strict)) Compiler translates to: l-calculus environment reduction
string tree graph Language implementation Language (e.g. Miranda (lazy) or SML (strict)) Compiler translates to: l-calculus environment reduction graph reduction
string tree graph Language implementation Language (e.g. Miranda (lazy) or SML (strict)) Compiler translates to: l-calculus environment reduction graph reduction AMs: interpreted/compiled/strict/lazy
Combinators Compiler translates to: l-calculus string tree graph Language implementation Language (e.g. Miranda (lazy) or SML (strict)) environment reduction graph reduction interpreted/compiled/strict/lazy AMs: interpreted/compiled/strict/lazy
Combinators Compiler translates to: l-calculus string tree graph Language implementation Language (e.g. Miranda (lazy) or SML (strict)) Fixed set or Variable set environment reduction graph reduction interpreted/compiled/strict/lazy AMs: interpreted/compiled/strict/lazy
Combinators Compiler translates to: l-calculus string tree graph Language implementation Language (e.g. Miranda (lazy) or SML (strict)) Fixed set or Variable set environment reduction graph reduction interpreted/compiled/strict/lazy AMs: interpreted/compiled/strict/lazy
Combinators Compiler translates to: l-calculus string tree graph = instruction set Language implementation Language (e.g. Miranda (lazy) or SML (strict)) Fixed set or Variable set environment reduction graph reduction interpreted/compiled/strict/lazy AMs: interpreted/compiled/strict/lazy
Combinators Compiler translates to: l-calculus string tree graph = instruction set Language implementation Language (e.g. Miranda (lazy) or SML (strict)) Fixed set or Variable set combinator rewriting/reduction environment reduction graph reduction interpreted/compiled/strict/lazy AMs: interpreted/compiled/strict/lazy
Combinators Compiler translates to: l-calculus string tree graph = instruction set memory management Language implementation Language (e.g. Miranda (lazy) or SML (strict)) Fixed set or Variable set combinator rewriting/reduction environment reduction graph reduction interpreted/compiled/strict/lazy AMs: interpreted/compiled/strict/lazy
Memory management • Recycling / reusing memory • Limited resources • Programmer does not control placement of data in memory • Issues: • Memory Allocation • Garbage Identification • Garbage Collection • Fragmentation
Summary • What is “implementation”? • Lambda calculus versus combinators • Graph Reduction • “Abstract machines” • Automatic Memory Management • Memory allocation • Garbage Collection • Parallel Graph Reduction