We conducted experiments on an established benchmark dataset, HearthStone, for python code generation [1]}. Experimental results show that our CNN-based code generator outperforms previous RNN approaches to a large extent. We further evaluate our approach on two semantic parsing tasks, where the target programs are shorter than HearthStone; our approach also achieves comparable results to previous state-of-the-art methods, indicating the robustness of our method. We conducted extensive ablation tests, showing that our design of grammar-based structural CNN is better than applying CNN in a naïve fashion.
