Computing Expected Runtimes for Constant Probability Programs
arXiv:1905.09544
Abstract
We introduce the class of constant probability (CP) programs and show that classical results from probability theory directly yield a simple decision procedure for (positive) almost sure termination of programs in this class. Moreover, asymptotically tight bounds on their expected runtime can always be computed easily. Based on this, we present an algorithm to infer the exact expected runtime of any CP program.
Full version (with proofs) of a paper published in the Proceedings of the 27th International Conference on Automated Deduction (CADE '19), Natal, Brazil, Lecture Notes in Computer Science 11716, pages 269-286, Springer-Verlag, 2019