Synthesizing Contracts Correct Modulo a Test Generator.

Angello Astorga,Shambwaditya Saha,Ahmad Dinkins,Felicia Wang,P. Madhusudan,Tao Xie
DOI: https://doi.org/10.1145/3485481
2021-01-01
Proceedings of the ACM on Programming Languages
Abstract:We present an approach to learn contracts for object-oriented programs where guarantees of correctness of the contracts are made with respect to a test generator. Our contract synthesis approach is based on a novel notion of tight contracts and an online learning algorithm that works in tandem with a test generator to synthesize tight contracts. We implement our approach in a tool called Precis and evaluate it on a suite of programs written in C#, studying the safety and strength of the synthesized contracts, and compare them to those synthesized by Daikon.
What problem does this paper attempt to address?