Make builder naming and behaviour more consistent #120
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm breaking up the refactor into several (squash-mergeable) PRs, to make it easier to view diffs and future
git blame
s.This PR touches many files but is mostly just renaming and code motion. The biggest naming changes are:
Manager
->Builder
mgr
/man
->builder
from_cnf
is an instance method, convert tocompile_cnf
For BDDs,
BddPtr
andBddManager
. There is now one concreteBddPtr
(the old one inbdd.rs
), aBddBuilder
trait, and a concreteRobddBuilder
. The functionality is split up between the trait and the concrete implementation, which now live in different files.BddPlan
to its own top-level module; in the future, this will become aBottomUpPlan
compile_cnf
) to be part of theBddBuilder
traitnode_ref
fn and changed call sites to pattern matchBottomUpBuilder::eq
instead ofbdd_eq
For SDDs,
SddManager
->SddBuilder
(and implementing structs)BottomUpBuilder::eq
instead ofsdd_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)
.