We present \textbf{calf}, a \textbf{c}ost-\textbf{a}ware \textbf{l}ogical \textbf{f}ramework for studying quantitative aspects of functional programs. Taking inspiration from recent work that reconstructs traditional aspects of programming languages in terms of a modal account of \emph{phase distinctions}, we argue that the cost structure of programs motivates a phase distinction between \emph{intension} and \emph{extension}. Armed with this technology, we contribute a synthetic account of cost structure as a computational effect in which cost-aware programs enjoy an internal noninterference property: input/output behavior cannot depend on cost. As a full-spectrum dependent type theory, \textbf{calf} presents a unified language for programming and specification of both cost and behavior that can be integrated smoothly with existing mathematical libraries available in type theoretic proof assistants. We evaluate \textbf{calf} as a general framework for cost analysis by implementing two fundamental techniques for algorithm analysis: the \emph{method of recurrence relations} and \emph{physicist's method for amortized analysis}. We deploy these techniques on a variety of case studies: we prove a tight, closed bound for Euclid's algorithm, verify the amortized complexity of batched queues, and derive tight, closed bounds for the sequential and \emph{parallel} complexity of merge sort, all fully mechanized in the Agda proof assistant. Lastly we substantiate the soundness of quantitative reasoning in \textbf{calf} by means of a model construction.


翻译:我们提出\ textbf{ calf}, compliclebf{ c}\ textbf{ c}\ textbf{c} textbf{ a} a} source communication 用于研究功能程序的数量方面。 我们从最近从重建编程语言的传统方面的工作中得到灵感, 其模式账户是 emph{ 阶段区别 。 我们争辩说, 程序的成本结构促使了 \ emph{ licticle{ text} 和\ emph{ extension} 之间的阶段区别。 有了这种技术, 我们贡献了一个成本结构的合成账户, 作为一种计算结果, 成本意识程序具有内部不干预属性: 输入/ 输出行为不能取决于成本 。 作为完全外观依赖型的理论,\ textbf{ calf} 提供了一种统一的语言, 用于编程和规范成本和行为, 并且可以与现有的精度缩缩缩缩缩缩缩缩缩缩缩图助手 。 我们评估了成本分析的一般框架, 通过两个基础技术进行成本验证分析, 。

0
下载
关闭预览

相关内容

专知会员服务
76+阅读 · 2021年7月31日
【干货书】机器学习速查手册,135页pdf
专知会员服务
123+阅读 · 2020年11月20日
专知会员服务
38+阅读 · 2020年9月6日
【CIKM2020】神经逻辑推理,Neural Logic Reasoning
专知会员服务
49+阅读 · 2020年8月25日
【新书】Python编程基础,669页pdf
专知会员服务
187+阅读 · 2019年10月10日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
CCF A类 | 顶级会议RTSS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年4月17日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Disentangled的假设的探讨
CreateAMind
9+阅读 · 2018年12月10日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
The Logic of Quantum Programs
Arxiv
0+阅读 · 2021年9月14日
Arxiv
0+阅读 · 2021年9月14日
Arxiv
0+阅读 · 2021年9月11日
Arxiv
10+阅读 · 2020年4月5日
Arxiv
9+阅读 · 2020年2月15日
Logic Rules Powered Knowledge Graph Embedding
Arxiv
7+阅读 · 2019年3月9日
Logically-Constrained Reinforcement Learning
Arxiv
3+阅读 · 2018年12月6日
Embedding Logical Queries on Knowledge Graphs
Arxiv
5+阅读 · 2018年9月6日
VIP会员
相关VIP内容
专知会员服务
76+阅读 · 2021年7月31日
【干货书】机器学习速查手册,135页pdf
专知会员服务
123+阅读 · 2020年11月20日
专知会员服务
38+阅读 · 2020年9月6日
【CIKM2020】神经逻辑推理,Neural Logic Reasoning
专知会员服务
49+阅读 · 2020年8月25日
【新书】Python编程基础,669页pdf
专知会员服务
187+阅读 · 2019年10月10日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
相关资讯
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
CCF A类 | 顶级会议RTSS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年4月17日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
强化学习的Unsupervised Meta-Learning
CreateAMind
17+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
Disentangled的假设的探讨
CreateAMind
9+阅读 · 2018年12月10日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
相关论文
The Logic of Quantum Programs
Arxiv
0+阅读 · 2021年9月14日
Arxiv
0+阅读 · 2021年9月14日
Arxiv
0+阅读 · 2021年9月11日
Arxiv
10+阅读 · 2020年4月5日
Arxiv
9+阅读 · 2020年2月15日
Logic Rules Powered Knowledge Graph Embedding
Arxiv
7+阅读 · 2019年3月9日
Logically-Constrained Reinforcement Learning
Arxiv
3+阅读 · 2018年12月6日
Embedding Logical Queries on Knowledge Graphs
Arxiv
5+阅读 · 2018年9月6日
Top
微信扫码咨询专知VIP会员