adiar
adiar copied to clipboard
Generalise API to use Assignment Functions / Generators
Follow-up on #147 , #419 , and #225 :
The Restrict and Eval function currently takes a shared_file<assignment_t>
as an input which is quite clunky.
:warning: These will break when we introduce variable reordering (?).
bdd_restrict
- [ ] Add
bdd_restrict(bdd f, function<optional<bool>(bdd::label_type)> af)
- [ ] Add
bdd_restrict(bdd f, generator<int> as)
:warning: - [x] Add
bdd_restrict(bdd f, generator<std::pair<bdd::label_type, bool>> as)
:warning: - [x] Add
template<typename IT> bdd_restrict(bdd f, IT begin, IT end)
:warning:
bdd_eval
- [x] Add
bdd_eval(bdd f, std::function<std::pair<label_t, bool>()> gen)
:warning: - [x] Add
template<typename IT> bdd_eval(bdd f, IT begin, IT end)
:warning:
Notes
We may also at this point want to reconsider some of the design choices on assignment_func
in #419 . The generator functions should definitely return true
or false
rather having a third "incorrect" value.