RICE: An Optimizing Curry Compiler
summary
RICE is written entirely in Curry and turns Curry source into a C backend via an imperative IL called ICurry, using AST-to-AST transformations (fixed‑point, bottom‑up, composable functions) and functional patterns to encode rules like case elimination and shortcut deforestation (fold/build → direct recursion). Runtime uses graph reduction with backtracking and per-node deterministic flags to avoid needless undo, and it preserves call‑time choice by binding shared nondeterministic values. Benchmarks claim compiled programs run 3 to 1000 times faster than prior compilers.
AI-written summary · about
chapters (10)
- 0:00Start
- 4:39Why an Optimizing Compiler?
- 11:05A Rewriting Compiler: Implementation
- 13:07Optimizations as Rewrites
- 16:05Challenges of Optimizations
- 18:05Run-time System
- 20:04Target Code
- 21:29Fast Backtracking
- 22:39Removing Normalization
- 24:23Curry Compiler Comparisons
related talks
28mThe Scenic Route to Deforestation
19mReusing Just-in-Time Compiled Code
16mIRHash: Efficient Multi-Language Compiler Caching by IR-Level Hashing
36mAccelerate RISC-V Instruction Set Simulation by Tiered JIT Compilation
19mCompiling Recurrences over Dense and Sparse Arrays
15mScaling Optimization Over Uncertainty via Compilation
26mAn Analysis of Compiled Code Reusability in Dynamic Compilation
10mA quick view into a compiler
