MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / ctpop

Method ctpop

smt/expr.cpp:1111–1121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1109}
1110
1111expr expr::ctpop() const {
1112 C();
1113 auto nbits = bits();
1114
1115 auto res = mkUInt(0, sort());
1116 for (unsigned i = 0; i < nbits; ++i) {
1117 res = res + extract(i, i).zext(nbits - 1);
1118 }
1119
1120 return res;
1121}
1122
1123expr expr::umin(const expr &rhs) const {
1124 return mkIf(ule(rhs), *this, rhs);

Callers 1

toSMTMethod · 0.80

Calls 1

zextMethod · 0.45

Tested by

no test coverage detected