It has been pointed out that programs contain rich structural information, which is important to program modeling [1]}, [2]}. However, traditional Seq2Seq neural networks do not explicitly model program structures. Figure REF  shows an example of a Python abstract syntax tree (AST), where the two nodes \(\mathrm {n}_3\)  and \(\mathrm {n}_6\)  should have interacted intensively as parent-child nodes, but are far away from each other if the tree is pre-order traversed to a sequence. This brings difficulties to Seq2Seq models.
