Reference. A Demonic Outcome Logic for Randomized Nondeterminism
Programs increasingly rely on randomization in applications such as cryptography and machine learning. Analyzing randomized programs has been a fruitful research direction, but there is a gap when programs also exploit nondeterminism(for concurrency, efficiency, or algorithmic design). In this paper, we introduce Demonic Outcome Logic for reasoning about programs that exploit both randomization and nondeterminism. The logic includes several novel features, such as reasoning about multiple executions in tandem and manipulating pre- and postconditions using familiar equational laws—including the distributive law of probabilistic choices over nondeterministic ones. We also give rules for loops that both establish termination and quantify the distribution of final outcomes from a single premise. We illustrate the reasoning capabilities of Demonic Outcome Logic through several case studies, including the Monty Hall problem, an adversarial protocol for simulating fair coins, and a heuristic based probabilistic SAT solver.
Cite
Cited by (4)
Oblivious Probabilistic Outcome Logic: Verifying Probabilistic Programs with an Oblivious Adversary chen-2026-oblivious
In the context of probabilistic programs, an oblivious adversary resolves nondeterminism without seeing the outcomes of random draws. Obliviousness is a common assumption in online algorithms and distributed protocols, but the complex interaction between random draws and adversarial choices makes it challenging to reason about correctness. While there has been significant progress toward reasoning about programs that combine randomization with nondeterminism, most of the work has focused on the adaptive model, whose omniscient view of program state is too powerful to establish correctness for certain classes of programs. We introduce Oblivious Probabilistic Outcome Logic (opOL), a new logic for reasoning about probabilistic programs with nondeterminism controlled by an oblivious adversary. Building on Outcome Logic and Probabilistic Separation Logic, opOL models adversarial choice as a resource and uses probabilistic independence to ensure that random outcomes are hidden from the adversary. The opOL proof system provides expressive and compositional rules for case analysis on both random and nondeterministic outcomes, and for proving almost-sure termination. Expressivity is tested through several case studies, including a paging algorithm and a leader election protocol. The opOL metatheory and case studies are mechanized in Lean 4.
Probabilistic Concurrent Reasoning in Outcome Logic: Independence, Conditioning, and Invariants zilberstein-2026-probabilistic
Although randomization has long been used in distributed computing, formal methods for reasoning aboutprobabilistic concurrent programs have lagged behind. No existing program logics can express specificationsabout the full distributions of outcomes resulting from programs that are both probabilistic and concurrent. To address this, we introduce Probabilistic Concurrent Outcome Logic ( pcOL ), which incorporates ideas fromconcurrent and probabilistic separation logics into Outcome Logic to introduce new compositional reasoningprinciples. At its core, pcOL reinterprets the rules of Concurrent Separation Logic in a setting where separationmodels probabilistic independence, so as to compositionally describe joint distributions over variables inconcurrent threads. Reasoning about outcomes also proves crucial, as case analysis is often necessary to deriveprecise information about threads that rely on randomized shared state. We demonstrate pcOL on a variety ofexamples, including to prove almost sure termination of unbounded loops.
Modular Reasoning about Error Bounds for Concurrent Probabilistic Programs li-2025-modular
We present Coneris, the first higher-order concurrent separation logic for reasoning about error probability bounds of higher-order concurrent probabilistic programs with higher-order state. To support modular reasoning about concurrent (non-probabilistic) program modules, state-of-the-art program logics internalize the classic notion of linearizability within the logic through the concept of logical atomicity . In Coneris, we extend this idea to probabilistic concurrent program modules by capturing a novel notion of randomized logical atomicity within the logic. To do so, Coneris utilizes presampling tapes and a novel probabilistic update modality to describe how state is changed probabilistically at linearization points. We demonstrate this approach by means of smaller synthetic examples and larger case studies. All of the presented results, including the meta-theory, have been mechanized in the Rocq prover and the Iris separation logic framework.
Denotational Semantics for Probabilistic and Concurrent Programs zilberstein-2025-denotational
We develop a denotational model for probabilistic and concurrent imperative programs, a class of programs with standard control flow via conditionals and while-loops, as well as probabilistic actions and parallel composition. Whereas semantics for concurrent or randomized programs in isolation is well studied, their combination has not been thoroughly explored and presents unique challenges. The crux of the problem is that interactions between control flow, probabilistic actions, and concurrent execution cannot be captured by straightforward generalizations of prior work on pomsets and convex languages, prominent models for those effects, individually. Our model has good domain theoretic properties, important for semantics of unbounded loops. We also prove two adequacy theorems, showing that the model subsumes typical powerdomain semantics for concurrency and convex powerdomain semantics for probabilistic nondeterminism.
Cites 67 works (4 here)
With notes (4)
Error Credits: Resourceful Reasoning about Error Bounds for Higher-Order Probabilistic Programs aguirre-2024-error
Probabilistic programs often trade accuracy for efficiency, and thus may, with a small probability, return an incorrect result. It is important to obtain precise bounds for the probability of these errors, but existing verification approaches have limitations that lead to error probability bounds that are excessively coarse, or only apply to first-order programs. In this paper we present Eris, a higher-order separation logic for proving error probability bounds for probabilistic programs written in an expressive higher-order language. Our key novelty is the introduction of error credits , a separation logic resource that tracks an upper bound on the probability that a program returns an erroneous result. By representing error bounds as a resource, we recover the benefits of separation logic, including compositionality, modularity, and dependency between errors and program terms, allowing for more precise specifications. Moreover, we enable novel reasoning principles such as expectation-preserving error composition, amortized error reasoning, and error induction. We illustrate the advantages of our approach by proving amortized error bounds on a range of examples, including collision probabilities in hash functions, which allow us to write more modular specifications for data structures that use them as clients. We also use our logic to prove correctness and almost-sure termination of rejection sampling algorithms. All of our results have been mechanized in the Coq proof assistant using the Iris separation logic framework and the Coquelicot real analysis library.
Outcome Logic: A Unifying Foundation for Correctness and Incorrectness Reasoning zilberstein-2023-outcome
Program logics for bug-finding (such as the recently introduced Incorrectness Logic) have framed correctness and incorrectness as dual concepts requiring different logical foundations. In this paper, we argue that a single unified theory can be used for both correctness and incorrectness reasoning. We present Outcome Logic (OL), a novel generalization of Hoare Logic that is both monadic (to capture computational effects) and monoidal (to reason about outcomes and reachability). OL expresses true positive bugs, while retaining correctness reasoning abilities as well. To formalize the applicability of OL to both correctness and incorrectness, we prove that any false OL specification can be disproven in OL itself. We also use our framework to reason about new types of incorrectness in nondeterministic and probabilistic programs. Given these advances, we advocate for OL as a new foundational theory of correctness and incorrectness.
Iris: Monoids and Invariants as an Orthogonal Basis for Concurrent Reasoning jung-2015-iris
Kleene algebra with tests kozen1997kleene
We introduce Kleene algebra with tests, an equational system for manipulating programs. We give a purely equational proof, using Kleene algebra with tests and commutativity conditions, of the following classical result: every while program can be simulated by a while program with at most one while loop. The proof illustrates the use of Kleene algebra with tests and commutativity conditions in program equivalence proofs.
External (63)
- Hyper Hoare Logic: (Dis-)Proving Program Hyperproperties (2024)
- Multisets and Distributions (2024)
- Quantitative Weakest Hyper Pre: Unifying Correctness and Incorrectness Hyperproperties via Predicate Transformers (2024)
- Outcome Logic: A Unified Approach to the Metatheory of Program Logics with Branching Effects (2024)
- Outcome Separation Logic: Local Reasoning for Correctness and Incorrectness with Computational Effects (2024)
- A Demonic Outcome Logic for Randomized Nondeterminism (Extended Version) (2024)
- Step-Indexed Logical Relations for Countable Nondeterminism and Probabilistic Choice (2023)
- A Core Calculus for Equational Proofs of Cryptographic Protocols (2023)
- The Theory of Traces for Systems with Nondeterminism, Probability, and Termination (2022)
- Distribution Bisimilarity via the Power of Convex Algebras (2021)
- Presenting Convex Sets of Probability Distributions by Convex Semilattices and Unique Bases (2021)
- From Multisets over Distributions to Distributions over Multisets (2021)
- Monads and Quantitative Equational Theories for Nondeterminism and Probability (2020)
- Monad Composition via Preservation of Algebras (2020)
- On the Non-Compositionality of Monads via Distributive Laws (2020)
- The Theory of Traces for Systems with Nondeterminism and Probability (2019)
- Uniform Sampling Through the Lovász Local Lemma (2019)
- Advanced weakest precondition calculi for probabilistic programs (2019)
- A separation logic for concurrent randomized programs (2019)
- No-Go Theorems for Distributive Laws (2019)
- An Assertion-Based Program Logic for Probabilistic Programs (2018)
- A new proof rule for almost-sure termination (2018)
- Verifying Concurrent Randomized Algorithms (2018)
- Mixed powerdomains for probability and nondeterminism (2017)
- VPHL: A Verified Partial-Correctness Logic for Probabilistic Programs (2015)
- Probabilistic Program Analysis with Martingales (2013)
- Concurrent Kleene Algebra and its Foundations (2011)
- Semantic Domains for Combining Probability and Non-Determinism (2009)
- Coalgebraic Trace Semantics for Combined Possibilitistic and Probabilistic Systems (2008)
- Resources, concurrency, and local reasoning (2007)
- A Probabilistic Hoare-style Logic for Game-Based Cryptographic Proofs (2006)
- Distributing probability over non-determinism (2006)
- Abstraction, Refinement and Proof for Probabilistic Systems (2005)
- Axioms for Probability and Nondeterminism (2004)
- Probability, Nondeterminism and Concurrency: Two Denotational Models for Probabilistic Computation (2003)
- Probabilistic Extensions of Semantical Models (2002)
- The powerdomain of indexed valuations (2002)
- Partial correctness for probabilistic demonic programs (2001)
- Nondeterminism and Probabilistic Choice: Obeying the Laws (2000)
- Convex Power Constructions for Continuous D-Cones (2000)
- Verifying Probabilistic Programs Using a Hoare like Logic (1999)
- Mixing Up Nondeterminism and Probability: a preliminary report (1999)
- Continuous D-cones: convexity and powerdomain constructions (1999)
- Comparative semantics for a process language with probabilistic choice and non-determinism (1998)
- Probabilistic models for the guarded command language (1997)
- Probabilistic predicate transformers (1996)
- Refinement-oriented probability for CSP (1996)
- Modeling and verification of randomized distributed real-time systems (1995)
- Probabilistic simulations for probabilistic processes (1994)
- Non-determinism in Functional Languages (1992)
- Probabilistic Non-determinism (1990)
- A probabilistic powerdomain of evaluations (1989)
- Countable nondeterminism and random assignment (1986)
- A probabilistic PDL (1983)
- Power domains (1978)
- A Discipline of Programming (1976)
- A Powerdomain Construction (1976)
- Guarded commands, nondeterminacy and formal derivation of programs (1975)
- Axiomatic approach to total correctness of programs (1974)
- Continuous lattices (1972)
- Distributive laws (1969)
- An axiomatic basis for computer programming (1969)
- Various techniques used in connection with random digits (1951)