Decalf: A Directed, Effectful Cost-Aware Logical Framework
Harrison Grodin, Yue Niu, Jonathan Sterling, Robert Harper
摘要
We present decalf , a d irected, e ffectful c ost- a ware l ogical f ramework for studying quantitative aspects of functional programs with effects. Like calf , the language is based on a formal phase distinction between the extension and the intension of a program, its pure behavior as distinct from its cost measured by an effectful step-counting primitive. The type theory ensures that the behavior is unaffected by the cost accounting. Unlike calf , the present language takes account of effects , such as probabilistic choice and mutable state. This extension requires a reformulation of calf ’s approach to cost accounting: rather than rely on a “separable” notion of cost, here a cost bound is simply another program . To make this formal, we equip every type with an intrinsic preorder, relaxing the precise cost accounting intrinsic to a program to a looser but nevertheless informative estimate. For example, the cost bound of a probabilistic program is itself a probabilistic program that specifies the distribution of costs. This approach serves as a streamlined alternative to the standard method of isolating a cost recurrence and readily extends to higher-order, effectful programs. The development proceeds by first introducing the decalf type system, which is based on an intrinsic ordering among terms that restricts in the extensional phase to extensional equality, but in the intensional phase reflects an approximation of the cost of a program of interest. This formulation is then applied to a number of illustrative examples, including pure and effectful sorting algorithms, simple probabilistic programs, and higher-order functions. Finally, we justify decalf via a model in the topos of augmented simplicial sets.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- A cost-aware logical framework 引用了 The fire triangle: how to mix substitution, dependent elimination, and effects
- A cost-aware logical framework 引用了 A unifying type-theory for higher-order (amortized) cost analysis
- A cost-aware logical framework 引用了 Recurrence extraction for functional programs through call-by-push-value
- Handling Higher-Order Effectful Operations with Judgemental Monadic Laws 引用了 A cost-aware logical framework
- Integrating Resource Analyses via Resource Decomposition 引用了 A cost-aware logical framework
- Integrating Resource Analyses via Resource Decomposition 引用了 Recurrence extraction for functional programs through call-by-push-value
- A unifying type-theory for higher-order (amortized) cost analysis 引用了 Recurrence extraction for functional programs through call-by-push-value
- Automatic Linear Resource Bound Analysis for Rust via Prophecy Potentials 引用了 A cost-aware logical framework
- Automatic Linear Resource Bound Analysis for Rust via Prophecy Potentials 引用了 A unifying type-theory for higher-order (amortized) cost analysis
- Automatic Linear Resource Bound Analysis for Rust via Prophecy Potentials 引用了 Recurrence extraction for functional programs through call-by-push-value
- Denotational Foundations for Expected Cost Analysis 引用了 A cost-aware logical framework
- Denotational Foundations for Expected Cost Analysis 引用了 A unifying type-theory for higher-order (amortized) cost analysis
- Denotational Foundations for Expected Cost Analysis 引用了 Recurrence extraction for functional programs through call-by-push-value
- Abstraction Functions as Types: Modular Verification of Cost and Behavior in Dependent Type Theory 引用了 The fire triangle: how to mix substitution, dependent elimination, and effects
- Abstraction Functions as Types: Modular Verification of Cost and Behavior in Dependent Type Theory 引用了 A cost-aware logical framework
引用它的顶会 Paper6
- Denotational Foundations for Expected Cost AnalysisPedro H. Azevedo de AmorimOOPSLA 2025 · 4 次引用
- Abstraction Functions as Types: Modular Verification of Cost and Behavior in Dependent Type TheoryHarrison Grodin, Runming Li, Robert HarperPOPL 2026 · 2 次引用
- Automatic Linear Resource Bound Analysis for Rust via Prophecy PotentialsQihao Lian, Di WangOOPSLA 2025 · 1 次引用
- Handling Higher-Order Effectful Operations with Judgemental Monadic LawsZhixuan Yang, Nicolas WuPOPL 2026
- Integrating Resource Analyses via Resource DecompositionLong Pham, Yue Niu, Nathaniel Glover, Feras Saad 等OOPSLA 2025
它引用的 Paper4
- The fire triangle: how to mix substitution, dependent elimination, and effectsPierre-Marie Pédrot, Nicolas TabareauPOPL 2020 · 42 次引用
- A unifying type-theory for higher-order (amortized) cost analysisVineet Rajani, Marco Gaboardi, Deepak Garg, Jan HoffmannPOPL 2021 · 26 次引用
- A cost-aware logical frameworkYue Niu, Jonathan Sterling, Harrison Grodin, Robert HarperPOPL 2022 · 23 次引用
- Recurrence extraction for functional programs through call-by-push-valueG. A. Kavvos, Edward Morehouse, Daniel R. Licata, Norman DannerPOPL 2020 · 20 次引用
相关 Paper
- A Metalanguage for Cost-Aware Denotational SemanticsYue Niu, Robert HarperLICS 2023 · 5 次引用
- Semantics for variational Quantum programmingXiaodong Jia, Andre Kornell, Bert Lindenhovius, Michael W. Mislove 等POPL 2022 · 15 次引用
- Effectful program distancingUgo Dal Lago, Francesco GavazzoPOPL 2022 · 7 次引用
- On Model-Checking Higher-Order Effectful ProgramsUgo Dal Lago, Alexis GhyselenPOPL 2024 · 10 次引用
- A Modal Type Theory of Expected Cost in Higher-Order Probabilistic ProgramsVineet Rajani, Gilles Barthe, Deepak GargOOPSLA 2024 · 3 次引用
