arxivst stuff from arxiv that you should probably bookmark

Use Machine Learning to Write Your Code For You

Post · Apr 7, 2017 15:30 ·

code-generation python state-of-the-art cs-cl cs-pl cs-se

I am looking forward to the day when I can write a model that writes models for me. Maybe someone will turn it into an API and I won’t have to write anything. This paper gets us another step closer. Working with Python and other high-level languages, they have a new state of the art in code generation.

Highlights From the paper

  • “In order to capture the strong underlying syntax of the (programming language), we define a model that transduces (a natural language) statement into an Abstract Syntax Tree for the target (programming language). “
  • “Once we generate an (Abstract Syntax Tree), we can use deterministic generation tools to convert the AST into surface code.”

Arxiv Abstract

  • Pengcheng Yin
  • Graham Neubig

We consider the problem of parsing natural language descriptions into source code written in a general-purpose programming language like Python. Existing data-driven methods treat this problem as a language generation task without considering the underlying syntax of the target programming language. Informed by previous work in semantic parsing, in this paper we propose a novel neural architecture powered by a grammar model to explicitly capture the target syntax as prior knowledge. Experiments find this an effective way to scale up to generation of complex programs from natural language descriptions, achieving state-of-the-art results that well outperform previous code generation and semantic parsing approaches.

Read the paper (pdf) »