Dynaplex: analyzing program complexity using dynamically inferred recurrence relations

D Ishimwe, KH Nguyen, TV Nguyen - Proceedings of the ACM on …, 2021 - dl.acm.org
Proceedings of the ACM on Programming Languages, 2021dl.acm.org
Being able to detect program runtime complexity is useful in many tasks (eg, 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 …
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 logn) for mergesort, O(2n) for Tower of Hanoi and O(n1.58) for Karatsuba’s multiplication algorithm).
ACM Digital Library
以上显示的是最相近的搜索结果。 查看全部搜索结果