tstate
Explicit-state reachability, closure, and attractor computation for finite transition systems. Pure Python, no dependencies.
Install
pip install -e .
API
from tstate import TransitionSystem, make_quotient_system
edges = {"s0": ["s1"], "s1": ["s2"], "s2": ["s2"]}
ts = TransitionSystem(["s0"], lambda s: edges[s])
ts.reachable()
ts.is_closed(frozenset({"s2"}))
ts.closure_theorem()
ts.existential_attractor(frozenset({"s2"}))
ts.universal_attractor(frozenset({"s2"}))
ts = make_quotient_system(n=1000, k=3, local_succ=lambda v: {1} if v == 0 else {2})
len(ts.reachable()) # 501501
Scaling
| n | full (3^n) | quotient |
|---|---|---|
| 9 | 19,683 | — |
| 100 | 3^100 | 5,151 |
| 1000 | 3^1000 | 501,501 |
| 5000 | 3^5000 | 12,507,501 |
Test
pytest -q
Metadata
Release files for tstate 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tstate-0.1.0.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tstate-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.2 kB
Release files / tstate-0.1.0.tar.gz
| Download URL | tstate-0.1.0.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6f4d73e97abf4464fe4c83ba30b06fa49e666560e26d5839a723bb2a06c0f87
|
|
BLAKE2b-256 checksum How to use checksums |
d83fff26dc03f905f3eebf15fd5169dd259c84ac7db83ddee03dcf57da7bbd74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / tstate-0.1.0-py3-none-any.whl
| Download URL | tstate-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f94795202578d0f0a4b779cac1a8186fe38ceed847bac905668c1f2d271b042
|
|
BLAKE2b-256 checksum How to use checksums |
9435a7e3861050bd2c0ebf31bab08096f9208b4a8b5f665b85963df18a12558b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|