Presentation is loading. Please wait.

Presentation is loading. Please wait.

Implementation of a Functional Programming Language

Similar presentations


Presentation on theme: "Implementation of a Functional Programming Language"— Presentation transcript:

1 Implementation of a Functional Programming Language
Jason Koenig Computer Systems Lab TJHSST

2 Introduction Creation of a functional language
Both design and implementation Working Parsing Simple Optimization Execution Ordered Evaluation Todo: Optimizations

3 What is a Functional Language?
Two approaches: Imperative – like a recipe, or a how to. Declarative – like a mathematical formula. Functions are first class citizens Functions are like data

4 Design Goals Small and lightweight Core language highly portable Other functionality in standard library Easily embedded in other programs as scripting language Driven by implementation, rather than some external metric

5 Implementation File, Input Optimizer Executor Parser Program Output
Characters Optimized Syntax Tree Lexical Analysis Syntax Tree Executor Tokens Characters Parser Program Output

6 Sample Programs let x = 5, y = 6 in x+y # out: 11 let
in head.[x,y] # out: 25

7 Future Work Recursion G-machine compilation Language
Tail Recursion G-machine compilation Language Standard Library Implementation: C for speed


Download ppt "Implementation of a Functional Programming Language"

Similar presentations


Ads by Google