[1]} dong2016language propose to generate an executable command by following the AST, but they predict child nodes \(n_1\cdots n_k\)  one at a time with an RNN. In our study, we follow more recent work [2]}, [3]}, [4]}, predicting the rules \(\mathrm {r}_1, \mathrm {r}_2,\cdots ,\mathrm {r}_M\)  that generate the program. We traverse the tree in depth-first pre-order, and for the first encountered non-terminal symbol, we predict what rule should be used to expand it. In other words, the probability of a program is decomposed as
\(p(\text{program})=\prod \nolimits _{n=1}^M p(\mathrm {r}_n|\mathrm {r}_1\cdots ,\mathrm {r}_{n-1})\) 
