Abstract
Program synthesis aims to produce source code based on a user specification, raising the abstraction level of building systems and opening the potential for non-programmers to synthesise their own bespoke services. Both genetic programming (GP) and neural code synthesis have proposed a wide range of approaches to solving this problem, but both have limitations in generality and scope. We propose a hybrid search-based approach which combines (i) a genetic algorithm to autonomously generate a training corpus of programs centred around a set of highly abstracted hints describing interesting features; and (ii) a neural network which trains on this data and automatically refactors it towards a form which makes a more ideal use of the neural network’s representational capacity. When given an unseen program represented as a small set of input and output examples, our neural network is used to generate a rank-ordered search space of what it sees as the most promising programs; we then iterate through this list up to a given maximum search depth. Our results show that this approach is able to find up to 60% of a human-useful target set of programs that it has never seen before, including applying a clip function to the values in an array to restrict them to a given maximum, and offsetting all values in an array.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Balog, M., et al.: Deepcoder: Learning To Write Programs. ICLR (2017)
Chen, X., et al.: Towards synthesizing complex programs from input-output examples. ICLR, pp. 1–31 (2017)
Dabhi, V.K., Chaudhary, S.: Empirical modeling using genetic programming: a survey of issues and approaches. Nat. Comput. 14(2), 303–330 (2015)
Feng, Y., et al.: Program synthesis using conflict-driven learning, pp. 420–435 (2017)
Feser, J.K., Chaudhuri, S., Dillig, I.: Synthesizing data structure transformations from input-output examples. In: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation. PLDI 2015, pp. 229–239 (2015)
Graves, A., et al.: Neural turing machines. CoRR, pp. 1–26 (2014)
Graves, A., et al.: Hybrid computing using a neural network with dynamic external memory. Nature 538(7626), 471–476 (2016)
Gulwani, S.: Automating string processing in spreadsheets using input-output examples. In: ACM SIGPLAN Notices, vol. 46, no. (1), p. 317 (2011)
Hinton, G., Vinyals, O., Dean, J.: Distilling the knowledge in a neural network, pp. 1–9 (2015). http://arxiv.org/abs/1503.02531
Kaiser, Ł., Sutskever, I.: Neural GPUs Learn Algorithms. ICLR, pp. 1–9 (2015)
Kawaguchi, K., Bengio, Y.: Depth with nonlinearity creates no bad local minima in ResNets, pp. 1–14 (2018)
Petke, J., et al.: Genetic improvement of software: a comprehensive survey. IEEE Trans. Evol. Comput. 22(3), 415–432 (2018)
Renzullo, J., et al.: Neutrality and epistasis in program space, Gi, pp. 1–8 (2018)
Vijayakumar, A., et al.: Neural-guided deductive search for real-time program synthesis from examples. ICLR (2018)
Wu, S., Zhong, S., Liu, Y.: Deep residual learning for image steganalysis. Multimedia Tools Appl. 77(9), 10437–10453 (2017)
Yampolskiy, R.V.: Why we do not evolve software? Analysis of evolutionary algorithms. Evol. Bioinform. Online 14(1), 1176934318815906 (2018)
Acknowledgements
This work was supported by the Leverhulme Trust Research Project Grant The Emergent Data Centre, RPG-2017-166.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Wild, A., Porter, B. (2019). General Program Synthesis Using Guided Corpus Generation and Automatic Refactoring. In: Nejati, S., Gay, G. (eds) Search-Based Software Engineering. SSBSE 2019. Lecture Notes in Computer Science(), vol 11664. Springer, Cham. https://doi.org/10.1007/978-3-030-27455-9_7
Download citation
DOI: https://doi.org/10.1007/978-3-030-27455-9_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-27454-2
Online ISBN: 978-3-030-27455-9
eBook Packages: Computer ScienceComputer Science (R0)