about
Program Synthesis and Semantic Parsing with Learned Code Idioms (arxiv.org)
1 point by matt_d on Sep 4, 2019 | hide | past | pdf | discuss on HN

In plain words: The system mines recurring code patterns from a corpus and lets a code generator use them as ready-made building blocks, mixing big-picture structure with fine details at every step. On two sentence-to-code tasks, this beat generating code piece by piece without such patterns.

Abstract

Program synthesis of general-purpose source code from natural language specifications is challenging due to the need to reason about high-level patterns in the target program and low-level implementation details at the same time. In this work, we present PATOIS, a system that allows a neural program synthesizer to explicitly interleave high-level and low-level reasoning at every generation step. It accomplishes this by automatically mining common code idioms from a given corpus, incorporating them into the underlying language for neural synthesis, and training a tree-based neural synthesizer to use these idioms during code generation. We evaluate PATOIS on two complex semantic parsing datasets and show that using learned code idioms improves the synthesizer's accuracy.

Richard Shin, Miltiadis Allamanis, Marc Brockschmidt, Oleksandr Polozov
arXiv:1906.10816 · cs.LG, cs.AI, cs.CL, cs.PL, stat.ML · submitted Jun 26, 2019 · updated Nov 5, 2019
abstract · pdf · html · 33rd Conference on Neural Information Processing Systems (NeurIPS) 2019. 13 pages total, 9 pages of main text

add comment on HN