The main limitation and the most promising fu-
ture work seems to be allowing function compositions
where each function can take more than one non-fixed
parameter. This would allow our grammar to exp-
ress ZipWith, Scan1l, and other interesting compo-
sitions, like the composition that takes the first n ele-
ments of a list where n is the maximum element of the
list. This could be expressed as take(max(arr),arr),
if we allowed expressions as parameters.
Further experimenting with our neural network
might include using NTM cells (Graves et al., 2014)
instead of GRU cells, as NTM cells are shown to work
exceptionally well when learning simple algorithms,
such as sorting which is also present in our set of used
functions.
FlexCoder proved to be accurate and efficient even
when generalizing to input vectors with a length of
50, with much wider parameter ranges than current
systems. We hope that it represents a step towards the
wide application of program synthesis in real-world
scenarios.
ACKNOWLEDGEMENTS
The authors would like to express their gratitude to
Zsolt Borsi, Tibor Gregorics and Ter
´
ez A. V
´
arkonyi
for their valuable guidance. The materials were
produced as part of EFOP-3.6.3-VEKOP-16-2017-
00001: Talent Management in Autonomous Vehicle
Control Technologies. The Project is supported by the
Hungarian Government and co-financed by the Euro-
pean Social Fund.
REFERENCES
Balog, M., Gaunt, A. L., Brockschmidt, M., Nowozin, S.,
and Tarlow, D. (2016). Deepcoder: Learning to write
programs. arXiv preprint arXiv:1611.01989.
Bird, S., Klein, E., and Loper, E. (2009). Natural language
processing with Python: analyzing text with the natu-
ral language toolkit. ” O’Reilly Media, Inc.”.
Cho, K., Van Merri
¨
enboer, B., Gulcehre, C., Bahdanau, D.,
Bougares, F., Schwenk, H., and Bengio, Y. (2014).
Learning phrase representations using rnn encoder-
decoder for statistical machine translation. arXiv
preprint arXiv:1406.1078.
Chomsky, N. and Sch
¨
utzenberger, M. P. (1959). The al-
gebraic theory of context-free languages. In Studies
in Logic and the Foundations of Mathematics, vol-
ume 26, pages 118–161. Elsevier.
Feng, Y., Martins, R., Bastani, O., and Dillig, I. (2018).
Program synthesis using conflict-driven learning.
SIGPLAN Not., 53(4):420–435.
Graves, A., Wayne, G., and Danihelka, I. (2014). Neural
turing machines. arXiv preprint arXiv:1410.5401.
Gulwani, S. (2016). Programming by examples: App-
lications, algorithms, and ambiguity resolution. In
Olivetti, N. and Tiwari, A., editors, Automated Rea-
soning, pages 9–14, Cham. Springer International
Publishing.
Gulwani, S., Polozov, O., and Singh, R. (2017). Program
synthesis. Foundations and Trends
R
in Programming
Languages, 4(1-2):1–119.
Hochreiter, S. and Schmidhuber, J. (1997). Long short-term
memory. Neural computation, 9(8):1735–1780.
Kalyan, A., Mohta, A., Polozov, O., Batra, D., Jain, P., and
Gulwani, S. (2018). Neural-guided deductive search
for real-time program synthesis from examples. arXiv
preprint arXiv:1804.01186.
Kingma, D. P. and Ba, J. (2014). Adam: A
method for stochastic optimization. arXiv preprint
arXiv:1412.6980.
Klambauer, G., Unterthiner, T., Mayr, A., and Hochre-
iter, S. (2017). Self-normalizing neural networks. In
Advances in neural information processing systems,
pages 971–980.
Lee, W., Heo, K., Alur, R., and Naik, M. (2018).
Accelerating search-based program synthesis using
learned probabilistic models. ACM SIGPLAN Notices,
53(4):436–449.
Manna, Z. and Waldinger, R. (1975). Knowledge and rea-
soning in program synthesis. Artificial intelligence,
6(2):175–208.
Parisotto, E., rahman Mohamed, A., Singh, R., Li, L., Zhou,
D., and Kohli, P. (2016). Neuro-symbolic program
synthesis.
Schuster, M. and Paliwal, K. K. (1997). Bidirectional re-
current neural networks. IEEE transactions on Signal
Processing, 45(11):2673–2681.
Shapiro, E. Y. (1982). Algorithmic program debugging.
acm distinguished dissertation.
Yin, P., Zhou, C., He, J., and Neubig, G. (2018). Struct-
vae: Tree-structured latent variable models for semi-
supervised semantic parsing.
Zhang, W. (2002). Search techniques. In Handbook of data
mining and knowledge discovery, pages 169–184.
Zohar, A. and Wolf, L. (2018). Automatic program syn-
thesis of long programs with a learned garbage col-
lector. In Advances in Neural Information Processing
Systems, pages 2094–2103.
Flexcoder: Practical Program Synthesis with Flexible Input Lengths and Expressive Lambda Functions
395