Program Sketching with Live Bidirectional Evaluation
We present Sketch-n-Myth, a technique for completing program sketches whereby the evaluation of ordinary assertions gives rise to input-output examples. The key innovation, called live bidirectional evaluation, propagates examples "backward" through partially evaluated sketches. Compared to previous example-based synthesis techniques, live bidirectional evaluation enables Sketch-n-Myth to (a) synthesize recursive functions without trace-complete examples and (b) specify and solve interdependent synthesis goals. On benchmarks used to evaluate Myth, a state-of-the-art example-based synthesis tool, Sketch-n-Myth requires on average 67 sketching. For many of these benchmarks, a simple sketching strategy further reduces the example burden.
READ FULL TEXT