Robust Resource Bounds with Static Analysis and Bayesian Inference

Author:

Pham Long1ORCID,Saad Feras A.1ORCID,Hoffmann Jan1ORCID

Affiliation:

1. Carnegie Mellon University, Pittsburgh, USA

Abstract

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.

Funder

National Science Foundation

Publisher

Association for Computing Machinery (ACM)

Reference91 articles.

1. Measurement-Based Worst-Case Execution Time Estimation Using the Coefficient of Variation

2. Elvira Albert, Puri Arenas, Samir Genaim, German Puebla, and Damiano Zanardini. 2007. Cost Analysis of Java Bytecode. In Programming Languages and Systems (Lecture Notes in Computer Science, Vol. 4421). Springer, Berlin. 157–172. isbn:978-3-540-71316-6 https://doi.org/10.1007/978-3-540-71316-6_12 10.1007/978-3-540-71316-6_12

3. Elvira Albert, Puri Arenas, Samir Genaim, German Puebla, and Damiano Zanardini. 2008. COSTA: Design and Implementation of a Cost and Termination Analyzer for Java Bytecode. In Formal Methods for Components and Objects (Lecture Notes in Computer Science, Vol. 5382). Springer, Berlin. 113–132. isbn:978-3-540-92188-2 https://doi.org/10.1007/978-3-540-92188-2_5 10.1007/978-3-540-92188-2_5

4. Survival Analysis

5. Martin Avanzini and Ugo Dal Lago. 2017. Automating Sized-Type Inference for Complexity Analysis. Proc. ACM Program. Lang., 1, ICFP (2017), Article 43, Aug., 29 pages. https://doi.org/10.1145/3110287 10.1145/3110287

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

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

www.globalauthorid.com

TOP

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