Skip to main content

gr1py is an enumerative (or concrete) reactive synthesis tool for the GR(1) fragment of LTL. It is pure Python.

Installation

Releases are available from the Python Package Index at https://pypi.org/project/gr1py/ To get it from there and check the version, try

pip install gr1py
gr1py -V

pip should get dependencies for you if you do not have them. They are

If it is available, NetworkX (https://networkx.github.io/) will be used. However, it is not required. A simple built-in class for directed graphs will be used if NetworkX is not found.

If you want to hack on gr1py, clone the repository from https://github.com/slivingston/gr1py.git

Current CI server report:

build status from GitHub Actions

Examples

Besides the Python package, a script named gr1py is installed that provides access to several routines from the command-line. Consider the file named examples/arbiter3.spc that is included in the source release. To check that the specification defined by it can be realized, try

gr1py -r examples/arbiter3.spc

To synthesize a winning strategy and dump it in the Graphviz DOT format, try

gr1py -t dot examples/arbiter3.spc > arbiter3-fsm.dot
dot -Tsvg -O arbiter3-fsm.dot

where the second command uses the program dot (part of Graphviz) to create an SVG file, likely named arbiter3-fsm.dot.svg; e.g., the file can be displayed using a Web browser or Inkscape.

A summary of command-line usage can be obtained by grpy -h.

Input formats

The default input format is that of gr1c (http://scottman.net/2012/gr1c).

Output formats

These are selected from the command-line using the -t switch. Each corresponds to a function in gr1py.output.

Feedback and contributing

Bug reports, feature requests, and comments can be submitted via the project issue tracker or via email to the authors.

Code contributions are welcome. To avoid redundant effort, please check for an existing issue or other indication of prior or intended work before starting. When ready for review, send a pull request.

License

This is free software released under the terms of the BSD 3-Clause License. There is no warranty; not even for merchantability or fitness for a particular purpose. Consult LICENSE for copying conditions.

Metadata

Release files for gr1py 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gr1py 0.3.1
File Size Uploaded
gr1py-0.3.1.tar.gz 22.4 kB Details

Release files / gr1py-0.3.1.tar.gz

Download URL gr1py-0.3.1.tar.gz
Size 22.4 kB
Tags Source
SHA-256 checksum
How to use checksums
efc7922b84a02bc9d5d2a5c66c59cedd67a123f7bf0864930fbd77a0f9819382
BLAKE2b-256 checksum
How to use checksums
046d1abdc9571de6ae773886f72830db9f8a2c306d597961cd3725ccf61b5edc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.3.1 This release

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

0.0.4

1 release file

0.0.3

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page