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

Bug: one & is missing. It is very likely a typo. #4627

Closed
ustchcs-bugfinder opened this issue Aug 12, 2020 · 0 comments
Closed

Bug: one & is missing. It is very likely a typo. #4627

ustchcs-bugfinder opened this issue Aug 12, 2020 · 0 comments

Comments

@ustchcs-bugfinder
Copy link

if (is_app(e) & m_util.is_mul(e)) {

expr_ref arith_rewriter::neg_monomial(expr* e) const {
    expr_ref_vector args(m());
    rational a1;
    if (is_app(e) & m_util.is_mul(e)) {                                                 // Should be &&  ?
        if (is_numeral(to_app(e)->get_arg(0), a1)) {
            if (!a1.is_minus_one()) {
                args.push_back(m_util.mk_numeral(-a1, m_util.is_int(e)));
            }
            args.append(to_app(e)->get_num_args() - 1, to_app(e)->get_args() + 1);
        }
        else {
            args.push_back(m_util.mk_numeral(rational(-1), m_util.is_int(e)));
            args.push_back(e);
        }
    }
...

Reported by: USTCHCS Analysis Toolsuite Bugfinder
(bugfinder-5.2: Bit-wise operators should not be used where logical operators should be used.)

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

1 participant