Skip to main content

A Visualization Tool for Computations of Probabilistic Term Rewriting

Project description

PReVision

A Probabilistic Term Rewrite System Visualization tool.

Description

PReVision parses a probabilistic Term Rewrite System as specified here and evaluates the corresponding computation tree in various ways, and gives a visualization of the evaluation.

Features

PReVision offers a range of features for evaluating and visualizing probabilistic term rewrite systems. All features include visualization support (DOT file or PNG images), with results saved in a specified folder.

Visualization

  • Full computation tree generation: Does neither resolve probabilities nor non-determinism.
  • Layer-by-layer evaluation: Resolve non-determinism for a specified i-th layer resulting in possibly multiple trees.
  • Probability-resolved evaluation: Resolve probabilities for a specified i-th layer resulting in possibly multiple trees.
  • Random path computation: Resolve both non-determinism and probabilities generating a pseudo-random path of the computation tree.

Evaluation

  • Multiple evaluation strategies: Use various evaluation strategies, including outermost, innermost, and leftmost/rightmost redex selection.
  • Derscribe Evaluationstrategies + example

Dependencies

pydot-3.0.4

  • graphviz

Installation

# will be specified later

Usage

usage: prevision [-h] [-p | -q] [-d | -b] [-t <int>] [-s <str>] [-f <str>] [-o <path>] <path> <term>

PReVision: A Probabilistic Term Rewrite System Visualization tool.

positional arguments:
  <path>                      path to the input file (txt)
  <term>                      starting term from which the computation tree is expanded

options:
  -h, --help                  show this help message and exit
  -p, --probabilistic         shows probabilistic paths in the tree (default)
  -q, --non-probabilistic     resolves probabilistic paths by creating new trees for each
  -d, --deterministic         resolves non-deterministic paths by creating new trees for each
  -b, --non-deterministic     shows non-deterministic paths in the tree (default)
  -t <int>, --depth <int>     the maximum depth of the computation tree (default: 3)
  -s <str>, --strategy <str>  evaluation strategy to filter reducible expressions (default: 'full')
  -f <str>, --format <str>    the output format (default: 'png')
  -o <path>, --output <path>  output directory for results (default: './')

notes:
  - the following options are mutually exclusive:
    * '--deterministic' (-d) and '--non-deterministic' (-b)
    * '--probabilistic' (-p) and '--non-probabilistic' (-q)
  - available evaluation strategies:
    * 'full'    computes the entire computation tree
    * 'o'       evaluates all outermost reducible expressions at each step
    * 'i'       evaluates all innermost reducible expressions at each step
    * 'lo'      evaluates only the leftmost outermost reducible expression
    * 'ro'      evaluates only the rightmost outermost reducible expression
    * 'li'      evaluates only the leftmost innermost reducible expression
    * 'ri'      evaluates only the rightmost innermost reducible expression
  - available formats:
    * ['canon', 'cmap', 'cmapx', 'cmapx_np', 'dia', 'dot', 'fig', 'gd',
       'gd2', 'gif', 'hpgl', 'imap', 'imap_np', 'ismap', 'jpe', 'jpeg',
       'jpg', 'mif', 'mp', 'pcl', 'pdf', 'pic', 'plain', 'plain-ext',
       'png', 'ps', 'ps2', 'svg', 'svgz', 'vml', 'vmlz', 'vrml', 'vtx',
       'wbmp', 'xdot', 'xlib']
  - example:
    * prevision -pd -t 3 -o './results' -s 'lo' input_file.txt (s (s x))
    * description:
        Resolves non-determinisms by building (potentially) multiple
        deterministic trees. Shows probabilistic paths. Only
        evaluates the leftmost outermost redex. The generated trees have a
        maximum depth of 3. Results will be saved in the './results'
        directory as PNG images.

License

  • will be specified later

Contact

Reach us:

David Weber, Author

Email: david.pascal.weber@rwth-aachen.de GitHub: davidpweber

Jan-Christoph Kassing, Supervisor

Email: kassing@cs.rwth-aachen.de GitHub: ?


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prevision-0.0.1.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prevision-0.0.1-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file prevision-0.0.1.tar.gz.

File metadata

  • Download URL: prevision-0.0.1.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for prevision-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a4f2bfc7fba66b31e8c1292cb16f081da02048a37c0ea6e65bc3b63ae9404733
MD5 2e97d8c8d8188deb0c136ad2d089cd83
BLAKE2b-256 034440ab71b3fb21d4b5efdf8f6781da3e696ea60a5958055094d0fd2b711c07

See more details on using hashes here.

File details

Details for the file prevision-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: prevision-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for prevision-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9863066be92bf1be84b0f89c3740d2811547aa4c784be753c0a7ab2c54a67d14
MD5 1dacc95ac40c653e010663a534067460
BLAKE2b-256 07ebf1d769b829cdd5ccd37950d21cb936e6f2ff76869b04542a66661dcf8956

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page