Skip to content

Commit d5466a1

Browse files
8.2.3 Release
8.2.3 Release 9b370d58c06748873dd9c1d52ba11e394ec3b042
2 parents 04cd39e + d856015 commit d5466a1

File tree

98 files changed

+4830
-546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+4830
-546
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"build_cache": true,
3+
"files": [
4+
"Test.sol"
5+
],
6+
"loop_iter": 3,
7+
"msg": "buggy ghost",
8+
"optimistic_loop": true,
9+
"parametric_contracts": [
10+
"Test"
11+
],
12+
"rule": [
13+
"buggyGhost"
14+
],
15+
"rule_sanity": "basic",
16+
"solc": "solc8.28",
17+
"solc_via_ir": true,
18+
"verify": "Test:Test.spec"
19+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
contract Test {
2+
uint public i;
3+
4+
function bar() external {}
5+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
ghost uint256 cachedIndex;
2+
3+
rule buggyGhost(uint256 assetId) {
4+
env e;
5+
6+
cachedIndex = currentContract.i;
7+
uint256 before = cachedIndex;
8+
9+
storage init_state = lastStorage;
10+
11+
assert before == cachedIndex;
12+
13+
bar(e) at init_state;
14+
assert before == cachedIndex;
15+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rules": {
3+
"buggyGhost": "SUCCESS"
4+
}
5+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"files": [
3+
"./Test.sol:Test"
4+
],
5+
"optimistic_loop": true,
6+
"solc": "solc4.24",
7+
"verify": "Test:./trivial.spec"
8+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
contract Test {
2+
function doThing(uint x) internal returns (uint, uint[] memory, uint[] memory) {
3+
if(x == 4) {
4+
return (0, new uint[](0), new uint[](0));
5+
}
6+
uint[] memory y = new uint[](x);
7+
uint[] memory z = new uint[](x);
8+
return (x, y, z);
9+
}
10+
11+
function doStuff(uint z) external {
12+
doThing(z);
13+
}
14+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"rules": {
3+
"trivial": {
4+
"SUCCESS": [
5+
"doStuff(uint256)"
6+
]
7+
},
8+
"whatever": "SUCCESS"
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
rule trivial(method f) {
2+
env e;
3+
calldataarg arg;
4+
f(e, arg);
5+
assert true;
6+
}
7+
8+
rule whatever {
9+
assert true;
10+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
range: "2",
3+
ranger_failure_limit: "0",
4+
files: ["C.sol"],
5+
java_args: ["-Dlevel.bounded.model.checker=info"],
6+
prover_args: ["-bmcMerger true"],
7+
verify: "C:C.spec"
8+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
bNot1: FAIL
2+
cNot2: SUCCESS
3+
cNot8: SUCCESS

0 commit comments

Comments
 (0)