Skip to content

A tool that analyses probabilistic programs, allows for automatic invariance checking and handles inference all based on Generatingfunctionology.

License

Notifications You must be signed in to change notification settings

LKlinke/Prodigy

Repository files navigation

prodigy: PRObability DIstributions via GeneratingfunctionologY

prodigy is a prototypical tool for the analysis of probabilistic non-negative integer programs with while-loops. It is based on (probability) generating functions.

It provides a command-line interface as well as a webservice.

Contents

  1. Installation
  2. Basic Usage

Installation

To install Prodigy, follow these steps:

  1. Make sure Python 3.9 or newer is installed.
  2. Install GiNaC, which also requires CLN.
  3. Install Poetry.
  4. Clone or download the Prodigy repository, open a command prompt in its root folder, and type poetry install. This should automatically install all required dependencies.

If no errors occurred, you have successfully installed Prodigy. Now there are two options on how to use the tool. You can either use the command-line interface (CLI) or use the webservice frontend. The next section (Basic Usage) details how to achieve both of these things.

Troubleshooting

If you run into trouble during installation, this subsection might be of help. It lists some common problems that might occur during installation of Prodigy and how you can (hopefully) solve them.

  • If you're using Windows, don't (not even WSL). We heavily recommend using either Linux or MacOS, as some of the required libraries have compatibility problems with Windows.
  • If you're using Linux, make sure all of these packages are installed (if you're not using a Debian/Ubuntu based distribution, these might differ slightly):
    • CMake
    • pkg-config
    • build-essential (includes make, g++, gcc, and more)
    • python3-dev (called python3-devel on some other package managers such as yam)

Basic Usage

CLI

  1. In the project directory, type poetry shell. This activates the freshly installed virtual environment.
  2. Now, you can use prodigy by executing the script via python prodigy/cli.py .... For more information, see the help message or have a look into the documentation.

Webservice

  1. Activate the cvirtual environment by poetry shell.
  2. Type web-service.
  3. Open a browser and locate localhost:8080.

About

A tool that analyses probabilistic programs, allows for automatic invariance checking and handles inference all based on Generatingfunctionology.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •