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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f8caa62c-30ec-4596-9cf5-99ea27951e54Cited 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
