Using dynamically inferred invariants to analyze program runtime complexity

ThanhVu H. Nguyen, Didier Ishimwe, A. V. Malyshev, Timos Antonopoulos, Quoc-Sang Phan · 2020

Being able to detect program runtime complexity can help identify security vulnerabilities such as DoS attacks and side-channel information leakage. In prior work, we use dynamic invariant generation to infer nonlinear numerical relations to represent runtime complexity of imperative programs. In this work, we propose a new dynamic analysis approach for learning recurrence relations to capture complexity bounds for recursive programs. This approach allows us to efficiently infer simple linear recurrence relations that represent nontrivial, potentially nonlinear, complexity bounds. Preliminary results on several popular recursive programs show that we can learn precise recurrence relations capturing worst-case complexity bounds such as O(n log n) and O(cn).

Read the paper · More papers on PaperTik