Can We Use Deep Learning to Create New Programming Languages?

栏目: IT技术 · 发布时间: 4年前

内容简介:TransCoder form Facebook AI: Translation between high-level programming languagesI recently read aTranscompilers are generally used to transfer a code base written in a deprecated language to a more recent language. Currently used transcompilers are based

Can We Use Deep Learning to Create New Programming Languages?

TransCoder form Facebook AI: Translation between high-level programming languages

Photo by Karl Pawlowicz on Unsplash

I recently read a paper published by Marie-Anne Lachaux, Baptiste Roziere, Lowik Chanussot, Guillaume Lample from Facebook AI Research on 5 June, 2020. It is about a transcompiler created by neural networks. A transcompiler is basically a system that translates source codes between high-level programming languages (e.g. from C++ to Python).

Transcompilers are generally used to transfer a code base written in a deprecated language to a more recent language. Currently used transcompilers are based on hand-crafted rules which means lots of manual work and sensitive to mistakes. Furthermore, it requires expertise in both source and target programming language and manual modifications afterwards. Thus, the entire process becomes a tedious, time-consuming, and expensive task. According to an example given in the paper, Commonwealth Bank of Australia spent around $750 million and 5 years to convert its platform from COBOL to Java. It is just too much! Another programming language that fits better to your needs might be released in 5 years.

This inconvenient and laborious process motivated researchers of Facebook AI to create a transcompiler using neural networks. They were inspired by the advancements in natural language translation done by neural networks. One obstacle was the lack of training data. They overcomed this issue by downloading GitHub repositories available on Google BigQuery. To evaluate the model, they extracted a set of parallel functions in C++, Python, and Java frın GeeksforGeeks website. They also created a test set composed of 852 parallel functions. Their model, TransCoder, outperformed rule-based transcompilers by a significant margin. It translated the codes at function levels.

This paper made me think about a programming language designed by neural networks. If neural networks can translate code between high-level programming languages, they should be able to create a new one. Neural networks generate images, videos, news articles. Why not a programming language? I’m not an expert in software design or architecture but I think this paper shed light on what can be done in the future.

Deep learning models are data-hungry. Even if we build a highly-complex, well-structured model, the performance gets as good as the data we feed to it. The amount of data is a key factor in determining the robustness and accuracy of deep learning models. The researchers also mentioned about the lack of availability of data in this area. If we somehow manage to obtain lots of high-quality data, it does not seem impossible to create a new programming language with neural networks.

Photo by Artur Kraft on Unsplash

Crowdsourcing might be an option for data collection. For instance, CAPTCHA is used to digitize books by crowdsourcing. It was created as a challenge-response test to determine if a user is a human. We come across CAPTCHAs almost everyday. We are asked to type some letters that we see on the screen. The initial purpose was to provide security. Then, a brilliant idea comes to the mind of its creators. They saw the potential that there were millions of people typing words they see on a screen. So, they started to show people parts of scanned books. Eventually, lots of books have been digitized word-by-word by millions of people. This idea was taken one step further to create Duolingo, a free website to learn a new language. Here is the entire story told by its creator, Luis von Ahn.


以上所述就是小编给大家介绍的《Can We Use Deep Learning to Create New Programming Languages?》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

单元测试之道Java版

单元测试之道Java版

David Thomas、Andrew Hunt / 陈伟柱、陶文 / 电子工业 / 2005-1 / 25.00元

程序员修炼三部曲丛书包含了四本书,介绍了每个注重实效的程序员和成功团队所必备的一些工具。 注重实效的程序员都会利用反馈来指导开发,并驱动个人的开发流程。编码的时候,最有用的反馈来自于“单元测试”。 为了测试一座桥梁,不会只在晴朗的天气,开一辆汽车从桥中间穿过,就认为已经完成了对桥梁的测试。然而许多程序员却正在使用这种测试方法——把这种一次顺利通过称为“测试”。事实上,注重实效的程序员应......一起来看看 《单元测试之道Java版》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具