On Type-Based Techniques for Program Manipulation
summary
Type-directed transformations formalize program rewrites as typing judgments and prove soundness by preservation under reduction plus soundness for values. Two concrete techniques appear: a useless variable elimination that replaces irrelevant subterms with unit via type inference (then removes units) and an intersection-type transformation that compiles a deterministic transducer into a new lambda that maps compressed functional data to outputs. A prototype gtx2 generates OCaml programs (example: it computes 610 occurrences of "ab" in the 16th Fibonacci word). Tools: type inference, intersection types, CPS/tupling for verification.
AI-written summary · about
chapters (15)
- 0:00Intro
- 3:48Type-Based Transformation: Some Common Principles
- 6:33Outline + Type Based Program Transformation
- 6:51Useless Variable Elimination (UVE, a.k.a. Useless Code Elimination)
- 13:15Type Inference Type-Based Transformation
- 18:35Functional Programs as Compressed Data [K+, PEPM 2012]
- 20:18Transformation of Compressed Data (without Decompression) word w
- 21:27Type-based Program Transformation
- 24:40Type-based Transformation Rules
- 29:46Demo: Counting "ab" in a Fibonacci word
- 35:27Outline Type Based Program Transformation
- 35:44Growing Role of Program Transformation for Trustworthy Computing
- 36:55Examples of Program Transformations Used for Verification CPS transformation
- 38:06Tuping Transformation for Relational Reasoning about Functional Programs Asadar, PEPM15
- 42:10Type-Based Techniques for Formal Languages
related talks
28mType-directed Program Transformation for Constant-Time Enforcement
19mIll-Typed Programs Don't Evaluate
17mFrom Traces to Program Incorrectness: A Type-Theoretic Approach
27mTowards Type Debugging using Partial Evaluation
21mPolymorphic Type Inference for Dynamic Languages
20mGenerating Well-Typed Terms that are not "Useless"
41mThe Dialectics of Type-Level Programming
21mSeamless Scope-Safe Metaprogramming Through Polymorphic Subtype Inference (Short Paper)
