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

Disentangle VarOrder and BddPtr via PartialVariableOrder trait #164

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

mattxwang
Copy link
Member

Two problems:

  1. VarOrder's first, first_essential, and sort methods rely on the input type being a BddPtr, which causes problems for Semantic BDD Pointers! #163. So, I've instead abstracted the idea of a partial variable order, i.e. that structs may or may not have a sortable variable, to a trait; BddPtr (and soon, SemanticBddPtr) implements this trait. This caused minimal code impact.
  2. first, first_essential, and sort shouldn't consume their inputs, so I've changed these to just be refs. Required lifetime annotations.

Then, added doctests for these methods!

…trait, fixes ref/lifetimes

Two problems:

1. `VarOrder`'s `first`, `first_essential`, and `sort` methods rely
   on the input type being a `BddPtr`, which causes problems for
   #163. So, I've instead abstracted the idea of a partial variable order,
   i.e. that structs may or may not have a sortable variable,
   to a trait; `BddPtr` (and soon, `SemanticBddPtr`) implements
   this trait. This caused minimal code impact.
2. `first`, `first_essential`, and `sort` shouldn't consume their
   inputs, so I've changed these to just be refs. Required lifetime
   annotations.

Then, added doctests for these methods!
@mattxwang mattxwang merged commit 0be1607 into main Jul 27, 2023
7 checks passed
@mattxwang mattxwang deleted the partial-variable-order branch July 27, 2023 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant