Tachis: Higher-Order Separation Logic with Credits for Expected Costs
Philipp G. Haselwarter, Kwing Hei Li, Markus de Medeiros, Simon Oddershede Gregersen, Alejandro Aguirre, Joseph Tassarotti, Lars Birkedal
Abstract
We present Tachis, a higher-order separation logic to reason about the expected cost of probabilistic programs. Inspired by the uses of time credits for reasoning about the running time of deterministic programs, we introduce a novel notion of probabilistic cost credit. Probabilistic cost credits are a separation logic resource that can be used to pay for the cost of operations in programs, and that can be distributed across all possible branches of sampling instructions according to their weight, thus enabling us to reason about expected cost. The representation of cost credits as separation logic resources gives Tachis a great deal of flexibility and expressivity. In particular, it permits reasoning about amortized expected cost by storing excess credits as potential into data structures to pay for future operations. Tachis further supports a range of cost models, including running time and entropy usage. We showcase the versatility of this approach by applying our techniques to prove upper bounds on the expected cost of a variety of probabilistic algorithms and data structures, including randomized quicksort, hash tables, and meldable heaps. All of our results have been mechanized using Coq, Iris, and the Coquelicot real analysis library.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Probabilistic Concurrent Reasoning in Outcome Logic: Independence, Conditioning, and Invariants cites A probabilistic separation logic
- Probabilistic Concurrent Reasoning in Outcome Logic: Independence, Conditioning, and Invariants cites Asynchronous Probabilistic Couplings in Higher-Order Separation Logic
- Probabilistic Concurrent Reasoning in Outcome Logic: Independence, Conditioning, and Invariants cites Approximate Relational Reasoning for Higher-Order Probabilistic Programs
- Asynchronous Probabilistic Couplings in Higher-Order Separation Logic cites A probabilistic separation logic
- Probabilistic Refinement Session Types cites Aiming low is harder: induction for lower bounds in probabilistic program verification
- Probabilistic Refinement Session Types cites A modular cost analysis for probabilistic programs
- Approximate Relational Reasoning for Higher-Order Probabilistic Programs cites A probabilistic separation logic
- Approximate Relational Reasoning for Higher-Order Probabilistic Programs cites Thunks and Debits in Separation Logic with Time Credits
- Approximate Relational Reasoning for Higher-Order Probabilistic Programs cites Asynchronous Probabilistic Couplings in Higher-Order Separation Logic
- Verifying Exact Samplers for Continuous Distributions with a Discrete Program Logic cites Asynchronous Probabilistic Couplings in Higher-Order Separation Logic
- Verifying Exact Samplers for Continuous Distributions with a Discrete Program Logic cites Approximate Relational Reasoning for Higher-Order Probabilistic Programs
- Modular Verification of Differential Privacy in Probabilistic Higher-Order Separation Logic cites Asynchronous Probabilistic Couplings in Higher-Order Separation Logic
- Modular Verification of Differential Privacy in Probabilistic Higher-Order Separation Logic cites Approximate Relational Reasoning for Higher-Order Probabilistic Programs
Cited by top-tier papers5
- Approximate Relational Reasoning for Higher-Order Probabilistic ProgramsPhilipp G. Haselwarter, Kwing Hei Li, Alejandro Aguirre, Simon Oddershede Gregersen et al.POPL 2025 · 8 citations
- Probabilistic Concurrent Reasoning in Outcome Logic: Independence, Conditioning, and InvariantsNoam Zilberstein, Alexandra Silva, Joseph TassarottiPOPL 2026 · 4 citations
- Probabilistic Refinement Session TypesQiancheng Fu, Ankush Das, Marco GaboardiPLDI 2025 · 1 citation
- Verifying Exact Samplers for Continuous Distributions with a Discrete Program LogicMarkus de Medeiros, Puming Liu, Kwing Hei Li, Alejandro Aguirre et al.LICS 2026
- Modular Verification of Differential Privacy in Probabilistic Higher-Order Separation LogicPhilipp G. Haselwarter, Alejandro Aguirre, Simon Oddershede Gregersen, Kwing Hei Li et al.PLDI 2026
Builds on13
- Aiming low is harder: induction for lower bounds in probabilistic program verificationMarcel Hark, Benjamin Lucien Kaminski, Jürgen Giesl, Joost-Pieter KatoenPOPL 2020 · 47 citations
- Thunks and Debits in Separation Logic with Time CreditsFrançois Pottier, Armaël Guéneau, Jacques-Henri Jourdan, Glen MévelPOPL 2024 · 44 citations
- A modular cost analysis for probabilistic programsMartin Avanzini, Georg Moser, Michael SchaperOOPSLA 2020 · 41 citations
- A probabilistic separation logicGilles Barthe, Justin Hsu, Kevin LiaoPOPL 2020 · 35 citations
- Asynchronous Probabilistic Couplings in Higher-Order Separation LogicSimon Oddershede Gregersen, Alejandro Aguirre, Philipp G. Haselwarter, Joseph Tassarotti et al.POPL 2024 · 23 citations
Related papers
- Contextual Refinement of Higher-Order Concurrent Probabilistic ProgramsKwing Hei Li, Alejandro Aguirre, Joseph Tassarotti, Lars BirkedalPLDI 2026
- A Calculus for Amortized Expected RuntimesKevin Batz, Benjamin Lucien Kaminski, Joost-Pieter Katoen, Christoph Matheja et al.POPL 2023 · 22 citations
- Lilac: A Modal Separation Logic for Conditional ProbabilityJohn M. Li, Amal Ahmed, Steven HoltzenPLDI 2023 · 22 citations
- A High-Level Separation Logic for Heap Space under Garbage CollectionAlexandre Moine, Arthur Charguéraud, François PottierPOPL 2023
- Hopping Proofs of Expectation-Based Properties: Applications to Skiplists and Security ProofsMartin Avanzini, Gilles Barthe, Benjamin Grégoire, Georg Moser et al.OOPSLA 2024 · 5 citations
