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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file morphata-2.2.2.tar.gz.
File metadata
- Download URL: morphata-2.2.2.tar.gz
- Upload date:
- Size: 358.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"42","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a17525cb220ca6c8fab0683b0dc6972dc043347b72d53d3b1f36e363551e525d
|
|
| MD5 |
a414b382c38f0d2aa5454682a0a82a25
|
|
| BLAKE2b-256 |
b69fc239308b1faf44dcf279923d1a89ff11032ffb5444f8049ef6f5a9c52e92
|
File details
Details for the file morphata-2.2.2-py3-none-any.whl.
File metadata
- Download URL: morphata-2.2.2-py3-none-any.whl
- Upload date:
- Size: 77.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"42","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9098e733ded49cf92c8be6e965e7b67ec0cf3cddd910afa76221fd029161f95c
|
|
| MD5 |
46349da3f76d1356131bfb5eaca6e1fb
|
|
| BLAKE2b-256 |
e3fc758f3c07bfb89bd45a322bae31ba52cb0a97a497485ee7a956bf9b775b17
|