arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.06396cs.PLcs.SE
收藏

FreeST 编程语言的种类推断

Kind Inference for the FreeST Programming Language

Bernardo Almeida, Andreia Mordido, Vasco T. Vasconcelos

AI总结:

本文提出了一种面向 FREEST 编程语言的种类推断算法,通过将种类标注替换为种类变量来推断具体种类,实验表明该算法在测试套件上能正确推断所有种类,并发现程序员在 20% 的情况下未选择最通用的种类。

摘要:

我们为 FREEST 编程语言提出了一种种类推断算法。该算法的输入是将(可能部分)种类标注替换为种类变量的 FREEST 源代码。该算法为所有种类变量推断出具体种类。我们在 FREEST 测试套件上运行了该算法,首先将所有类型变量上的种类标注替换为新的种类变量,并得出结论:该算法正确地推断出了所有种类。毫不意外的是,我们发现程序员在 20% 的情况下并未选择最通用的种类。

英文摘要:

We present a kind inference algorithm for the FREEST programming language. The input to the algorithm is FREEST source code with (possibly part of) kind annotations replaced by kind variables. The algorithm infers concrete kinds for all kind variables. We ran the algorithm on the FREEST test suite by first replacing kind annotation on all type variables by fresh kind variables, and concluded that the algorithm correctly infers all kinds. Non surprisingly, we found out that programmers do not choose the most general kind in 20% of the cases.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑