Merge pull request #11782 from ethereum/smt_show_unproved_flag

[SMTChecker] Make show unproved CLI a flag
This commit is contained in:
Daniel Kirchner 2021-08-11 11:35:24 +02:00 committed by GitHub
commit 990a072fe5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 9 additions and 72 deletions

View File

@ -488,7 +488,7 @@ Unproved Targets
If there are any unproved targets, the SMTChecker issues one warning stating
how many unproved targets there are. If the user wishes to see all the specific
unproved targets, the CLI option ``--model-checker-show-unproved true`` and
unproved targets, the CLI option ``--model-checker-show-unproved`` and
the JSON option ``settings.modelChecker.showUnproved = true`` can be used.
Verified Contracts

View File

@ -733,8 +733,7 @@ General Information)").c_str(),
)
(
g_strModelCheckerShowUnproved.c_str(),
po::value<bool>()->value_name("false,true")->default_value(false),
"Select whether to show all unproved targets."
"Show all unproved targets separately."
)
(
g_strModelCheckerSolvers.c_str(),
@ -1114,10 +1113,7 @@ General Information)").c_str(),
}
if (m_args.count(g_strModelCheckerShowUnproved))
{
bool showUnproved = m_args[g_strModelCheckerShowUnproved].as<bool>();
m_options.modelChecker.settings.showUnproved = showUnproved;
}
m_options.modelChecker.settings.showUnproved = true;
if (m_args.count(g_strModelCheckerSolvers))
{

View File

@ -1 +0,0 @@
--model-checker-engine all --model-checker-show-unproved false

View File

@ -1,3 +0,0 @@
Warning: CHC: 1 verification condition(s) could not be proved. Enable the model checker option "show unproved" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query.
Warning: BMC: 1 verification condition(s) could not be proved. Enable the model checker option "show unproved" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query.

View File

@ -1,12 +0,0 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract C {
struct S {
uint x;
}
S s;
function f(bool b) public {
s.x |= b ? 1 : 2;
assert(s.x > 0);
}
}

View File

@ -1 +0,0 @@
--model-checker-engine bmc --model-checker-show-unproved false

View File

@ -1 +0,0 @@
Warning: BMC: 1 verification condition(s) could not be proved. Enable the model checker option "show unproved" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query.

View File

@ -1,12 +0,0 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract C {
struct S {
uint x;
}
S s;
function f(bool b) public {
s.x |= b ? 1 : 2;
assert(s.x > 0);
}
}

View File

@ -1 +0,0 @@
--model-checker-engine chc --model-checker-show-unproved false

View File

@ -1 +0,0 @@
Warning: CHC: 1 verification condition(s) could not be proved. Enable the model checker option "show unproved" to see all of them. Consider choosing a specific contract to be verified in order to reduce the solving problems. Consider increasing the timeout per query.

View File

@ -1,12 +0,0 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract C {
struct S {
uint x;
}
S s;
function f(bool b) public {
s.x |= b ? 1 : 2;
assert(s.x > 0);
}
}

View File

@ -1 +1 @@
--model-checker-engine all --model-checker-show-unproved true
--model-checker-engine all --model-checker-show-unproved

View File

@ -1 +1 @@
--model-checker-engine bmc --model-checker-show-unproved true
--model-checker-engine bmc --model-checker-show-unproved

View File

@ -1 +1 @@
--model-checker-engine chc --model-checker-show-unproved true
--model-checker-engine chc --model-checker-show-unproved

View File

@ -1 +0,0 @@
--model-checker-engine all --model-checker-show-unproved aaa

View File

@ -1 +0,0 @@
the argument ('aaa') for option '--model-checker-show-unproved' is invalid. Valid choices are 'on|off', 'yes|no', '1|0' and 'true|false'

View File

@ -1,12 +0,0 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
contract C {
struct S {
uint x;
}
S s;
function f(bool b) public {
s.x |= b ? 1 : 2;
assert(s.x > 0);
}
}

View File

@ -146,7 +146,7 @@ BOOST_AUTO_TEST_CASE(cli_mode_options)
"--model-checker-contracts=contract1.yul:A,contract2.yul:B",
"--model-checker-div-mod-no-slacks",
"--model-checker-engine=bmc",
"--model-checker-show-unproved=true",
"--model-checker-show-unproved",
"--model-checker-solvers=z3,smtlib2",
"--model-checker-targets=underflow,divByZero",
"--model-checker-timeout=5",
@ -278,7 +278,7 @@ BOOST_AUTO_TEST_CASE(assembly_mode_options)
"contract2.yul:B",
"--model-checker-div-mod-no-slacks", // Ignored in assembly mode
"--model-checker-engine=bmc", // Ignored in assembly mode
"--model-checker-show-unproved=true", // Ignored in assembly mode
"--model-checker-show-unproved", // Ignored in assembly mode
"--model-checker-solvers=z3,smtlib2", // Ignored in assembly mode
"--model-checker-targets=" // Ignored in assembly mode
"underflow,"
@ -378,7 +378,7 @@ BOOST_AUTO_TEST_CASE(standard_json_mode_options)
"contract2.yul:B",
"--model-checker-div-mod-no-slacks", // Ignored in Standard JSON mode
"--model-checker-engine=bmc", // Ignored in Standard JSON mode
"--model-checker-show-unproved=true", // Ignored in Standard JSON mode
"--model-checker-show-unproved", // Ignored in Standard JSON mode
"--model-checker-solvers=z3,smtlib2", // Ignored in Standard JSON mode
"--model-checker-targets=" // Ignored in Standard JSON mode
"underflow,"