Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative decision diagram library #18

Open
10 tasks
grencez opened this issue Mar 28, 2021 · 0 comments
Open
10 tasks

Alternative decision diagram library #18

grencez opened this issue Mar 28, 2021 · 0 comments
Assignees
Labels

Comments

@grencez
Copy link
Collaborator

grencez commented Mar 28, 2021

The glu 2.4 multi-value decision diagram library seems to cause problems on Mac, and Windows cannot build it.

One path forward to implement an MDD structure ourselves. Pham and Emerson (https://www.researchgate.net/publication/236149939_Implementing_Binary_Decision_Diagram) show the algorithm for BDDs.

  • We can save memory by serializing the DD nodes in a bit vector, using only as many bits as necessary to represent variable and node indices.
  • Node storage is aligned to byte boundary.
    • size_t is guaranteed to hold node id.
    • hash table can point to key easily.
  • Represent False and True as 00 and 01 bits to save space. Others have a preceding 1 bit.

The necessary functions are just:

  • make(ctx, sign): 1 is true, -1 is false
  • restrict(&x, var, val): x &= (var=val)
  • smooth(&x, signz, z): x without vars set in z, or x with only the vars in z
  • transition(x, y): f such that f(x)=y
  • ite(x, signy, y, signz, z):
  • image(f, x): f(x)
  • preimage(f, y): minimal x where f(x) = y

Supporting data structures:

  • Hash map for (xnode, y_or_z) -> node idx
  • Hash map for node content -> node idx
  • Function to extract bits from bytes
@grencez grencez self-assigned this Mar 28, 2021
@grencez grencez changed the title Make a simple multi-valued decision diagram library Alternative decision diagram library Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant