Skip to content

Generalise API to use Assignment Functions / Generators #452

Description

@ssoelvsten

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.

⚠️ 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) ⚠️
  • Add bdd_restrict(bdd f, generator<std::pair<bdd::label_type, bool>> as) ⚠️
  • Add template<typename IT> bdd_restrict(bdd f, IT begin, IT end) ⚠️

bdd_eval

  • Add bdd_eval(bdd f, std::function<std::pair<label_t, bool>()> gen) ⚠️
  • Add template<typename IT> bdd_eval(bdd f, IT begin, IT end) ⚠️

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions