This paper explores the capabilities of current transformer-based language models for program evaluation of simple functional programming languages. We introduce a new program generation mechanism that allows control over syntactic sugar for semantically equivalent programs. T5 experiments reveal that neural functional program evaluation performs surprisingly well, achieving high 90% exact program match scores for most in-distribution and out-of-distribution tests. Using pretrained T5 weights has significant advantages over random initialization. We present and evaluate on three datasets to study generalization abilities that are specific to functional programs based on: type, function composition, and reduction steps. Code and data are publicly available at https://github.com/ElementAI/neural-interpreters.
翻译:本文探讨了目前基于变压器的语言模式对简单功能性编程语言进行方案评价的能力。我们引入了一种新的方案生成机制,允许控制语义等同方案的合成糖。T5实验显示,神经功能性方案评价表现出惊人的好,达到90%的精确程序与大部分分布和分配外测试的得分相当。使用预先培训的T5重量比随机初始化有很大的优势。我们介绍并评价了三个数据集,以研究功能性方案特有的概括能力,其依据是:类型、功能构成和削减步骤。代码和数据可在https://github.com/ElementAI/neural-interpreties上公开查阅。