https://hal.inria.fr/hal-01411095Barthe, GillesGillesBartheInstitute IMDEA Software [Madrid]Gaboardi, MarcoMarcoGaboardiSUNY Buffalo - University at Buffalo [SUNY] - SUNY - State University of New YorkGrégoire, BenjaminBenjaminGrégoireMARELLE - Mathematical, Reasoning and Software - CRISAM - Inria Sophia Antipolis - Méditerranée - Inria - Institut National de Recherche en Informatique et en AutomatiqueHsu, JustinJustinHsuUniversity of PennsylvaniaStrub, Pierre-YvesPierre-YvesStrubInstitute IMDEA Software [Madrid]A program logic for union boundsHAL CCSD2016and phrases Probabilistic AlgorithmsAccuracyFormal VerificationHoare LogicUnion Bound[INFO] Computer Science [cs]Gregoire, Benjamin2016-12-07 08:39:142023-03-15 08:58:092016-12-07 09:42:44enConference papershttps://hal.inria.fr/hal-01411095/document10.4230/LIPIcs.ICALP.2016.107application/pdf1We propose a probabilistic Hoare logic aHL based on the union bound, a tool from basic probability theory. While the union bound is simple, it is an extremely common tool for analyzing randomized algorithms. In formal verification terms, the union bound allows flexible and compos-itional reasoning over possible ways an algorithm may go wrong. It also enables a clean separation between reasoning about probabilities and reasoning about events, which are expressed as standard first-order formulas in our logic. Notably, assertions in our logic are non-probabilistic, even though we can conclude probabilistic facts from the judgments. Our logic can also prove accuracy properties for interactive programs, where the program must produce intermediate outputs as soon as pieces of the input arrive, rather than accessing the entire input at once. This setting also enables adaptivity, where later inputs may depend on earlier intermediate outputs. We show how to prove accuracy for several examples from the differential privacy literature, both interactive and non-interactive. 1998 ACM Subject Classification D.2.4 Software/Program Verification 1 Introduction Probabilistic computations arise naturally in many areas of computer science. For instance, they are widely used in cryptography, privacy, and security for achieving goals that lie beyond the reach of deterministic programs. However, the correctness of probabilistic programs can be quite subtle, often relying on complex reasoning about probabilistic events. Accordingly, probabilistic computations present an attractive target for formal verification. A long line of research, spanning more than four decades, has focused on expressive formalisms for reasoning about general probabilistic properties both for purely probabilistic programs and for programs that combine probabilistic and non-deterministic choice (see, e.g., [29, 34, 35]). More recent research investigates specialized formalisms that work with more restricted assertions and proof techniques, aiming to simplify formal verification. As perhaps the purest examples of this approach, some program logics prove probabilistic properties by working purely with non-probabilistic assertions; we call such systems lightweight logics. Examples include probabilistic relational Hoare logic [3] for proving the reductionist security of cryptographic constructions, and the related approximate probabilistic relational Hoare logic [4] for reasoning about differential privacy. These logics rely on the powerful abstraction of probabilistic couplings to derive probabilistic facts from non-probabilistic assertions [7].