Choose contracts to be analyzed by the SMTChecker

This commit is contained in:
Leonardo Alt
2021-04-21 10:34:14 +02:00
parent c3f639b355
commit dd1865873e
79 changed files with 1068 additions and 24 deletions
@@ -0,0 +1,43 @@
{
"language": "Solidity",
"sources":
{
"Source":
{
"content": "// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract B {
function g(uint y) public pure {
assert(y > 0);
}
}
contract A is B {
function f(uint x) public pure {
assert(x > 0);
}
}"
},
"Source2":
{
"content": "// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
import 'Source';
contract C is A {
function h(uint z) public pure {
assert(z > 100);
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "all",
"contracts":
{
"Source": ["A"], "Source2": ["C"]
}
}
}
}
@@ -0,0 +1,101 @@
{"errors":[{"component":"general","errorCode":"6328","formattedMessage":"Warning: CHC: Assertion violation happens here.
Counterexample:
y = 0
Transaction trace:
A.constructor()
B.g(0)
--> Source:5:7:
|
5 | \t\t\t\t\t\tassert(y > 0);
| \t\t\t\t\t\t^^^^^^^^^^^^^
","message":"CHC: Assertion violation happens here.
Counterexample:
y = 0
Transaction trace:
A.constructor()
B.g(0)","severity":"warning","sourceLocation":{"end":137,"file":"Source","start":124},"type":"Warning"},{"component":"general","errorCode":"6328","formattedMessage":"Warning: CHC: Assertion violation happens here.
Counterexample:
x = 0
Transaction trace:
A.constructor()
A.f(0)
--> Source:10:7:
|
10 | \t\t\t\t\t\tassert(x > 0);
| \t\t\t\t\t\t^^^^^^^^^^^^^
","message":"CHC: Assertion violation happens here.
Counterexample:
x = 0
Transaction trace:
A.constructor()
A.f(0)","severity":"warning","sourceLocation":{"end":231,"file":"Source","start":218},"type":"Warning"},{"component":"general","errorCode":"6328","formattedMessage":"Warning: CHC: Assertion violation happens here.
Counterexample:
y = 0
Transaction trace:
A.constructor()
B.g(0)
--> Source:5:7:
|
5 | \t\t\t\t\t\tassert(y > 0);
| \t\t\t\t\t\t^^^^^^^^^^^^^
","message":"CHC: Assertion violation happens here.
Counterexample:
y = 0
Transaction trace:
A.constructor()
B.g(0)","severity":"warning","sourceLocation":{"end":137,"file":"Source","start":124},"type":"Warning"},{"component":"general","errorCode":"6328","formattedMessage":"Warning: CHC: Assertion violation happens here.
Counterexample:
x = 0
Transaction trace:
A.constructor()
A.f(0)
--> Source:10:7:
|
10 | \t\t\t\t\t\tassert(x > 0);
| \t\t\t\t\t\t^^^^^^^^^^^^^
","message":"CHC: Assertion violation happens here.
Counterexample:
x = 0
Transaction trace:
A.constructor()
A.f(0)","severity":"warning","sourceLocation":{"end":231,"file":"Source","start":218},"type":"Warning"},{"component":"general","errorCode":"6328","formattedMessage":"Warning: CHC: Assertion violation happens here.
Counterexample:
z = 0
Transaction trace:
C.constructor()
C.h(0)
--> Source2:6:7:
|
6 | \t\t\t\t\t\tassert(z > 100);
| \t\t\t\t\t\t^^^^^^^^^^^^^^^
","message":"CHC: Assertion violation happens here.
Counterexample:
z = 0
Transaction trace:
C.constructor()
C.h(0)","severity":"warning","sourceLocation":{"end":165,"file":"Source2","start":150},"type":"Warning"}],"sources":{"Source":{"id":0},"Source2":{"id":1}}}