Static resource analysis determines the resource consumption (e.g., time complexity) of a program without executing it. Among the numerous existing approaches for resource analysis, affine type systems have been one dominant approach. However, these affine type systems fall short of deriving precise resource behavior of higher-order programs, particularly in cases that involve partial applications. This article presents λ_\ms{amor}^\ms{na}}, a non-affine AARA-style dependent type system for resource reasoning about higher-order functional programs. The key observation is that the main issue in previous approaches comes from (i) the close coupling of types and resources, and (ii) the conflict between affine and higher-order typing mechanisms. To derive precise resource behavior of higher-order functions, λ_\ms{amor}^\ms{na}} decouples resources from types and follows a non-affine typing mechanism. The non-affine type system of λ_\ms{amor}^\ms{na}} achieves this by using dependent types, which allows expressing type-level potential functions separate from ordinary types. This article formalizes λ_\ms{amor}^\ms{na}}'s syntax and semantics, and proves its soundness, which guarantees the correctness of resource bounds. Several challenging classic and higher-order examples are presented to demonstrate the expressiveness and compositionality of λ_\ms{amor}^\ms{na}}'s reasoning capability.


翻译:静态资源分析无需执行程序即可确定其资源消耗(例如时间复杂度)。在现有的众多资源分析方法中,仿射类型系统一直是主流方法之一。然而,这些仿射类型系统难以推导高阶程序的精确资源行为,尤其是在涉及部分应用的情况下。本文提出λ_\ms{amor}^\ms{na}},一种用于高阶函数式程序资源推理的非仿射AARA风格依赖类型系统。关键观察在于:先前方法的主要问题源于(i)类型与资源的紧密耦合,以及(ii)仿射类型机制与高阶类型机制之间的冲突。为推导高阶函数的精确资源行为,λ_\ms{amor}^\ms{na}}将资源与类型解耦,并采用非仿射类型机制。该非仿射类型系统通过使用依赖类型实现这一目标,使得类型级势函数能够独立于普通类型进行表达。本文形式化了λ_\ms{amor}^\ms{na}}的语法与语义,并证明其可靠性——这保证了资源界限的正确性。文中通过若干具有挑战性的经典高阶示例,展示了λ_\ms{amor}^\ms{na}}推理能力的表达性与组合性。

0
下载
关闭预览

相关内容

多媒体系统(MS)期刊详细介绍了多媒体计算,通信,存储和应用的各个方面的创新研究思想,新兴技术,最新方法和工具。它包含理论,实验和调查文章。多媒体系统的覆盖范围包括:在计算机系统中集成数字视频和音频功能;多媒体信息编码和数据交换格式;数字多媒体的操作系统机制;数字视频和音频网络与通信;存储模型和结构;用于支持多媒体应用程序的方法、范式、工具和软件体系结构;多媒体应用程序和应用程序接口,以及多媒体终端系统架构。 官网地址:http://dblp.uni-trier.de/db/journals/mms/
TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
【Mila】通用表示Transformer少样本图像分类
专知会员服务
33+阅读 · 2020年9月7日
【AAAI2021】对比聚类,Contrastive Clustering
专知
26+阅读 · 2021年1月30日
目标跟踪算法分类
大数据技术
13+阅读 · 2018年9月17日
R语言之数据分析高级方法「时间序列」
R语言中文社区
17+阅读 · 2018年4月24日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
14+阅读 · 2008年12月31日
VIP会员
相关VIP内容
TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
【Mila】通用表示Transformer少样本图像分类
专知会员服务
33+阅读 · 2020年9月7日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
14+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员