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

Dead code in nla_basics_lemmas.cpp #6951

Closed
sashakir opened this issue Oct 18, 2023 · 1 comment
Closed

Dead code in nla_basics_lemmas.cpp #6951

sashakir opened this issue Oct 18, 2023 · 1 comment
Assignees

Comments

@sashakir
Copy link

 lpvar u = null_lpvar, v = null_lpvar; //Here u == null_lpvar
    bool all_int = true;
    for (auto fc : f) {
        lpvar j = var(fc);
        all_int &= c().var_is_int(j);        
        if (j == null_lpvar && abs(val(j)) == abs_mv && 
            c().vars_are_equiv(j, mon_var) &&
            (mon_var_is_sep_from_zero ||  c().var_is_separated_from_zero(j))) 
            u = j; // Here u is reassigned to null_lpvar, since j == null_lpvar in if condition
        else if (abs(val(j)) != rational(1)) 
            v = j;
    }
    if (u == null_lpvar || v == null_lpvar) //This condition is always true
        return false;    

   // The subsequent code is non-reachable 
@NikolajBjorner
Copy link
Contributor

The test j == null_lpvar should have been u == null_lpvar.
So this lemma never triggered. The fix should be tested against QF_NIA.

NikolajBjorner added a commit that referenced this issue Oct 30, 2023
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants