mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add SMTCheckerTest isoltest option to ignore invariants
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
#include <test/libsolidity/SMTCheckerTest.h>
|
||||
#include <test/Common.h>
|
||||
|
||||
#include <range/v3/action/remove_if.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity;
|
||||
using namespace solidity::langutil;
|
||||
@@ -67,6 +69,14 @@ SMTCheckerTest::SMTCheckerTest(string const& _filename): SyntaxTest(_filename, E
|
||||
else
|
||||
BOOST_THROW_EXCEPTION(runtime_error("Invalid SMT counterexample choice."));
|
||||
|
||||
auto const& ignoreInv = m_reader.stringSetting("SMTIgnoreInv", "no");
|
||||
if (ignoreInv == "no")
|
||||
m_modelCheckerSettings.invariants = ModelCheckerInvariants::All();
|
||||
else if (ignoreInv == "yes")
|
||||
m_modelCheckerSettings.invariants = ModelCheckerInvariants::None();
|
||||
else
|
||||
BOOST_THROW_EXCEPTION(runtime_error("Invalid SMT invariant choice."));
|
||||
|
||||
auto const& ignoreOSSetting = m_reader.stringSetting("SMTIgnoreOS", "none");
|
||||
for (string const& os: ignoreOSSetting | ranges::views::split(',') | ranges::to<vector<string>>())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user