Formal

Types and Abstract Interpretation

This post demonstrates how Dependent Types can be used to implement ‘Types as (Abstract) Interpretations’. The full code can be found on GIST.

The concept of abstract interpretation is to model the runtime behaviour (semantics) of a program using an existing formalism whose execution costs are lightweight in comparison to the original program.

With dependent types we can encode such abstract interpretations at the type-level to both model and reason on software execution.