Robust Resource Bounds with Static Analysis and Bayesian Inference
摘要
There are two approaches to automatically deriving symbolic worst-case resource bounds for programs: static analysis of the source code and data-driven analysis of cost measurements obtained by running the program. Static resource analysis is usually sound but incomplete. Data-driven analysis can always return a result, but its lack of robustness often leads to unsound results. This paper presents the design, implementation, and empirical evaluation of hybrid resource bound analyses that tightly integrate static analysis and data-driven analysis. The static analysis part builds on automatic amortized resource analysis (AARA), a state-of-the-art type-based resource analysis method that performs cost bound inference using linear optimization. The data-driven part is rooted in novel Bayesian modeling and inference techniques that improve upon previous data-driven analysis methods by reporting an entire probability distribution over likely resource cost bounds.
A key innovation is a new type inference system called Hybrid AARA that coherently integrates Bayesian inference into conventional AARA, combining the strengths of both approaches. Hybrid AARA is proven to be statistically sound under standard assumptions on the runtime cost data. An experimental evaluation on a challenging set of benchmarks shows that Hybrid AARA (i) effectively mitigates the incompleteness of purely static resource analysis; and (ii) is more accurate and robust than purely data-driven resource analysis.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- A cost-aware logical framework 引用了 Liquidate your assets: reasoning about resource usage in liquid Haskell
- A cost-aware logical framework 引用了 Recurrence extraction for functional programs through call-by-push-value
- Integrating Resource Analyses via Resource Decomposition 引用了 A cost-aware logical framework
- Integrating Resource Analyses via Resource Decomposition 引用了 Liquidate your assets: reasoning about resource usage in liquid Haskell
- Integrating Resource Analyses via Resource Decomposition 引用了 Recurrence extraction for functional programs through call-by-push-value
引用它的顶会 Paper2
它引用的 Paper11
- Sampling with Riemannian Hamiltonian Monte Carlo in a Constrained SpaceYunbum Kook, Yin Tat Lee, Ruoqi Shen, Santosh S. VempalaNeurIPS 2022 · 53 次引用
- A modular cost analysis for probabilistic programsMartin Avanzini, Georg Moser, Michael SchaperOOPSLA 2020 · 41 次引用
- Liquidate your assets: reasoning about resource usage in liquid HaskellMartin A. T. Handley, Niki Vazou, Graham HuttonPOPL 2020 · 38 次引用
- 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
- Automatic Amortized Resource Analysis with Regular Recursive TypesJessie Grosen, David M. Kahn, Jan HoffmannLICS 2023 · 5 次引用
- Handling Exceptions and Effects with Automatic Resource AnalysisEthan Chu, Yiyang Guo, Jan HoffmannOOPSLA 2026
- Verifying and Synthesizing Constant-Resource Implementations with TypesVan Chan Ngo, Mario Dehesa-Azuara, Matthew Fredrikson, Jan HoffmannS&P 2017 · 51 次引用
- Automatic Linear Resource Bound Analysis for Rust via Prophecy PotentialsQihao Lian, Di WangOOPSLA 2025 · 1 次引用
- Quantitative Bounds on Resource Usage of Probabilistic ProgramsKrishnendu Chatterjee, Amir Kafshdar Goharshady, Tobias Meggendorfer, Dorde ZikelicOOPSLA 2024 · 16 次引用
