Bonsai: Synthesis-Based Reasoning for Type Systems

08/01/2017
by   Kartik Chandra, et al.
0

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 states which addresses these challenges. Bonsai trees encode complex syntactic information in terms of logical constraints, enabling more efficient merging. We implement these algorithms in the Bonsai tool, an assistant for type system designers. We perform case studies on how Bonsai helps test and explore a variety of type systems. Bonsai efficiently synthesizes counterexamples for soundness bugs that have been inaccessible to automatic tools, and is the first automated tool to find a counterexample for the recently discovered Scala soundness bug SI-9633.

READ FULL TEXT
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

05/28/2019

Deep Learning for Bug-Localization in Student Programs

Providing feedback is an integral part of teaching. Most open online cou...
01/22/2020

Benchmarking Symbolic Execution Using Constraint Problems – Initial Results

Symbolic execution is a powerful technique for bug finding and program t...
08/16/2021

Effects of Hints on Debugging Scratch Programs: An Empirical Study with Primary School Teachers in Training

Bugs in learners' programs are often the result of fundamental misconcep...
06/03/2020

Detecting and Understanding Real-World Differential Performance Bugs in Machine Learning Libraries

Programming errors that degrade the performance of systems are widesprea...
01/09/2019

Automated Customized Bug-Benchmark Generation

We introduce Bug-Injector, a system that automatically creates benchmark...
10/12/2021

NetRep: Automatic Repair for Network Programs

Debugging imperative network programs is a challenging task for develope...
04/23/2020

BOLD: An Ontology-based Log Debugger for C Programs

The different activities related to debugging such as program instrument...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.