Skip to main content

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.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 morphata 2.3.1
File Size Uploaded Provenance Actions
morphata-2.3.1.tar.gz 504.1 kB Without provenance Details for morphata-2.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for morphata 2.3.1
File Interpreter ABI Platform Actions
morphata-2.3.1-py3-none-any.whl Python 3 none any Details for morphata-2.3.1-py3-none-any.whl

Total release size: 643.5 kB

Release files / morphata-2.3.1.tar.gz

Download URL morphata-2.3.1.tar.gz
Size 504.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7213defe56cd5bd40bd3eb0d120e2262288ee530b75c4a38865c073a68680ba6
BLAKE2b-256 checksum
How to use checksums
fa0aca410c7aa2d113f48d5314f5f57e8e106f2d4905fe0c06fd6000df05c230
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.1-py3-none-any.whl

Download URL morphata-2.3.1-py3-none-any.whl
Size 139.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7187c1ee1f4e1839d4d8ba20928c35ce28110cff83c66d5f8434f76c309a1a26
BLAKE2b-256 checksum
How to use checksums
bb71a56c0ef3ae49a1ab13c675becf1b87438ef23e45c533fc16531d1c7657bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.1

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.

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