A Pretty Expressive Printer
summary
Claims a new printer Πe that is strictly more expressive than prior pretty printers, provably minimizes a user-chosen optimality objective via a Cost Factory, and has better worst‑case time complexity than many existing systems. The algorithm is formulated as dynamic programming, uses memoization and a low‑dimension parallel frontier data structure, is verified in the Lean theorem prover for validity and optimality, and is implemented as PrettyExpressive, which evaluates competitively and already underpins a Racket code formatter.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 2:11Traditional vs arbitrary printers
- 3:55Expressiveness versus performance
- 7:08Sigma e printing language
- 9:14Optimality with dynamic programming
- 11:01Memoization for performance
- 12:44Evaluation results
- 14:34Q&A
related talks
15mExtensible configurable prettyprinters
50mExpression Templates: Past, Present, Future
44mPretty Parsing
14mAchieving High-Performance the Functional Way - A Functional Pearl on Expressing High...
59mExpression Templates: Past, Present, Future
16mResponsive Parallelism with Dynamic and First-Class Priorities
15mA Modular Cost Analysis for Probabilistic Programs
28mBridging Syntax and Semantics of Lean Expressions in E-Graphs
