Neural-Guided Inductive Synthesis of Functional Programs on List Manipulation by Offline Supervised Learning

Synthesizing intended programs from user-specified input-output examples, also known as Programming by Examples (PBE), is a challenging problem in program synthesis, and has been applied to a wide range of domains. A key challenge in PBE is to efficiently discover a user-intended program in the sear...

Full description

Bibliographic Details
Main Authors: Yuhong Wang, Xin Li
Format: Article
Language:English
Published: IEEE 2021-01-01
Series:IEEE Access
Subjects:
Online Access:https://ieeexplore.ieee.org/document/9427519/
id doaj-ec9834cfe0bd4df1a3b25cc22e73b9cc
record_format Article
spelling doaj-ec9834cfe0bd4df1a3b25cc22e73b9cc2021-05-27T23:02:42ZengIEEEIEEE Access2169-35362021-01-019715217153410.1109/ACCESS.2021.30793519427519Neural-Guided Inductive Synthesis of Functional Programs on List Manipulation by Offline Supervised LearningYuhong Wang0https://orcid.org/0000-0002-4729-3424Xin Li1https://orcid.org/0000-0002-0010-5158Shanghai Key Laboratory of Trustworthy Computing, East China Normal University, Shanghai, ChinaShanghai Key Laboratory of Trustworthy Computing, East China Normal University, Shanghai, ChinaSynthesizing intended programs from user-specified input-output examples, also known as Programming by Examples (PBE), is a challenging problem in program synthesis, and has been applied to a wide range of domains. A key challenge in PBE is to efficiently discover a user-intended program in the search space that can be exponentially large. In this work, we propose a method for automatic synthesis of functional programs on list manipulation, by using offline-trained Recurrent Neural Network (RNN) models to guide the program search. We adopt miniKanren, an embedded domain-specific language for flexible relational programming, as an underlying top-down deductive search engine of candidate programs that are consistent with input-output examples. Our approach targets an easy and effective integration of deep learning techniques in making better PBE systems and combines two technical ideas on generating diverse training dataset and designing rich feature embeddings of probable subproblems for synthesis generated by deductive search. The offline-learned model is then used in PBE to guide the top-down deductive search with specific strategies. To practically manipulate data structures of lists, our method synthesizes functional programs with popular higher-order combinators including <inline-formula> <tex-math notation="LaTeX">$\texttt {map}$ </tex-math></inline-formula>, <inline-formula> <tex-math notation="LaTeX">$\texttt {foldl}$ </tex-math></inline-formula> and <inline-formula> <tex-math notation="LaTeX">$\texttt {foldr}$ </tex-math></inline-formula>. We have implemented our method and evaluated it with challenging program synthesis tasks on list manipulation. The experiments show promising results on the performance of our method compared to related state-of-the-art inductive synthesizers.https://ieeexplore.ieee.org/document/9427519/Programming by examplesfunctional programsminiKanrenrelational programmingdeep learningdeductive search
collection DOAJ
language English
format Article
sources DOAJ
author Yuhong Wang
Xin Li
spellingShingle Yuhong Wang
Xin Li
Neural-Guided Inductive Synthesis of Functional Programs on List Manipulation by Offline Supervised Learning
IEEE Access
Programming by examples
functional programs
miniKanren
relational programming
deep learning
deductive search
author_facet Yuhong Wang
Xin Li
author_sort Yuhong Wang
title Neural-Guided Inductive Synthesis of Functional Programs on List Manipulation by Offline Supervised Learning
title_short Neural-Guided Inductive Synthesis of Functional Programs on List Manipulation by Offline Supervised Learning
title_full Neural-Guided Inductive Synthesis of Functional Programs on List Manipulation by Offline Supervised Learning
title_fullStr Neural-Guided Inductive Synthesis of Functional Programs on List Manipulation by Offline Supervised Learning
title_full_unstemmed Neural-Guided Inductive Synthesis of Functional Programs on List Manipulation by Offline Supervised Learning
title_sort neural-guided inductive synthesis of functional programs on list manipulation by offline supervised learning
publisher IEEE
series IEEE Access
issn 2169-3536
publishDate 2021-01-01
description Synthesizing intended programs from user-specified input-output examples, also known as Programming by Examples (PBE), is a challenging problem in program synthesis, and has been applied to a wide range of domains. A key challenge in PBE is to efficiently discover a user-intended program in the search space that can be exponentially large. In this work, we propose a method for automatic synthesis of functional programs on list manipulation, by using offline-trained Recurrent Neural Network (RNN) models to guide the program search. We adopt miniKanren, an embedded domain-specific language for flexible relational programming, as an underlying top-down deductive search engine of candidate programs that are consistent with input-output examples. Our approach targets an easy and effective integration of deep learning techniques in making better PBE systems and combines two technical ideas on generating diverse training dataset and designing rich feature embeddings of probable subproblems for synthesis generated by deductive search. The offline-learned model is then used in PBE to guide the top-down deductive search with specific strategies. To practically manipulate data structures of lists, our method synthesizes functional programs with popular higher-order combinators including <inline-formula> <tex-math notation="LaTeX">$\texttt {map}$ </tex-math></inline-formula>, <inline-formula> <tex-math notation="LaTeX">$\texttt {foldl}$ </tex-math></inline-formula> and <inline-formula> <tex-math notation="LaTeX">$\texttt {foldr}$ </tex-math></inline-formula>. We have implemented our method and evaluated it with challenging program synthesis tasks on list manipulation. The experiments show promising results on the performance of our method compared to related state-of-the-art inductive synthesizers.
topic Programming by examples
functional programs
miniKanren
relational programming
deep learning
deductive search
url https://ieeexplore.ieee.org/document/9427519/
work_keys_str_mv AT yuhongwang neuralguidedinductivesynthesisoffunctionalprogramsonlistmanipulationbyofflinesupervisedlearning
AT xinli neuralguidedinductivesynthesisoffunctionalprogramsonlistmanipulationbyofflinesupervisedlearning
_version_ 1721425266075500544