Can We Use Deep Learning to Create New Programming Languages?

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

内容简介: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?》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

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

.net之美

.net之美

张子阳 / 机械工业出版社 / 2014-1-1 / 79

本书是.NET 程序员进阶修炼的必读之作,由拥有多年开发经验的资深.NET 技术专家对C# 和.NET 中实用的、关键的和难以理解的知识点进行了深入解析,旨在帮助读者在尽可能短的时间内以 尽可能低的学习成本去掌握那些最应该被掌握的知识。书中的每个知识点都辅之以精心设计的案例,易 于理解,实践性强。 全书共17 章,分为两个部分:第一部分(1~5 章)主要讲解了C# 语言中的一些关键知识点,如......一起来看看 《.net之美》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试