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.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| morphata-2.2.3.tar.gz | 424.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| morphata-2.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 520.4 kB
Release files / morphata-2.2.3.tar.gz
| Download URL | morphata-2.2.3.tar.gz |
|---|---|
| Size | 424.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d0dcd6c02e59ce233b672896efd814443b8aec81d66e5fcfaf60dd707305bd7
|
|
BLAKE2b-256 checksum How to use checksums |
59707d283835aed57fe3c82a6ec12da71d4349deb4df80997db663e065fc4dbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","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.2.3-py3-none-any.whl
| Download URL | morphata-2.2.3-py3-none-any.whl |
|---|---|
| Size | 96.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12c3d71dc16fc324eda91544a15209e1f3f900e1554e083f04d3f53e04124499
|
|
BLAKE2b-256 checksum How to use checksums |
918b946c8dc8aec1ec75d40893e56fa8e6b55af0aa6a88054f1ef8573421f92b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","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}
|