Skip to content

Commit

Permalink
chore: fix some comments (#1272)
Browse files Browse the repository at this point in the history
Signed-off-by: cangqiaoyuzhuo <850072022@qq.com>
  • Loading branch information
cangqiaoyuzhuo authored Jun 14, 2024
1 parent 1cb47b3 commit a73bc9d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion lib/Echidna/SymExec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ substExpr (sw, sa, val) = mapExpr go where
go TxValue = Lit val
go e = e

-- | Fetcher used during concolic exeuction.
-- | Fetcher used during concolic execution.
-- This is the most important function for concolic execution;
-- it determines what branch `interpret` should take.
-- We ensure that this fetcher is always used by setting askSMTIter to 0.
Expand Down
50 changes: 25 additions & 25 deletions tests/solidity/addressarrayutils/TestAddressArrayUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -329,24 +329,24 @@ contract TEST {
if (!AddressArrayUtils.contains(addrs1, a)) {
return true;
}
uint256 acount = 0;
uint256 account = 0;
uint256 i;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acount++;
account++;
}
}
address [] memory removed = AddressArrayUtils.remove(addrs1, a);
if (removed.length != (addrs1.length-1)) {
return false;
}
uint256 acountNew = 0;
uint256 accountNew = 0;
for (i = 0; i < removed.length; i++) {
if (removed[i] == a) {
acountNew++;
accountNew++;
}
}
if (acountNew != (acount-1)) {
if (accountNew != (account-1)) {
return false;
}
if (!AddressArrayUtils.hasDuplicate(addrs1)) {
Expand All @@ -367,11 +367,11 @@ contract TEST {
uint256 aIndex;
bool aFound;
(aIndex, aFound) = AddressArrayUtils.indexOf(addrs1, a);
uint256 acount = 0;
uint256 account = 0;
uint256 i;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acount++;
account++;
}
}
address [] memory removed;
Expand All @@ -383,13 +383,13 @@ contract TEST {
if (removed.length != (addrs1.length-1)) {
return false;
}
uint256 acountNew = 0;
uint256 accountNew = 0;
for (i = 0; i < removed.length; i++) {
if (removed[i] == a) {
acountNew++;
accountNew++;
}
}
if (acountNew != (acount-1)) {
if (accountNew != (account-1)) {
return false;
}
if (!AddressArrayUtils.hasDuplicate(addrs1)) {
Expand All @@ -407,11 +407,11 @@ contract TEST {
if (!AddressArrayUtils.contains(addrs1, a)) {
return true;
}
uint256 acount = 0;
uint256 account = 0;
uint256 i;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acount++;
account++;
}
}
uint256 oldLength = addrs1.length;
Expand All @@ -420,13 +420,13 @@ contract TEST {
if (addrs1.length != (oldLength-1)) {
return false;
}
uint256 acountNew = 0;
uint256 accountNew = 0;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acountNew++;
accountNew++;
}
}
if (acountNew != (acount-1)) {
if (accountNew != (account-1)) {
return false;
}
if (!anyDuplicates) {
Expand All @@ -447,11 +447,11 @@ contract TEST {
uint256 aIndex;
bool aFound;
(aIndex, aFound) = AddressArrayUtils.indexOf(addrs1, a);
uint256 acount = 0;
uint256 account = 0;
uint256 i;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acount++;
account++;
}
}
uint256 oldLength = addrs1.length;
Expand All @@ -463,13 +463,13 @@ contract TEST {
if (addrs1.length != (oldLength-1)) {
return false;
}
uint256 acountNew = 0;
uint256 accountNew = 0;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acountNew++;
accountNew++;
}
}
if (acountNew != (acount-1)) {
if (accountNew != (account-1)) {
return false;
}
if (!anyDuplicates) {
Expand All @@ -490,11 +490,11 @@ contract TEST {
uint256 aIndex;
bool aFound;
(aIndex, aFound) = AddressArrayUtils.indexOf(addrs1, a);
uint256 acount = 0;
uint256 account = 0;
uint256 i;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acount++;
account++;
}
}
uint256 oldLength = addrs1.length;
Expand All @@ -506,13 +506,13 @@ contract TEST {
if (addrs1.length != (oldLength-1)) {
return false;
}
uint256 acountNew = 0;
uint256 accountNew = 0;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acountNew++;
accountNew++;
}
}
if (acountNew != (acount-1)) {
if (accountNew != (account-1)) {
return false;
}
if (!anyDuplicates) {
Expand Down
50 changes: 25 additions & 25 deletions tests/solidity/addressarrayutils/TestAddressArrayUtilsRevert.sol
Original file line number Diff line number Diff line change
Expand Up @@ -329,24 +329,24 @@ contract TEST {
if (!AddressArrayUtils.contains(addrs1, a)) {
return true;
}
uint256 acount = 0;
uint256 account = 0;
uint256 i;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acount++;
account++;
}
}
address [] memory removed = AddressArrayUtils.remove(addrs1, a);
if (removed.length != (addrs1.length-1)) {
return false;
}
uint256 acountNew = 0;
uint256 accountNew = 0;
for (i = 0; i < removed.length; i++) {
if (removed[i] == a) {
acountNew++;
accountNew++;
}
}
if (acountNew != (acount-1)) {
if (accountNew != (account-1)) {
return false;
}
if (!AddressArrayUtils.hasDuplicate(addrs1)) {
Expand Down Expand Up @@ -377,11 +377,11 @@ contract TEST {
uint256 aIndex;
bool aFound;
(aIndex, aFound) = AddressArrayUtils.indexOf(addrs1, a);
uint256 acount = 0;
uint256 account = 0;
uint256 i;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acount++;
account++;
}
}
address [] memory removed;
Expand All @@ -393,13 +393,13 @@ contract TEST {
if (removed.length != (addrs1.length-1)) {
return false;
}
uint256 acountNew = 0;
uint256 accountNew = 0;
for (i = 0; i < removed.length; i++) {
if (removed[i] == a) {
acountNew++;
accountNew++;
}
}
if (acountNew != (acount-1)) {
if (accountNew != (account-1)) {
return false;
}
if (!AddressArrayUtils.hasDuplicate(addrs1)) {
Expand All @@ -417,11 +417,11 @@ contract TEST {
if (!AddressArrayUtils.contains(addrs1, a)) {
return true;
}
uint256 acount = 0;
uint256 account = 0;
uint256 i;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acount++;
account++;
}
}
uint256 oldLength = addrs1.length;
Expand All @@ -430,13 +430,13 @@ contract TEST {
if (addrs1.length != (oldLength-1)) {
return false;
}
uint256 acountNew = 0;
uint256 accountNew = 0;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acountNew++;
accountNew++;
}
}
if (acountNew != (acount-1)) {
if (accountNew != (account-1)) {
return false;
}
if (!anyDuplicates) {
Expand Down Expand Up @@ -467,11 +467,11 @@ contract TEST {
uint256 aIndex;
bool aFound;
(aIndex, aFound) = AddressArrayUtils.indexOf(addrs1, a);
uint256 acount = 0;
uint256 account = 0;
uint256 i;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acount++;
account++;
}
}
uint256 oldLength = addrs1.length;
Expand All @@ -483,13 +483,13 @@ contract TEST {
if (addrs1.length != (oldLength-1)) {
return false;
}
uint256 acountNew = 0;
uint256 accountNew = 0;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acountNew++;
accountNew++;
}
}
if (acountNew != (acount-1)) {
if (accountNew != (account-1)) {
return false;
}
if (!anyDuplicates) {
Expand Down Expand Up @@ -518,11 +518,11 @@ contract TEST {
uint256 aIndex;
bool aFound;
(aIndex, aFound) = AddressArrayUtils.indexOf(addrs1, a);
uint256 acount = 0;
uint256 account = 0;
uint256 i;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acount++;
account++;
}
}
uint256 oldLength = addrs1.length;
Expand All @@ -534,13 +534,13 @@ contract TEST {
if (addrs1.length != (oldLength-1)) {
return false;
}
uint256 acountNew = 0;
uint256 accountNew = 0;
for (i = 0; i < addrs1.length; i++) {
if (addrs1[i] == a) {
acountNew++;
accountNew++;
}
}
if (acountNew != (acount-1)) {
if (accountNew != (account-1)) {
return false;
}
if (!anyDuplicates) {
Expand Down

0 comments on commit a73bc9d

Please sign in to comment.