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.0.tar.gz (353.8 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.0-py3-none-any.whl (76.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: morphata-2.2.0.tar.gz
  • Upload date:
  • Size: 353.8 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.0.tar.gz
Algorithm Hash digest
SHA256 f599616fffba34cc8c29f3699c4e8aea8da1b7d7db86fc828750996588e2d3f2
MD5 ac578e664b18ef6bba7365e3fc1730e5
BLAKE2b-256 9c678252b2bc322daee0a83577b3e5712344e5ecee86b67fa00e1e56b9900a00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: morphata-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 76.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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a92dec9834fbfc191a2440d3d0ef0a3e02f38ec31cad2e8ab1a45603dba07bab
MD5 f097414f0991674c62c1179c1371dd2a
BLAKE2b-256 63fd5baa66498bc45079ea6a685c24d63ae0ddb3fe8b0ce7c4ca46a2a3ec1301

See more details on using hashes here.

Release history Release notifications | RSS feed

2.2.2

2 files

2.2.1

2 files

This release

2.2.0 This release

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