Program Language Translation Using a Grammar-Driven Tree-to-Tree Model

  • 2018-07-04 21:19:00
  • Mehdi Drissi, Olivia Watkins, Aditya Khant, Vivaswat Ojha, Pedro Sandoval, Rakia Segev, Eric Weiner, Robert Keller
  • 21


The task of translating between programming languages differs from thechallenge of translating natural languages in that programming languages aredesigned with a far more rigid set of structural and grammatical rules.Previous work has used a tree-to-tree encoder/decoder model to take advantageof the inherent tree structure of programs during translation. Neural decoders,however, by default do not exploit known grammar rules of the target language.In this paper, we describe a tree decoder that leverages knowledge of alanguage's grammar rules to exclusively generate syntactically correctprograms. We find that this grammar-based tree-to-tree model outperforms thestate of the art tree-to-tree model in translating between two programminglanguages on a previously used synthetic task.


Introduction (beta)



Conclusion (beta)