Merge pull request #11256 from ethereum/smt_target_array

Change settings.modelChecker.targets to take an array instead of string
This commit is contained in:
chriseth
2021-04-19 18:47:06 +02:00
committed by GitHub
41 changed files with 180 additions and 62 deletions
@@ -1 +1 @@
--model-checker-engine all --model-checker-targets all
--model-checker-engine all --model-checker-targets default
@@ -1 +1 @@
--model-checker-engine bmc --model-checker-targets all
--model-checker-engine bmc --model-checker-targets default
@@ -1 +1 @@
--model-checker-engine chc --model-checker-targets all
--model-checker-engine chc --model-checker-targets default
@@ -23,8 +23,7 @@
{
"modelChecker":
{
"engine": "all",
"targets": "all"
"engine": "all"
}
}
}
@@ -23,8 +23,7 @@
{
"modelChecker":
{
"engine": "bmc",
"targets": "all"
"engine": "bmc"
}
}
}
@@ -23,8 +23,7 @@
{
"modelChecker":
{
"engine": "chc",
"targets": "all"
"engine": "chc"
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "bmc",
"targets": "assert"
"targets": ["assert"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "chc",
"targets": "assert"
"targets": ["assert"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "bmc",
"targets": "balance"
"targets": ["balance"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "chc",
"targets": "balance"
"targets": ["balance"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "bmc",
"targets": "constantCondition"
"targets": ["constantCondition"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "chc",
"targets": "constantCondition"
"targets": ["constantCondition"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "bmc",
"targets": "divByZero"
"targets": ["divByZero"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "chc",
"targets": "divByZero"
"targets": ["divByZero"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "all",
"targets": "aaa,bbb"
"targets": []
}
}
}
@@ -0,0 +1 @@
{"errors":[{"component":"general","formattedMessage":"settings.modelChecker.targets must be a non-empty array.","message":"settings.modelChecker.targets must be a non-empty array.","severity":"error","type":"JSONError"}]}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "bmc",
"targets": "outOfBounds"
"targets": ["outOfBounds"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "chc",
"targets": "outOfBounds"
"targets": ["outOfBounds"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "bmc",
"targets": "overflow"
"targets": ["overflow"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "chc",
"targets": "overflow"
"targets": ["overflow"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "bmc",
"targets": "popEmptyArray"
"targets": ["popEmptyArray"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "chc",
"targets": "popEmptyArray"
"targets": ["popEmptyArray"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "bmc",
"targets": "underflow"
"targets": ["underflow"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "chc",
"targets": "underflow"
"targets": ["underflow"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "bmc",
"targets": "underflow,overflow,assert"
"targets": ["underflow", "overflow", "assert"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "chc",
"targets": "underflow,overflow,assert"
"targets": ["underflow", "overflow", "assert"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "bmc",
"targets": "underflow,overflow"
"targets": ["underflow", "overflow"]
}
}
}
@@ -24,7 +24,7 @@
"modelChecker":
{
"engine": "chc",
"targets": "underflow,overflow"
"targets": ["underflow", "overflow"]
}
}
}
@@ -0,0 +1,30 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
uint[] arr;
function f(address payable a, uint x) public {
require(x >= 0);
--x;
x + type(uint).max;
2 / x;
a.transfer(x);
assert(x > 0);
arr.pop();
arr[x];
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "all",
"targets": [2]
}
}
}
@@ -0,0 +1 @@
{"errors":[{"component":"general","formattedMessage":"Every target in settings.modelChecker.targets must be a string.","message":"Every target in settings.modelChecker.targets must be a string.","severity":"error","type":"JSONError"}]}
@@ -0,0 +1,30 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
uint[] arr;
function f(address payable a, uint x) public {
require(x >= 0);
--x;
x + type(uint).max;
2 / x;
a.transfer(x);
assert(x > 0);
arr.pop();
arr[x];
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "all",
"targets": "assert"
}
}
}
@@ -0,0 +1 @@
{"errors":[{"component":"general","formattedMessage":"settings.modelChecker.targets must be an array.","message":"settings.modelChecker.targets must be an array.","severity":"error","type":"JSONError"}]}
@@ -0,0 +1,30 @@
{
"language": "Solidity",
"sources":
{
"A":
{
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0;\n\ncontract test {
uint[] arr;
function f(address payable a, uint x) public {
require(x >= 0);
--x;
x + type(uint).max;
2 / x;
a.transfer(x);
assert(x > 0);
arr.pop();
arr[x];
}
}"
}
},
"settings":
{
"modelChecker":
{
"engine": "all",
"targets": ["aaa", "bbb"]
}
}
}