Predictive Synthesis of API-Centric Code

01/11/2022
by   Daye Nam, et al.
0

Today's programmers, especially data science practitioners, make heavy use of data-processing libraries (APIs) such as PyTorch, Tensorflow, NumPy, Pandas, and the like. Program synthesizers can provide significant coding assistance to this community of users; however program synthesis also can be slow due to enormous search spaces. In this work, we examine ways in which machine learning can be used to accelerate enumerative program synthesis. We present a deep-learning-based model to predict the sequence of API functions that would be needed to go from a given input to a desired output, both being numeric vectors. Our work is based on two insights. First, it is possible to learn, based on a large number of input-output examples, to predict the likely API function needed in a given situation. Second, and crucially, it is also possible to learn to compose API functions into a sequence, given an input and the desired final output, without explicitly knowing the intermediate values. We show that we can speed up an enumerative program synthesizer by using predictions from our model variants. These speedups significantly outperform previous ways (e.g. DeepCoder) in which researchers have used ML models in enumerative synthesis.

READ FULL TEXT
research
04/14/2017

Deep API Programmer: Learning to Program with APIs

We present DAPIP, a Programming-By-Example system that learns to program...
research
12/01/2020

Latent Programmer: Discrete Latent Codes for Program Synthesis

In many sequence learning tasks, such as program synthesis and document ...
research
02/12/2021

SOAR: A Synthesis Approach for Data Science API Refactoring

With the growth of the open-source data science community, both the numb...
research
07/28/2020

BUSTLE: Bottom-up program-Synthesis Through Learning-guided Exploration

Program synthesis is challenging largely because of the difficulty of se...
research
03/19/2020

TF-Coder: Program Synthesis for Tensor Manipulations

The success and popularity of deep learning is on the rise, partially du...
research
09/25/2017

Glass-Box Program Synthesis: A Machine Learning Approach

Recently proposed models which learn to write computer programs from dat...
research
05/24/2023

Gorilla: Large Language Model Connected with Massive APIs

Large Language Models (LLMs) have seen an impressive wave of advances re...

Please sign up or login with your details

Forgot password? Click here to reset