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

Add bdd_relprod #502

Closed
8 tasks done
SSoelvsten opened this issue May 20, 2023 · 0 comments
Closed
8 tasks done

Add bdd_relprod #502

SSoelvsten opened this issue May 20, 2023 · 0 comments
Assignees
Labels
📁 bdd Binary Decision Diagrams ✨ feature New operation or other feature

Comments

@SSoelvsten
Copy link
Owner

SSoelvsten commented May 20, 2023

For model checking, we want the bdd_relprod operatios to apply a transition relation to a set of states.

Basic Non-trivial Implementation

The most basic version is by using all of our pieces to compute (∃ x : S(x) ∧T(x,x') )[x'/x] , where the exists and replace are provided with a single function<optional<label_type>(label_type)>.

  • Add bdd_relprod with the following signature
    bdd
    bdd_relprod(const bdd& states, 
                const bdd& rel, 
                const predicate<bdd::label_type>>& pred);
  • Add bdd_relnext with the following signature
    bdd
    bdd_relnext(const bdd& states,
                const bdd& rel,
                const function<optional<bdd::label_type>(bdd::label_type)>& m
                replace_type m_type);
  • Add bdd_relprev with the following signature
    bdd
    bdd_relprev(const bdd& states,
                const bdd& rel,
                const function<optional<bdd::label_type>(bdd::label_type)>& m
                replace_type m_type);

To do so, use the Apply from v1.0 ( #35 etc. ), the Multi-variable Quantification of v2.0 ( #499 etc ), and Relabelling of v2.1 ( #498 ).

Optimisations

  • Use transposed result of bdd_and directly inside of bdd_exists
  • Add pruning optimisation to the initial transposition with bdd_and: prune a node if it has a true child and will be quantified later.
  • bdd_relnext: Include the relabelling directly inside the nested quantification sweep, if it is monotonic.
  • bdd_relprev: Support the replace_type::shift ( Add bdd_replace for monotonic renamings #498 ).
  • If it is not monotonic, then throw an exception until Extend dd_replace with non-monotonic renamings #500 is done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📁 bdd Binary Decision Diagrams ✨ feature New operation or other feature
Projects
None yet
Development

No branches or pull requests

1 participant