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 ...