One tool, many languages: language-parametric transformation with incremental parametric syntax
summary
A new representation called incremental parametric syntax lets one write a single source-to-source transformation and run it on many real languages with little extra work. The system, implemented in Haskell as Cubix, covers C, Java, JavaScript, Lua and Python. A realistic interprocedural plumbing transformation is implemented for five languages in ~40 hours and refactors 500 lines across 41 files in a 20k‑LOC project. Test suites (≈500k LOC) hit 98–100% pass rates, one crash bug is exposed, and human ratings favor the tool equally or slightly more than humans.
AI-written summary · about
chapters (16)
- 0:00Start
- 1:18Opportunity?
- 2:20Multi-Language Transformation
- 4:23Syntax Definitions
- 4:35What Hinders Modularity?
- 5:44Prior Work
- 6:10Decomposing a Language
- 7:09Big Small idea: Sort injections
- 8:03Mixed Trees
- 9:01Abstracting Multiple Syntaxes
- 9:33"Blowing down" a Tree
- 9:57Cubix Architecture
- 11:41A Simple Transformation
- 11:52Implementation
- 12:23Interprocedural Pluming
- 13:04Three-Address Code Transformation (Lua, JS, Python)
