Skip to content

Commit 4cae2a3

Browse files
Rename variables in boolbv_equality for readability
1 parent ca235a9 commit 4cae2a3

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/solvers/flattening/boolbv_equality.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,24 @@ literalt boolbvt::convert_equality(const equal_exprt &expr)
4141
return record_array_equality(expr);
4242
}
4343

44-
const bvt &bv0=convert_bv(expr.lhs());
45-
const bvt &bv1=convert_bv(expr.rhs());
44+
const bvt &lhs_bv = convert_bv(expr.lhs());
45+
const bvt &rhs_bv = convert_bv(expr.rhs());
4646

4747
DATA_INVARIANT(
48-
bv0.size() == bv1.size(),
49-
std::string("unexpected size mismatch on equality:\n") + "lhs: " +
50-
expr.lhs().pretty() + '\n' + "lhs size: " + std::to_string(bv0.size()) +
51-
'\n' + "rhs: " + expr.rhs().pretty() + '\n' +
52-
"rhs size: " + std::to_string(bv1.size()));
48+
lhs_bv.size() == rhs_bv.size(),
49+
std::string("unexpected size mismatch on equality:\n") +
50+
"lhs: " + expr.lhs().pretty() + '\n' + "lhs size: " +
51+
std::to_string(lhs_bv.size()) + '\n' + "rhs: " + expr.rhs().pretty() +
52+
'\n' + "rhs size: " + std::to_string(rhs_bv.size()));
5353

54-
if(bv0.empty())
54+
if(lhs_bv.empty())
5555
{
5656
// An empty bit-vector comparison. It's not clear
5757
// what this is meant to say.
5858
return prop.new_variable();
5959
}
6060

61-
return bv_utils.equal(bv0, bv1);
61+
return bv_utils.equal(lhs_bv, rhs_bv);
6262
}
6363

6464
literalt boolbvt::convert_verilog_case_equality(
@@ -75,18 +75,18 @@ literalt boolbvt::convert_verilog_case_equality(
7575
"######### lhs: " + expr.lhs().pretty() + '\n' +
7676
"######### rhs: " + expr.rhs().pretty());
7777

78-
const bvt &bv0=convert_bv(expr.lhs());
79-
const bvt &bv1=convert_bv(expr.rhs());
78+
const bvt &lhs_bv = convert_bv(expr.lhs());
79+
const bvt &rhs_bv = convert_bv(expr.rhs());
8080

8181
DATA_INVARIANT(
82-
bv0.size() == bv1.size(),
82+
lhs_bv.size() == rhs_bv.size(),
8383
std::string("unexpected size mismatch on verilog_case_equality:\n") +
8484
"lhs: " + expr.lhs().pretty() + '\n' + "lhs size: " +
85-
std::to_string(bv0.size()) + '\n' + "rhs: " + expr.rhs().pretty() + '\n' +
86-
"rhs size: " + std::to_string(bv1.size()));
85+
std::to_string(lhs_bv.size()) + '\n' + "rhs: " + expr.rhs().pretty() +
86+
'\n' + "rhs size: " + std::to_string(rhs_bv.size()));
8787

8888
if(expr.id()==ID_verilog_case_inequality)
89-
return !bv_utils.equal(bv0, bv1);
89+
return !bv_utils.equal(lhs_bv, rhs_bv);
9090
else
91-
return bv_utils.equal(bv0, bv1);
91+
return bv_utils.equal(lhs_bv, rhs_bv);
9292
}

0 commit comments

Comments
 (0)