Metadata-Version: 2.4
Name: pestel
Version: 0.1.0
Summary: Permissive winning strategy templates for two-player games with (generalized) parity objectives
Keywords: parity games,generalized parity games,strategy templates,reactive synthesis
Author: Satya Prakash Nayak
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: C++
Classifier: Topic :: Scientific/Engineering
Project-URL: Homepage, https://github.com/satya2009rta/pestel
Project-URL: Paper, https://arxiv.org/abs/2305.14026
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# PeSTel-**Pe**rmissive-**S**trategy-**Te**mp**l**ate

PeSTel is a tool for computing strategy templates for two player graph games with generalized parity objective, i.e., finite conjunction of parity objectives, presented in the paper [Synthesizing Permissive Winning Strategy Templates for Parity Games](https://arxiv.org/abs/2305.14026) (CAV'23).

## Installation

### Using pip

PeSTel can be installed from the command line using [pip](https://pip.pypa.io):

```
pip install pestel
```

This installs the executables `pestel`, `pg2gpg`, `pg2randgpg`, and `hoa2pg`, which can then be called directly from the terminal. Alternatively, PeSTel can be installed in an isolated environment using [pipx](https://pipx.pypa.io) (`pipx install pestel`) or [uv](https://docs.astral.sh/uv/) (`uv tool install pestel`).

Precompiled packages are available for Linux and macOS. On other platforms, pip compiles PeSTel from source, which requires a compiler supporting C++20. The development version can be compiled and installed directly from this repository using

```
pip install git+https://github.com/satya2009rta/pestel.git
```

### Building from source

Building from source requires [GCC](https://gcc.gnu.org/install/). Run the following command to build all executable files

```
make
```

The executable files are generated and stored in the folder `./build/`.

## Usage
Usage of all the executables is described below. 

### - pestel
```
Usage: pestel [OPTION...]
```

Inputs/Outputs:
- STDIN: description of a (generalized) parity game in extended-HOA/pgsolver format
- STDOUT: a winning strategy template 

The possible OPTIONs are as follows:
- --localize: print only a local template for each state in JSON format
- --print-actions: print the template with actions instead of edges (only for games with labels on edges)
- --print-game: print the parity game (same format as input)
- --print-game=pg: print the parity game in pgsolver format
- --print-template-size: print size of the templates

Example usage:
```
pestel --print-template-size < ./examples/ltl2dpa01.tlsf.gm
```

### - pg2gpg
```
Usage: pg2gpg 
```

Inputs/Outputs:
- STDIN: description of a parity game in extended-HOA/pgsolver format
- STDOUT: a generalized parity game (in pgsolver format) that is equivalent to the given parity game obtained by using standard conversion from parity games to Streett games

Example usage:
```
pg2gpg < ./examples/test_hoa_01.hoa
```

### - pg2randgpg
```
Usage: pg2randgpg [num_obj] [max_col]
```

Inputs/Outputs:
- num_obj: number of parity objectives to be generated
- max_col: maximum priority of the parity objectives
- STDIN: description of a parity game in extended-HOA/pgsolver format
- STDOUT: a generalized parity game (in pgsolver format) obtained by adding a number of random parity objectives to the given game graph

Example usage:
```
pg2randgpg 4 2 < ./examples/test_pg_01.gm
```

### - hoa2pg
```
Usage: hoa2pg 
```

Inputs/Outputs:
- STDIN: description of a parity game in extended-HOA format
- STDOUT: description of the same parity game in pgsolver format

Example usage:
```
hoa2pg < ./examples/test_hoa_01.hoa
```

