Facebook engineers published a transcompiler
The implementation of the machine learning system is based on Pytorch. Two ready-made models are offered for download:
C++ to Python, Python to C++ and Python to Java. To train the models, the source code of the projects hosted on GitHub was used. If desired, translation models can be created for other programming languages. To check the quality of the translation, a collection of unit tests has been prepared, as well as a test suite that includes 852 parallel functions.
TransCoder is claimed to be significantly superior in conversion accuracy to commercial translators using conversion rule-based methods, and in the process eliminates the need for peer review by experts in the source and target languages. Most of the errors that occur during the operation of the model can be eliminated by adding simple restrictions to the decoder to ensure that the generated functions will be syntactically correct.
Researchers have proposed a new neural network architecture "Transformer" for modeling sequences, in which recurrence is replaced by "
Source: opennet.ru