Media Summary: Defining the small-step semantics of `let` expressions, based on substitution Textbook: Putting together the entire HM type inference algorithm: collecting constraints, and solving them with unification Textbook: ... The "type checking" phase of compilation performs a static analysis to prevent run-time errors during

Evaluation Relations Ocaml Programming Chapter 9 Video 14 - Detailed Analysis & Overview

Defining the small-step semantics of `let` expressions, based on substitution Textbook: Putting together the entire HM type inference algorithm: collecting constraints, and solving them with unification Textbook: ... The "type checking" phase of compilation performs a static analysis to prevent run-time errors during Using pattern matching to access the pieces of a variant. Textbook: In a small-step semantics, an expression repeatedly takes a single step of A comparison of big-step vs. small-step semantics, and substitution model vs. environment model Textbook: ...

The semantics of `let` uses a notion of substitution, but, how should that be defined? These examples lend intuition. Textbook: ... How to infer the type of `if` expressions in HM type inference Textbook: What happens when HM type inference is over? Either a "principal type" is found, or a type error has been detected. Textbook: ... Implementing the type checker for a simple language: `let` and `if` Textbook: The front end of a compiler lexes, parses, and performs semantic analysis, such as type checking. The back end manipulates the ... HM type inference of `let` expressions led to type schemes, which enabled polymorphism. Add mutability, though, could lead to a ...

How to define the substitution operation for simple expressions, including `if` and `let` Textbook: Defining and implementing the big-step substitution-model semantics of a simple language Textbook: ... How to infer the type of anonymous functions (lambdas) in HM type inference Textbook: The "unification" algorithm is how a set of equations is solved in HM type inference. It is based on "unifying" constraints with ... Compilers translate code from one language to another. Interpreters execute code. Virtual machines and just-in-time compilation ...

Photo Gallery

Evaluation Relations | OCaml Programming | Chapter 9 Video 14
Let Semantics | OCaml Programming | Chapter 9 Video 15
A Worked Example of Type Inference | OCaml Programming | Chapter 9 Video 45
Type Checking | OCaml Programming | Chapter 9 Video 31
Pattern Matching with Variants Part 1 | OCaml Programming | Chapter 3 Video 14
Small-Step Evaluation | OCaml Programming | Chapter 9 Video 13
Recap of All Models | OCaml Programming | Chapter 9 Video 30
Substitution Examples | OCaml Programming | Chapter 9 Video 16
Inference of Ifs | OCaml Programming | Chapter 9 Video 40
Finishing Type Inference | OCaml Programming | Chapter 9 Video 46
SimPL Type Checker Part 2 | OCaml Programming | Chapter 9 Video 35
Environment Model Example | OCaml Programming | Chapter 9 Video 24
View Detailed Profile
Evaluation Relations | OCaml Programming | Chapter 9 Video 14

Evaluation Relations | OCaml Programming | Chapter 9 Video 14

Small- and big-step

Let Semantics | OCaml Programming | Chapter 9 Video 15

Let Semantics | OCaml Programming | Chapter 9 Video 15

Defining the small-step semantics of `let` expressions, based on substitution Textbook: https://cs3110.github.io/textbook.

A Worked Example of Type Inference | OCaml Programming | Chapter 9 Video 45

A Worked Example of Type Inference | OCaml Programming | Chapter 9 Video 45

Putting together the entire HM type inference algorithm: collecting constraints, and solving them with unification Textbook: ...

Type Checking | OCaml Programming | Chapter 9 Video 31

Type Checking | OCaml Programming | Chapter 9 Video 31

The "type checking" phase of compilation performs a static analysis to prevent run-time errors during

Pattern Matching with Variants Part 1 | OCaml Programming | Chapter 3 Video 14

Pattern Matching with Variants Part 1 | OCaml Programming | Chapter 3 Video 14

Using pattern matching to access the pieces of a variant. Textbook: https://cs3110.github.io/textbook.

Small-Step Evaluation | OCaml Programming | Chapter 9 Video 13

Small-Step Evaluation | OCaml Programming | Chapter 9 Video 13

In a small-step semantics, an expression repeatedly takes a single step of

Recap of All Models | OCaml Programming | Chapter 9 Video 30

Recap of All Models | OCaml Programming | Chapter 9 Video 30

A comparison of big-step vs. small-step semantics, and substitution model vs. environment model Textbook: ...

Substitution Examples | OCaml Programming | Chapter 9 Video 16

Substitution Examples | OCaml Programming | Chapter 9 Video 16

The semantics of `let` uses a notion of substitution, but, how should that be defined? These examples lend intuition. Textbook: ...

Inference of Ifs | OCaml Programming | Chapter 9 Video 40

Inference of Ifs | OCaml Programming | Chapter 9 Video 40

How to infer the type of `if` expressions in HM type inference Textbook: https://cs3110.github.io/textbook.

Finishing Type Inference | OCaml Programming | Chapter 9 Video 46

Finishing Type Inference | OCaml Programming | Chapter 9 Video 46

What happens when HM type inference is over? Either a "principal type" is found, or a type error has been detected. Textbook: ...

SimPL Type Checker Part 2 | OCaml Programming | Chapter 9 Video 35

SimPL Type Checker Part 2 | OCaml Programming | Chapter 9 Video 35

Implementing the type checker for a simple language: `let` and `if` Textbook: https://cs3110.github.io/textbook.

Environment Model Example | OCaml Programming | Chapter 9 Video 24

Environment Model Example | OCaml Programming | Chapter 9 Video 24

An example of how environment-model

Compiler Architecture | OCaml Programming | Chapter 9 Video 2

Compiler Architecture | OCaml Programming | Chapter 9 Video 2

The front end of a compiler lexes, parses, and performs semantic analysis, such as type checking. The back end manipulates the ...

The Value Restriction | OCaml Programming | Chapter 9 Video 49

The Value Restriction | OCaml Programming | Chapter 9 Video 49

HM type inference of `let` expressions led to type schemes, which enabled polymorphism. Add mutability, though, could lead to a ...

Menhir and Ocamllex | OCaml Programming | Chapter 9 Video 11

Menhir and Ocamllex | OCaml Programming | Chapter 9 Video 11

The

Definition of Substitution | OCaml Programming | Chapter 9 Video 17

Definition of Substitution | OCaml Programming | Chapter 9 Video 17

How to define the substitution operation for simple expressions, including `if` and `let` Textbook: https://cs3110.github.io/textbook.

SimPL Big Step | OCaml Programming | Chapter 9 Video 20

SimPL Big Step | OCaml Programming | Chapter 9 Video 20

Defining and implementing the big-step substitution-model semantics of a simple language Textbook: ...

Inference of Functions | OCaml Programming | Chapter 9 Video 41

Inference of Functions | OCaml Programming | Chapter 9 Video 41

How to infer the type of anonymous functions (lambdas) in HM type inference Textbook: https://cs3110.github.io/textbook.

Unification Algorithm | OCaml Programming | Chapter 9 Video 44

Unification Algorithm | OCaml Programming | Chapter 9 Video 44

The "unification" algorithm is how a set of equations is solved in HM type inference. It is based on "unifying" constraints with ...

Compilers and Interpreters | OCaml Programming | Chapter 9 Video 1

Compilers and Interpreters | OCaml Programming | Chapter 9 Video 1

Compilers translate code from one language to another. Interpreters execute code. Virtual machines and just-in-time compilation ...