A representation invariant is a property that holds of all values of abstract type produced by a module. Representation invariants play important roles in software engineering and program verification. In this paper, we develop a counterexample-driven algorithm for inferring a representation invariant that is sufficient to imply a desired specification for a module. The key novelty is a type-directed notion of visible inductiveness, which ensures that the algorithm makes progress toward its goal as it alternates between weakening and strengthening candidate invariants. The algorithm is parameterized by an example-based synthesis engine and a verifier, and we prove that it is sound and complete for first-order modules over finite types, assuming that the synthesizer and verifier are as well. We implement these ideas in a tool called Hanoi, which synthesizes representation invariants for recursive data types. Hanoi not only handles invariants for first-order code, but higher-order code as well. In its back end, Hanoi uses an enumerative synthesizer called Myth and an enumerative testing tool as a verifier. Because Hanoi uses testing for verification, it is not sound, though our empirical evaluation shows that it is successful on the benchmarks we investigated.
Wed 17 JunDisplayed time zone: Pacific Time (US & Canada) change
08:00 - 09:00 | Synthesis IPLDI Research Papers at PLDI Research Papers live stream Chair(s): James Bornholt University of Texas at Austin | ||
08:00 20mTalk | Data-Driven Inference of Representation Invariants PLDI Research Papers Anders Miltner Princeton University, USA, Saswat Padhi University of California at Los Angeles, USA, Todd Millstein University of California at Los Angeles, USA, David Walker Princeton University, USA | ||
08:20 20mTalk | Type Error Feedback via Analytic Program Repair PLDI Research Papers Georgios Sakkas University of California at San Diego, USA, Madeline Endres University of Michigan, USA, Benjamin Cosman University of California at San Diego, USA, Westley Weimer University of Michigan, USA, Ranjit Jhala University of California at San Diego, USA | ||
08:40 20mTalk | Synthesizing Structured CAD Models with Equality Saturation and Inverse Transformations PLDI Research Papers Chandrakana Nandi University of Washington, USA, Max Willsey University of Washington, USA, Adam Anderson University of Washington, USA, James R. Wilcox Certora, USA, Eva Darulova MPI-SWS, Germany, Dan Grossman University of Washington, USA, Zachary Tatlock University of Washington, Seattle |