In this paper, we thoroughly experiment with state-of-the-art DSL-based code generation model, SketchAdapt [1]}. SketchAdapt (hereafter `SA') synthesizes programs from textual descriptions as well as input-output test examples. It combines neural networks and symbolic synthesis by learning an intermediate `sketch' representation. It has been demonstrated empirically that SA recognizes similar descriptive patterns as effectively as pure RNN approaches while matching or exceeding the generalization of symbolic synthesis methods. The SA system consists of two main modules: 1) a sketch generator and 2) a program synthesizer. Given an encoded input description, the sketch generator generates a distribution over program sketches. The generator is trained using a sequence-to-sequence recurrent neural network with attention to assign a high probability to sketches that are likely to yield programs satisfying the specification. The program synthesizer takes a sketch as a starting point and performs an explicit symbolic search to “fill in the holes” in order to find a program that satisfies the specification.
The pre-trained model, along with the relevant codebase, is available at https://github.com/mtensor/neural_sketch.
