Compiling Your Story: Using Techniques from Compiler Design to Check Your Narrative
summary
Yarn Spinner is treated as a full language, compiled to bytecode and converted into basic blocks and a control‑flow graph so symbolic execution can run every path and assert constraints. A Z3 SMT solver plus NetworkX finds unreachable lines, produces concrete variable assignments to auto‑generate valid savegames, and flags logical bugs; checking one Laurie conversation takes ~30 seconds and producing full coverage runs took ~1 hour. This finds wasted work (an unreachable bass‑practice line in Night in the Woods) and speeds QA.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 2:41Nodebased vs Scriptbased
- 8:40Using Existing Tools
- 9:34Static Analysis
- 12:11Using Z3
- 15:28The bug
- 16:33Finding paths
- 23:26Night in the Woods
- 27:32Z3 Constraints
- 33:07Running in Reverse
- 34:00Invariant Rules
- 36:46Consequences
- 38:33Conclusion
related talks
53mLocknote: How Badly Do We Want Correct Compilers?
40mRuby Writing Machines
53mFrom Within: Compiler Testing and Validation via Compilers
01h 02mLanguage Design meets Verifying Compilers
21mTowards Compiler-Guided Static Analysis
40mYour Program as a Transpiler: Applying Compiler Design to Everyday Programming
27mProgramming with Yarn
40mJoy of Meta-Tracing Just-in-Time Compilation: More Than Just a VM Generator
