Skip to content
/ zar Public

Formally Verified Samplers From Probabilistic Programs With Loops and Conditioning

License

Notifications You must be signed in to change notification settings

bagnalla/zar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zar

Paper: https://arxiv.org/abs/2211.06747

Setup

  • Coq development:
opam pin add coq 8.16.0
opam repo add coq-released https://coq.inria.fr/opam/released
opam install coq-itree
make -j4
opam install pythonlib ppx_import ppx_deriving
cd python/zar/ocaml
dune build zarpy.so
cd ..
make install
  • Extracted sampler analysis scripts (e.g., analyze.py):
pip install numpy==1.24.2 scipy==1.10.1 tensorflow==2.11.0 optas==1.0.3

Foundational

cpGCL and cwp

CF Trees

Generating Interaction Trees

Order/Domain Theory and Algebraic Coinductives

Sampling Equidistribution Theorems

Empirical Validation

extract/ contains driver code and scripts for evaluating extracted samplers (e.g., dueling coins, n-sided die, geometric distribution, discrete gaussian, hare and tortoise).

fast-loaded-dice-roller/ contains a clone of https://github.com/probcomp/fast-loaded-dice-roller modified to track entropy usage.

optimal-approximate-sampling/ contains a clone of https://github.com/probcomp/optimal-approximate-sampling modified to track entropy usage.

python/zar/ contains the Zarpy Python3 package source.

python/tf/ contains the TensorFlow 2 project, with batch_gen.py implementing a sampling-without-replacement generator on top of the Zarpy sampler package.

About

Formally Verified Samplers From Probabilistic Programs With Loops and Conditioning

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published