Affiliation:
1. IST Austria (Institute of Science and Technology Austria), Austria
2. Shanghai Jiao Tong University, P.R. China
3. IST Austria, Austria
Abstract
We study the problem of developing efficient approaches for proving worst-case bounds of non-deterministic recursive programs. Ranking functions are sound and complete for proving termination and worst-case bounds of non-recursive programs. First, we apply ranking functions to recursion, resulting in measure functions. We show that measure functions provide a sound and complete approach to prove worst-case bounds of non-deterministic recursive programs. Our second contribution is the synthesis of measure functions in non-polynomial forms. We show that non-polynomial measure functions with logarithm and exponentiation can be synthesized through abstraction of logarithmic or exponentiation terms, Farkas Lemma, and Handelman’s Theorem using linear programming. While previous methods obtain polynomial worst-case bounds, our approach can synthesize bounds of various forms including O(
n
log
n
) and O(
n
r
), where
r
is not an integer. We present experimental results to demonstrate that our approach can efficiently obtain worst-case bounds of classical recursive algorithms such as (i) Merge sort, Heap sort, and the divide-and-conquer algorithm for the Closest Pair problem, where we obtain O(
n
log
n
) worst-case bound, and (ii) Karatsuba’s algorithm for polynomial multiplication and Strassen’s algorithm for matrix multiplication, for which we obtain O(
n
r
) bounds such that
r
is not an integer and is close to the best-known bound for the respective algorithm. Besides the ability to synthesize non-polynomial bounds, we also show that our approach is equally capable of obtaining polynomial worst-case bounds for classical programs such as Quick sort and the dynamic programming algorithm for computing Fibonacci numbers.
Funder
Vienna Science and Technology Fund
ERC
DOC Fellowship of the Austrian Academy of Sciences
Austrian Science Fund (FWF) NFN
Natural Science Foundation of China
CDZ project CAP
IBM Ph.D.Fellowship program
Publisher
Association for Computing Machinery (ACM)
Cited by
17 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Practical Approximate Quantifier Elimination for Non-linear Real Arithmetic;Lecture Notes in Computer Science;2024-09-11
2. Robust Resource Bounds with Static Analysis and Bayesian Inference;Proceedings of the ACM on Programming Languages;2024-06-20
3. An Intelligent Scheduling System for Large-Scale Online Judging;Communications in Computer and Information Science;2024
4. Empirically Scalable Invariant Generation Leveraging Divide-and-Conquer with Pruning;Lecture Notes in Computer Science;2024
5. Inferring Complexity Bounds from Recurrence Relations;Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering;2023-11-30