Download presentation
Presentation is loading. Please wait.
Published byΛήδα Σπηλιωτόπουλος Modified over 5 years ago
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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.