Bonsai: Synthesis-Based Reasoning for Type Systems
Kartik Chandra, Rastislav Bodik

TL;DR
Bonsai introduces a symbolic reasoning framework and a novel program representation to assist type system designers in detecting soundness bugs, comparing type systems, and minimizing counterexamples efficiently.
Contribution
The paper presents Bonsai, a new symbolic representation called Bonsai trees, which improves efficiency in reasoning about type systems and enables automated bug detection and analysis.
Findings
Successfully detects soundness bugs in various type systems.
Automates the synthesis of counterexamples for type soundness bugs.
First tool to automatically find a counterexample for Scala bug SI-9633.
Abstract
We describe algorithms for symbolic reasoning about executable models of type systems, supporting three queries intended for designers of type systems. First, we check for type soundness bugs and synthesize a counterexample program if such a bug is found. Second, we compare two versions of a type system, synthesizing a program accepted by one but rejected by the other. Third, we minimize the size of synthesized counterexample programs. These algorithms symbolically evaluate typecheckers and interpreters, producing formulas that characterize the set of programs that fail or succeed in the typechecker and the interpreter. However, symbolically evaluating interpreters poses efficiency challenges, which are caused by having to merge execution paths of the various possible input programs. Our main contribution is the Bonsai tree, a novel symbolic representation of programs and program…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
