From a73bc9d0c075804bfd4044cfd21429408edf4677 Mon Sep 17 00:00:00 2001 From: cangqiaoyuzhuo <850072022@qq.com> Date: Fri, 14 Jun 2024 22:20:05 +0900 Subject: [PATCH] chore: fix some comments (#1272) Signed-off-by: cangqiaoyuzhuo <850072022@qq.com> --- lib/Echidna/SymExec.hs | 2 +- .../TestAddressArrayUtils.sol | 50 +++++++++---------- .../TestAddressArrayUtilsRevert.sol | 50 +++++++++---------- 3 files changed, 51 insertions(+), 51 deletions(-) diff --git a/lib/Echidna/SymExec.hs b/lib/Echidna/SymExec.hs index 996a5cd7a..2c192abc7 100644 --- a/lib/Echidna/SymExec.hs +++ b/lib/Echidna/SymExec.hs @@ -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. diff --git a/tests/solidity/addressarrayutils/TestAddressArrayUtils.sol b/tests/solidity/addressarrayutils/TestAddressArrayUtils.sol index 63470ad22..1667c60da 100644 --- a/tests/solidity/addressarrayutils/TestAddressArrayUtils.sol +++ b/tests/solidity/addressarrayutils/TestAddressArrayUtils.sol @@ -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)) { @@ -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; @@ -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)) { @@ -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; @@ -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) { @@ -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; @@ -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) { @@ -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; @@ -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) { diff --git a/tests/solidity/addressarrayutils/TestAddressArrayUtilsRevert.sol b/tests/solidity/addressarrayutils/TestAddressArrayUtilsRevert.sol index 079d7ecb4..abf690404 100644 --- a/tests/solidity/addressarrayutils/TestAddressArrayUtilsRevert.sol +++ b/tests/solidity/addressarrayutils/TestAddressArrayUtilsRevert.sol @@ -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)) { @@ -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; @@ -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)) { @@ -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; @@ -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) { @@ -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; @@ -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) { @@ -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; @@ -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) {