Learning Stateful Preconditions Modulo a Test Generator

Angello Astorga,P. Madhusudan,Shambwaditya Saha,Shiyu Wang,Tao Xie
DOI: https://doi.org/10.1145/3314221.3314641
2019-01-01
Abstract:In this paper, we present a novel learning framework for inferring stateful preconditions (i.e., preconditions constraining not only primitive-type inputs but also non-primitive-type object states) modulo a test generator, where the quality of the preconditions is based on their safety and maximality with respect to the test generator. We instantiate the learning framework with a specific learner and test generator to realize a precondition synthesis tool for C#. We use an extensive evaluation to show that the tool is highly effective in synthesizing preconditions for avoiding exceptions as well as synthesizing conditions under which methods commute.
What problem does this paper attempt to address?