Artificial Intelligence for the conversion between programming languages

(To Alessandro Rugolo)
03/08/20

We are no longer surprised when we hear about Artificial intelligence, as Alan Turing predicted 70 years ago, in his essay "Computing Machinery and Intelligence". We are not even surprised to see the evolution of an anthropomorphic robot, equipped with sensors, able to speak, write, play chess or perform the most disparate tasks.

Technology is moving fast and we are one step away from seeing a new race, more evolved, that of cyborgs circulating among the human race ...

You might think, at first glance, that the lines just read come from some anthology of the fantastic, of those much in vogue thirty years ago among the heated readers of the Italian beaches, but it is not so, it is reality.

Artificial Intelligence has now passed the test phase and is preparing to enter forcefully into our everyday life, the daily life of the man on the street and the working life of companies.

From the world of social networks, facebook, there is a novelty on the use of Artificial Intelligence: "Facebook's AI Transcoder". Let's see what it's about.

They are the Facebook researchers who have created the first "Neural Transcompiler", a code converter for programming languages. It is an AI-based system capable of converting the code of high-level programming languages ​​(Java, Python, C ++ ...) into other programming languages ​​and vice versa.

The system created belongs to the category called "Unsupervised", ie without the need for instruction on training data and, theoretically, without the need for human supervision.

The need to convert programming code between different languages ​​is very much felt. With the evolution of information technology and the development of different programming languages ​​it has been seen that the transition to new systems or information platforms was not always cheap and feasible due to the lack of knowledge of older programming languages.

For the passage of large systems, for example the banking ones, the costs have become exorbitant and here the new could come into play neural transcompiler.
The new system is based on the use of a "cross-lingual language" (for the pre-training phase) which maps expressions with similar meaning of the different programming languages.

The accuracy of the new system is very high, at least in the transition between C ++ and Java (it reaches 74,8%), while it drops to 67,2% when it comes to moving from C ++ to Python.
Even better results are obtained in the transition from Java to C ++ (91,6%).
More modest accuracy for the transition from Python to Java (56,1%) and from Python to C ++ (57,8%).

In the industrial and military world, it is not strange to find decades-old systems still in use because of the impossibility of conversion and the enormous costs to be incurred for modernization, in this market sector, not small, the new instrument is positioned.
It will take some time to improve the accuracy of the system, especially for the conversion from systems made with older languages ​​to more recent ones, but the road seems definitively open.

From a security point of view, this is a completely different matter and will have to be studied from case to case.

To learn more:
https://medium.com/@learnbay/facebooks-ai-transcoder-6299a62bf222
https://medium.com/@learnbay/facebooks-ai-transcoder-6299a62bf222
https://www.infoq.com/news/2020/06/facebook-ai-transpiler/
https://medium.com/swlh/transcoder-facebooks-unsupervised-programming-la...