Skip to main content

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

morphata-2.2.2.tar.gz (358.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

morphata-2.2.2-py3-none-any.whl (77.9 kB view details)

Uploaded Python 3

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

Hashes for morphata-2.2.2.tar.gz
Algorithm Hash digest
SHA256 a17525cb220ca6c8fab0683b0dc6972dc043347b72d53d3b1f36e363551e525d
MD5 a414b382c38f0d2aa5454682a0a82a25
BLAKE2b-256 b69fc239308b1faf44dcf279923d1a89ff11032ffb5444f8049ef6f5a9c52e92

See more details on using hashes here.

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

Hashes for morphata-2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9098e733ded49cf92c8be6e965e7b67ec0cf3cddd910afa76221fd029161f95c
MD5 46349da3f76d1356131bfb5eaca6e1fb
BLAKE2b-256 e3fc758f3c07bfb89bd45a322bae31ba52cb0a97a497485ee7a956bf9b775b17

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.2.2 This release

2 files

2.2.1

2 files

2.2.0

2 files

2.1.0

2 files

2.0.10

2 files

2.0.9

2 files

2.0.8

2 files

2.0.7

2 files

2.0.6

2 files

2.0.5

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

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