Class Material

Chapter 1: Practical Functional Programming


1. Introduction

Functional Programming: Expressions, Values, Types using TypeScript

2. Semantics of Programming Languages and Types

3. TypeScript: Complex Data Types, JSON, FP Processing of JSON

4. Type Checking

5. Data Types and Operations on Data

6. Composition and Monads

Chapter 2: Syntax and Semantics with Scheme

Defining a Programming Language Bottom-up: Elements of Programming

1. Elements of Programming - Defining Scheme Bottom-up

2.Higher-order Functions in Scheme and Local Variables


3.Syntax of Programming Languages: BNF, Abstract Syntax Tree

4.Syntactic Operations: L1 Parsing, Type Guards, Scoping, Lexical Addresses, Syntactic Rewrites

Operational Semantics: Substitution-based Interpreter

5. Operational Semantics: L1 evaluation, environment

6. Substitution Model: L2 (ProcExp, IfExp), Closures, L3 (SExp), Error Processing, Applicative Order vs. Normal Order evaluation

Operational Semantics: Environment-based Interpreter

7. Environment Model, L4 evaluation, let evaluation, visual notation of environments, using closures, closure-based compound data structures

8. Recursion and Mutation

Chapter 3: Type Checking and Type Inference

1. Type Checking with Full Type Annotations

2. Type Inference

3. Type Inference System


Type Checking (Code and Tests)

Type Inference with Type Equations

Type Inference with Type Var Unification (Optimized Type Equations)

Chapter 4: Control Structures


Deriving an iterative interpreter for L5 using CPS and Registerization

The following code relies on the files of the L5 interpreter from the previous chapter. Add the files to the same folder.

Chapter 5: Logic Programming


To install the full package of the Logic Programming system in Racket:

Clone the code from github