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.1.tar.gz (355.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.1-py3-none-any.whl (77.3 kB view details)

Uploaded Python 3

File details

Details for the file morphata-2.2.1.tar.gz.

File metadata

  • Download URL: morphata-2.2.1.tar.gz
  • Upload date:
  • Size: 355.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.1.tar.gz
Algorithm Hash digest
SHA256 055160f1ca58f07b9bd8f5e30f9b4990c877c6bc607cb27c4ca1019aad486579
MD5 4038ea03091ac69b19df4d9580ea9242
BLAKE2b-256 74eaded4a749d577d8d11d7886f7a307b609554284cb8dd08efb63f8511eb57a

See more details on using hashes here.

File details

Details for the file morphata-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: morphata-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 77.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db7073cf0054455a8192e3f09a0bc63a97f501bea737c5275adb8989055d819b
MD5 9d67bd60a648fde7b220f1781fe334f5
BLAKE2b-256 965b044176964381bc69240377819a898c4f4fb332738a3d18b707c69d47c899

See more details on using hashes here.

Release history Release notifications | RSS feed

2.2.2

2 files

This release

2.2.1 This release

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