A cost-aware logical framework

Author:

Niu Yue1ORCID,Sterling Jonathan2ORCID,Grodin Harrison1ORCID,Harper Robert1ORCID

Affiliation:

1. Carnegie Mellon University, USA

2. Aarhus University, Denmark

Abstract

We present calf , a c ost- a ware l ogical 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 phase distinctions , we argue that the cost structure of programs motivates a phase distinction between intension and 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, 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 calf as a general framework for cost analysis by implementing two fundamental techniques for algorithm analysis: the method of recurrence relations and 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 parallel complexity of merge sort, all fully mechanized in the Agda proof assistant. Lastly we substantiate the soundness of quantitative reasoning in calf by means of a model construction.

Funder

NSF

Air Force Office of Scientific Research

Air Force Research Laboratory

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference74 articles.

1. Umut A. Acar and Guy E . Blelloch . 2019 . Algorithms : Parallel and Sequential . http:www.algorithms-book.com Umut A. Acar and Guy E. Blelloch. 2019. Algorithms: Parallel and Sequential. http:www.algorithms-book.com

2. Type theory in type theory using quotient inductive types

3. Topo-logie

4. Robert Atkey . 2010. Amortised Resource Analysis with Separation Logic . In Programming Languages and Systems, Andrew D. Gordon (Ed.). Springer Berlin Heidelberg , Berlin, Heidelberg . 85–103. isbn:978-3-642-1 1957 -6 Robert Atkey. 2010. Amortised Resource Analysis with Separation Logic. In Programming Languages and Systems, Andrew D. Gordon (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 85–103. isbn:978-3-642-11957-6

Cited by 6 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Story of Your Lazy Function’s Life: A Bidirectional Demand Semantics for Mechanized Cost Analysis of Lazy Programs;Proceedings of the ACM on Programming Languages;2024-08-15

2. Robust Resource Bounds with Static Analysis and Bayesian Inference;Proceedings of the ACM on Programming Languages;2024-06-20

3. Polynomial Time and Dependent Types;Proceedings of the ACM on Programming Languages;2024-01-05

4. Decalf: A Directed, Effectful Cost-Aware Logical Framework;Proceedings of the ACM on Programming Languages;2024-01-05

5. A Metalanguage for Cost-Aware Denotational Semantics;2023 38th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS);2023-06-26

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3