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 early-return for bdd_exists and bdd_forall #11

Open
SSoelvsten opened this issue Jan 26, 2024 · 0 comments
Open

Add early-return for bdd_exists and bdd_forall #11

SSoelvsten opened this issue Jan 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@SSoelvsten
Copy link
Owner

SSoelvsten commented Jan 26, 2024

Consider the following piece of code in quant_rec (buddy/src/bddop.c)

   PUSHREF( quant_rec(LOW(r)) );
   PUSHREF( quant_rec(HIGH(r)) );
   
   if (INVARSET(LEVEL(r)))
      res = apply_rec(READREF(2), READREF(1));
   else
      res = bdd_makenode(LEVEL(r), READREF(2), READREF(1));

We can entirely circumvent the quant_rec(HIGH(r)) if

  1. The quant_rec(LOW(r)) returned a terminal that shortcuts the given operator (see the base cases for apply_rec in the same folder for how to do so).
  2. INVARSET(LEVEL(r)) is true
@SSoelvsten SSoelvsten added the enhancement New feature or request label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant