Morphata
morphata does representation theory for automata. An automaton – its states, transitions, and acceptance condition – is a structural object. SymbolicAutomaton is the BDD-backed structural representation. MatrixOperator and PolynomialOperator interpret that structure over semiring and bounded-distributive-lattice domains.
It builds on algebraic for backend-agnostic semiring algebra (NumPy, JAX, PyTorch).
To install the latest release of morphata, install from PyPI:
pip install morphata
Or from the latest Git head:
pip install 'morphata @ git+https://git.anandb.dev/morphata.git@main'
For more, see the documentation.
>>> import logic_asts as logic
>>> import logic_asts.ltl as ltl
>>> from morphata.alphabet import powerset_alphabet
>>> from morphata.logic import formula_to_automaton
>>> a = logic.Variable("a")
>>> aut = formula_to_automaton(
... ltl.Eventually(a), alphabet=powerset_alphabet({"a"}), finite=True
... )
>>> aut.accepts([set(), {"a"}])
True
Omega-regular conditions are supported structurally, but infinite-run acceptance evaluation is not implemented. See the full documentation for details.
Citation
To cite the use of this package or the papers that are derived from it you can use the below BibTeX entries.
For differentiable weighted automata in general:
@inproceedings{balakrishnan2024differentiable, title = {Differentiable {{Weighted Automata}}}, booktitle = {{{ICML}} 2024 {{Workshop}} on {{Differentiable Almost Everything}}: {{Differentiable Relaxations}}, {{Algorithms}}, {{Operators}}, and {{Simulators}}}, author = {Balakrishnan, Anand and Deshmukh, Jyotirmoy V.}, year = 2024, month = jun, url = {https://openreview.net/forum?id=k2hIQYqHTh}, copyright = {All rights reserved}, langid = {english} }For weighted automata in motion planning:
@inproceedings{balakrishnan2024motion, title = {Motion {{Planning}} for {{Automata-based Objectives}} Using {{Efficient Gradient-based Methods}}}, booktitle = {2024 {{IEEE}}/{{RSJ International Conference}} on {{Intelligent Robots}} and {{Systems}} ({{IROS}})}, author = {Balakrishnan, Anand and Atasever, Merve and Deshmukh, Jyotirmoy V.}, year = 2024, month = oct, pages = {13734--13740}, issn = {2153-0866}, doi = {10.1109/IROS58592.2024.10802177} }For alternating weighted automata in multi-agent systems:
@inproceedings{balakrishnan2025monitoring, title = {Monitoring {{Spatially Distributed Cyber-Physical Systems}} with {{Alternating Finite Automata}}}, booktitle = {Proceedings of the 28th {{ACM International Conference}} on {{Hybrid Systems}}: {{Computation}} and {{Control}}}, author = {Balakrishnan, Anand and Paul, Sheryl and Silvetti, Simone and Nenzi, Laura and Deshmukh, Jyotirmoy V.}, year = 2025, month = may, pages = {1--11}, publisher = {ACM}, address = {Irvine CA USA}, doi = {10.1145/3716863.3718033}, isbn = {979-8-4007-1504-4}, langid = {english} }
License
See the LICENSE file for details.
Metadata
Release files for morphata 2.3.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 | Provenance | Actions |
|---|---|---|---|---|
| morphata-2.3.0.tar.gz | 492.6 kB | Without provenance | Details for morphata-2.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| morphata-2.3.0-py3-none-any.whl | Python 3 | none | any | Details for morphata-2.3.0-py3-none-any.whl |
Total release size: 616.3 kB
Release files / morphata-2.3.0.tar.gz
| Download URL | morphata-2.3.0.tar.gz |
|---|---|
| Size | 492.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
775be188f527a1dfc98e5b90468df097f5704d603f656d4d459b9ed1c1ff4b19
|
|
BLAKE2b-256 checksum How to use checksums |
4d8d3cd493151d2d425263a834fe347a0d97f4a55e91d2019869a565370821ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / morphata-2.3.0-py3-none-any.whl
| Download URL | morphata-2.3.0-py3-none-any.whl |
|---|---|
| Size | 123.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7920d12d6fe3f614c15208e86383c9ed1c200b540922d60b339e7715452792fa
|
|
BLAKE2b-256 checksum How to use checksums |
85e3edc9a28d3fd29de75b526ef44579a8ea3b01d092da8a3c024e3cebf4147b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for morphata 2.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.