Control-Flow Refinement for Complexity Analysis of Probabilistic Programs in KoAT

Nils Lommen,Éléanore Meyer,Jürgen Giesl
2024-06-14
Abstract:Recently, we showed how to use control-flow refinement (CFR) to improve automatic complexity analysis of integer programs. While up to now CFR was limited to classical programs, in this paper we extend CFR to probabilistic programs and show its soundness for complexity analysis. To demonstrate its benefits, we implemented our new CFR technique in our complexity analysis tool KoAT.
Logic in Computer Science
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is to extend the application of Control - Flow Refinement (CFR) techniques to the complexity analysis of probabilistic programs. Specifically, the authors aim to: 1. **Extend CFR techniques**: Previously, CFR techniques were limited to classical (non - probabilistic) programs. This paper proposes a new CFR technique that enables it to handle probabilistic programs and proves its rationality in complexity analysis. 2. **Improve the ability of automated complexity analysis**: By combining CFR with existing complexity analysis tools (such as KoAT), the ability of automated complexity analysis is significantly improved. This allows the tool to more accurately infer the running - time and size bounds of probabilistic programs. 3. **Simplify the analysis of complex programs**: CFR simplifies the analysis of probabilistic programs with complex control - flow by "unrolling" loops and excluding infeasible paths. For example, for a `while` loop with random branches, CFR can transform it into a form that is easier to analyze, thus allowing the use of techniques for non - probabilistic programs to analyze the remaining part. 4. **Implement and evaluate the new method**: The authors implemented this new CFR technique in the KoAT tool and verified its effectiveness through a series of experiments. The experimental results show that CFR significantly enhances KoAT's ability to analyze the complexity of probabilistic programs, although it may increase the size of the program and lead to longer analysis times. In summary, the goal of this paper is to develop and verify a new control - flow refinement technique to improve the automated complexity analysis of probabilistic programs, especially to enhance the performance of tools such as KoAT in this regard.