| 717 | z3app) |
| 718 | |
| 719 | expr expr::operator+(const expr &rhs) const { |
| 720 | expr a, b; |
| 721 | // (concat x const) + rhs -> (concat const+rhs) if no overflow happens |
| 722 | if (rhs.isConst() && isConcat(a, b) && b.isConst()) { |
| 723 | auto rhs2 = rhs.trunc(b.bits()); |
| 724 | if (rhs2.zextOrTrunc(rhs.bits()).eq(rhs) && |
| 725 | b.add_no_uoverflow(rhs2).isTrue()) |
| 726 | return a.concat(b + rhs2); |
| 727 | } |
| 728 | return binopc(Z3_mk_bvadd, operator+, Z3_OP_BADD, isZero, alwaysFalse); |
| 729 | } |
| 730 | |
| 731 | expr expr::operator-(const expr &rhs) const { |
| 732 | C(); |
nothing calls this directly
no test coverage detected