We present a new inductive rule for verifying lower bounds on expected values of random variables after execution of probabilistic loops as well as on their expected runtimes. Our rule is simple in the sense that loop body semantics need to be applied only finitely often in order to verify that the candidates are indeed lower bounds. In particular, it is not necessary to find the limit of a sequence as in many previous rules.
In the last years, several works were concerned with identifying classes of programswhere termination is decidable. We consider triangular weakly non-linear loops(twn-loops) over a ring Z ≤ S ≤ R_A , where R_A is the set of all real algebraicnumbers. Essentially, the body of such a loop is a single assignment(x_1, ..., x_d) ← (c_1 · x_1 + pol_1, ..., c_d · x_d + pol_d)where each x_i is a variable, c_i ∈ S, and each pol_i is a (possibly non-linear)polynomial over S and the variables x_{i+1}, ..., x_d. Recently, we showed thattermination of such loops is decidable for S = R_A and non-termination issemi-decidable for S = Z and S = Q.In this paper, we show that the halting problem is decidable for twn-loops over anyring Z ≤ S ≤ R_A. In contrast to the termination problem, where termination on allinputs is considered, the halting problem is concerned with termination on a giveninput. This allows us to compute witnesses for non-termination.Moreover, we present the first computability results on the runtime complexity ofsuch loops. More precisely, we show that for twn-loops over Z one can alwayscompute a polynomial f such that the length of all terminating runs is boundedby f( || (x_1, ..., x_d) || ), where || · || denotes the 1-norm. As a corollary, weobtain that the runtime of a terminating triangular linear loop over Z isat most linear.
We present a novel modular approach to infer upper bounds on the expected runtimes of probabilistic integer programs automatically. To this end, it computes bounds on the runtimes of program parts and on the sizes of their variables in an alternating way. To evaluate its power, we implemented our approach in a new version of our open-source tool .
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.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.