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.


翻译:资源智能型系统不仅静态地近似一个程序的预期结果类型,而且静态地近似外部资源的使用方式,例如需要变量价值的多少倍。我们扩展了Featherweight Java 类型系统,使之具有资源认知度,对任意的等级代数进行模拟,以特定资源使用量进行特定的使用量。我们证明这种类型系统对于资源认知值的递减版本来说是健全的,也就是说,一个类型良好的程序有一个递减序列,不会因资源消耗而卡住。此外,我们表明,现有的等级可以是多样化的,通过将不同等级合并,通过从一种类型到另一种类型的同质性最小的集合获得的。最后,我们展示了如何将等级变数和同质性指定为 Java 类,这样就可以用语言本身写出等级说明。

0
下载
关闭预览

相关内容

Java 是一门编程语言,拥有跨平台、面向对象、泛型编程等特性。
Linux导论,Introduction to Linux,96页ppt
专知会员服务
82+阅读 · 2020年7月26日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
VCIP 2022 Call for Demos
CCF多媒体专委会
1+阅读 · 2022年6月6日
全球首个GNN为主的AI创业公司,募资$18.5 million!
图与推荐
1+阅读 · 2022年4月16日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
【推荐】深度学习目标检测全面综述
机器学习研究会
21+阅读 · 2017年9月13日
【推荐】用Tensorflow理解LSTM
机器学习研究会
36+阅读 · 2017年9月11日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
VIP会员
相关VIP内容
Linux导论,Introduction to Linux,96页ppt
专知会员服务
82+阅读 · 2020年7月26日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
相关资讯
VCIP 2022 Call for Demos
CCF多媒体专委会
1+阅读 · 2022年6月6日
全球首个GNN为主的AI创业公司,募资$18.5 million!
图与推荐
1+阅读 · 2022年4月16日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
【推荐】深度学习目标检测全面综述
机器学习研究会
21+阅读 · 2017年9月13日
【推荐】用Tensorflow理解LSTM
机器学习研究会
36+阅读 · 2017年9月11日
相关基金
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员