Tachis: Higher-Order Separation Logic with Credits for Expected Costs

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Haselwarter, Philipp G., Li, Kwing Hei, de Medeiros, Markus, Gregersen, Simon Oddershede, Aguirre, Alejandro, Tassarotti, Joseph, Birkedal, Lars
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909385088827392
author Haselwarter, Philipp G.
Li, Kwing Hei
de Medeiros, Markus
Gregersen, Simon Oddershede
Aguirre, Alejandro
Tassarotti, Joseph
Birkedal, Lars
author_facet Haselwarter, Philipp G.
Li, Kwing Hei
de Medeiros, Markus
Gregersen, Simon Oddershede
Aguirre, Alejandro
Tassarotti, Joseph
Birkedal, Lars
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2405_20083
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Tachis: Higher-Order Separation Logic with Credits for Expected Costs
Haselwarter, Philipp G.
Li, Kwing Hei
de Medeiros, Markus
Gregersen, Simon Oddershede
Aguirre, Alejandro
Tassarotti, Joseph
Birkedal, Lars
Logic in Computer Science
Programming Languages
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.
title Tachis: Higher-Order Separation Logic with Credits for Expected Costs
topic Logic in Computer Science
Programming Languages
url https://arxiv.org/abs/2405.20083