It is kinda odd that bdd_topvar() and its siblings is not safe for terminals. We should make it return something more meaningful. One of the following two would work, I see arguments for both.
- Return
bdd::max_label+1 in this case (bdd::pointer_type::terminal_level)
- Change the return type to
optional<bdd::label_type> and return nothing in this case.
I prefer the prior, since it is not a breaking change.
It is kinda odd that
bdd_topvar()and its siblings is not safe for terminals. We should make it return something more meaningful. One of the following two would work, I see arguments for both.bdd::max_label+1in this case (bdd::pointer_type::terminal_level)optional<bdd::label_type>and return nothing in this case.I prefer the prior, since it is not a breaking change.