Glass-Box Program Synthesis: A Machine Learning Approach

Recently proposed models which learn to write computer programs from data use either input/output examples or rich execution traces. Instead, we argue that a novel alternative is to use a glass-box loss function, given as a program itself that can be directly inspected. Glass-box optimization covers a wide range of problems, from computing the greatest common divisor of two integers, to learning-to-learn problems. In this paper, we present an intelligent search system which learns, given the partial program and the glass-box problem, the probabilities over the space of programs. We empirically demonstrate that our informed search procedure leads to significant improvements compared to brute-force program search, both in terms of accuracy and time. For our experiments we use rich context free grammars inspired by number theory, text processing, and algebra. Our results show that (i) performing 4 rounds of our framework typically solves about 70 of the target problems, (ii) our framework can improve itself even in domain agnostic scenarios, and (iii) it can solve problems that would be otherwise too slow to solve with brute-force search.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/21/2017

Synthesizing Imperative Programs from Examples Guided by Static Analysis

We present a novel algorithm that synthesizes imperative programs for in...
research
09/17/2012

Textual Features for Programming by Example

In Programming by Example, a system attempts to infer a program from inp...
research
10/24/2021

Scaling Neural Program Synthesis with Distribution-based Search

We consider the problem of automatically constructing computer programs ...
research
06/13/2022

Metric Program Synthesis

We present a new domain-agnostic synthesis technique for generating prog...
research
03/15/2023

WikiCoder: Learning to Write Knowledge-Powered Code

We tackle the problem of automatic generation of computer programs from ...
research
01/11/2022

Predictive Synthesis of API-Centric Code

Today's programmers, especially data science practitioners, make heavy u...
research
05/23/2017

Explaining Transition Systems through Program Induction

Explaining and reasoning about processes which underlie observed black-b...

Please sign up or login with your details

Forgot password? Click here to reset