arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2302.07782cs.PL
收藏

多级轻量级Java

Multi-graded Featherweight Java

Riccardo Bianchini, Francesco Dagnino, Paola Giannini, Elena Zucca

摘要:

资源感知类型系统不仅静态地近似于程序的预期结果类型,而且还近似于外部资源的使用方式,例如,一个变量的值需要多少次。我们扩展了Featherweight Java的类型系统,使其具有资源感知能力,并在任意级别的代数上对资源的特定使用进行参数化建模。我们证明,这种类型的系统是健全的,相对于一个资源感知版本的减少,也就是说,一个良好的类型的程序有一个减少序列不会卡住,由于资源消耗。此外,我们表明,可用的等级可以是异质的,也就是说,通过组合不同种类的等级,通过从一种到另一种同态的最小集合。最后,我们将展示等级代数和同态如何可以指定为Java类,以便可以用语言本身编写类型中的等级注释。

英文摘要:

Resource-aware type systems statically approximate not only the expected result type of a program, but also the way external resources are used, e.g., how many times the value of a variable is needed. We extend the type system of Featherweight Java to be resource-aware, parametrically on an arbitrary grade algebra modeling a specific usage of resources. We prove that this type system is sound with respect to a resource-aware version of reduction, that is, a well-typed program has a reduction sequence which does not get stuck due to resource consumption. Moreover, we show that the available grades can be heterogeneous, that is, obtained by combining grades of different kinds, via a minimal collection of homomorphisms from one kind to another. Finally, we show how grade algebras and homomorphisms can be specified as Java classes, so that grade annotations in types can be written in the language itself.

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

↑