Abstract:
We present probabilistic total store ordering (ptso) – a probabilistic extension of the classical tso semantics. For a given (finite-state) program, the operational semantics of ptso induces an infinite-state markov chain. We resolve the inherent non-determinism due to process schedulings and memory updates according to given probability distributions. We provide a comprehensive set of results showing the decidability of several properties for ptso, namely (i) almost-sure (repeated) reachability: whether a run, starting from a given initial configuration, almost surely visits (resp. Almost surely repeatedly visits) a given set of target configurations. (ii) almost-never (repeated) reachability: whether a run from the initial configuration, almost never visits (resp. Almost never repeatedly visits) the target. (iii) approximate quantitative (repeated) reachability: to approximate, up to an arbitrary degree of precision, the measure of runs that start from the initial configuration and (repeatedly) visit the target. (iv) expected average cost: to approximate, up to an arbitrary degree of precision, the expected average cost of a run from the initial configuration to the target. We derive our results through a nontrivial combination of results from the classical theory of (infinite-state) markov chains, the theories of decisive and eager markov chains, specific techniques from combinatorics, as well as, decidability and complexity results for the classical (non-probabilistic) tso semantics. As far as we know, this is the first work that considers probabilistic verification of programs running on weak memory models. © 2022, the author(s).