Paper: https://arxiv.org/abs/2211.06747
- 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
- Zarpy Python3 package (see python/zar/test/test.py for an example of using it after installation):
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
- CF trees: tree.v, tcwp.v, tcwp_facts.v
- Compiler from cpGCL to CF trees: compile.v, cwp_tcwp.v
- De-biasing: uniform.v, debias.v
- Generating itrees: itree.v
- Basic order theory: order.v
- CPOs: cpo.v
- Algebraic CPOs and continuous extensions: aCPO.v
- Cotrees: cotree.v, cocwp.v, cocwp_facts.v
- Equidistribution theorems for itrees, cotrees, CF trees, and cpGCL: equidistribution.v
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.