Skip to main content

Python abstraction around Binary Decision Diagrams to implement Multivalued Decision Diagrams.

Project description

Py-MDD

Python abstraction around Binary Decision Diagrams to implement Multivalued Decision Diagrams.

Build Status codecov PyPI version License: MIT

Installation

If you just need to use py-mdd, you can just run:

$ pip install mdd

For developers, note that this project uses the poetry python package/dependency management tool. Please familarize yourself with it and then run:

$ poetry install

Usage

    interface = mdd.Interface(
        inputs={
            "x": [1, 2, 3],
            "y": [6, 'w'], 
            "z": [7, True, 8],
        }, 
        output=[-1, 0, 1],
    )
    func = interface.constantly(-1)
    assert func({'x': 1, 'y': 'w', 'z': 8}) == -1

The mdd api centers around three DecisionDiagram objects.

This object is a wrapper around a Binary Decision Diagram object (from dd).

Interfaces, Inputs, and Outputs

MDD Manipulations

  1. partial assigments.
  2. overrides.
  3. setting order.
  4. wrapping lifting a bdd.

Variables and Encodings

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdd-0.1.1.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

mdd-0.1.1-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page