Dynaplex: analyzing program complexity using dynamically inferred recurrence relations
Didier Ishimwe, KimHao Nguyen, ThanhVu Nguyen
摘要
Being able to detect program runtime complexity is useful in many tasks (e.g., checking expected performance and identifying potential security vulnerabilities). In this work, we introduce a new dynamic approach for inferring the asymptotic complexity bounds of recursive programs. From program execution traces, we learn recurrence relations and solve them using pattern matching to obtain closed-form solutions representing the complexity bounds of the program. This approach allows us to efficiently infer simple recurrence relations that represent nontrivial, potentially nonlinear polynomial and non-polynomial, complexity bounds. We present Dynaplex, a tool that implements these ideas to automatically generate recurrence relations from execution traces. Our preliminary results on popular and challenging recursive programs show that Dynaplex can learn precise relations capturing worst-case complexity bounds (e.g., O ( n log n ) for mergesort, O (2 n ) for Tower of Hanoi and O ( n 1.58 ) for Karatsuba’s multiplication algorithm).
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Integrating Resource Analyses via Resource Decomposition 引用了 Robust Resource Bounds with Static Analysis and Bayesian Inference
- Integrating Resource Analyses via Resource Decomposition 引用了 Templates and recurrences: better together
- DynamiTe: dynamic termination and non-termination proofs 引用了 Learning nonlinear loop invariants with gated continuous logic networks
引用它的顶会 Paper2
它引用的 Paper4
- SlowFuzz: Automated Domain-Independent Detection of Algorithmic Complexity VulnerabilitiesTheofilos Petsios, Jason Zhao, Angelos D. Keromytis, Suman JanaCCS 2017 · 214 次引用
- Templates and recurrences: better togetherJason Breck, John Cyphert, Zachary Kincaid, Thomas W. RepsPLDI 2020 · 30 次引用
- DynamiTe: dynamic termination and non-termination proofsTon Chanh Le, Timos Antonopoulos, Parisa Fathololumi, Eric Koskinen 等OOPSLA 2020 · 26 次引用
- Learning nonlinear loop invariants with gated continuous logic networksJianan Yao, Gabriel Ryan, Justin Wong, Suman Jana 等PLDI 2020 · 1 次引用
相关 Paper
- Synthesis with Asymptotic Resource BoundsQinheping Hu, John Cyphert, Loris D'Antoni, Thomas W. RepsCAV 2021 · 5 次引用
- Recurrence extraction for functional programs through call-by-push-valueG. A. Kavvos, Edward Morehouse, Daniel R. Licata, Norman DannerPOPL 2020 · 20 次引用
- Adaptive Recursive Query OptimizationAnna Herlihy, Guillaume Martres, Anastasia Ailamaki, Martin OderskyICDE 2024 · 5 次引用
- Automated Tail Bound Analysis for Probabilistic Recurrence RelationsYican Sun, Hongfei Fu, Krishnendu Chatterjee, Amir Kafshdar GoharshadyCAV 2023 · 9 次引用
- Scaling implicit parallelism via dynamic control replicationMichael Bauer, Wonchan Lee, Elliott Slaughter, Zhihao Jia 等PPoPP 2021 · 12 次引用
