Synthesizing contracts correct modulo a test generator
Angello Astorga, Shambwaditya Saha, Ahmad Dinkins, Felicia Wang, P. Madhusudan, Tao Xie
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.
Topics & Concepts
Generator (circuit theory)CorrectnessModuloComputer scienceTest suiteTest (biology)Programming languageAlgorithmTest caseMathematicsDiscrete mathematicsMachine learningBiologyRegression analysisPower (physics)Quantum mechanicsPhysicsPaleontologySoftware Engineering ResearchLogic, programming, and type systemsSoftware Testing and Debugging Techniques