Probably Documentation

Probably is a Python package for parsing, type-checking, and analyzing probabilistic programs written in the pGCL language.

For more information, visit https://github.com/Philipp15b/probably.

Features:

  • pGCL language support: Constants, variables, static types (boolean, (bounded) natural numbers, floats), literals, unary and binary operators, while loops, conditional if statements, assignments, probabilistic choices.

  • Weakest pre-expectation calculation for loop-free and linear pGCL programs.

    • Translation from general expectations to linear expectations and expectations in summation normal form.

  • Program AST traversal and modification using iterators over mutable references.

  • General algorithm for variable substitution in program expressions with substitution expressions.


Branch:
master
Commit:

d092b2b

  • lint: add more exceptions for newer version by Philipp Schröer at 2024-03-14 21:00:17


API Documentation

Note

You want a quickstart? Jump over to the the pGCL module documentation!

Command-Line Interface

Probably also offers a simple command-line interface for quick program inspection.

If you use poetry and do not have probably installed globally, you can use poetry run probably INPUT.

probably

Compile the given program and print some information about it.

probably [OPTIONS] INPUT

Arguments

INPUT

Required argument