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

Make builder naming and behaviour more consistent #120

Merged
merged 12 commits into from
Jul 6, 2023
Merged

Conversation

mattxwang
Copy link
Member

@mattxwang mattxwang commented Jul 5, 2023

I'm breaking up the refactor into several (squash-mergeable) PRs, to make it easier to view diffs and future git blames.

This PR touches many files but is mostly just renaming and code motion. The biggest naming changes are:

  • Manager -> Builder
  • mgr/man -> builder
  • when from_cnf is an instance method, convert to compile_cnf

For BDDs,

  • I've removed the duplicate BddPtr and BddManager. There is now one concrete BddPtr (the old one in bdd.rs), a BddBuilder trait, and a concrete RobddBuilder. The functionality is split up between the trait and the concrete implementation, which now live in different files.
  • I've moved the BddPlan to its own top-level module; in the future, this will become a BottomUpPlan
  • I've moved compilation from various formats (ex compile_cnf) to be part of the BddBuilder trait
  • I've removed a panic-based node_ref fn and changed call sites to pattern match
  • when possible, the builder now uses the BottomUpBuilder::eq instead of bdd_eq

For SDDs,

  • I've renamed SddManager -> SddBuilder (and implementing structs)
  • when possible, the builder now uses the BottomUpBuilder::eq instead of sdd_eq

Along the way, I've also changed some minor items to be closer to Rust conventions, and removed some useless tests (ones that are assert!(true).

@mattxwang mattxwang marked this pull request as ready for review July 6, 2023 15:48
@mattxwang mattxwang changed the title Unify all implementations of BDD-related pointers/managers and BottomUpBuilder Make builder naming and behaviour more consistent Jul 6, 2023
@mattxwang mattxwang merged commit 0e9a5fb into main Jul 6, 2023
8 checks passed
@mattxwang mattxwang deleted the unify-bdd branch July 6, 2023 15:49
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