mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove smtlib2 solver option
This commit is contained in:
@@ -47,7 +47,6 @@ BMC::BMC(
|
||||
_smtlib2Responses, _smtCallback, _settings.solvers, _settings.timeout
|
||||
))
|
||||
{
|
||||
solAssert(!_settings.printQuery || _settings.solvers == smtutil::SMTSolverChoice::SMTLIB2(), "Only SMTLib2 solver can be enabled to print queries");
|
||||
if (m_settings.solvers.cvc4 || m_settings.solvers.z3)
|
||||
if (!_smtlib2Responses.empty())
|
||||
m_errorReporter.warning(
|
||||
@@ -62,7 +61,7 @@ BMC::BMC(
|
||||
void BMC::analyze(SourceUnit const& _source, std::map<ASTNode const*, std::set<VerificationTargetType>, smt::EncodingContext::IdCompare> _solvedTargets)
|
||||
{
|
||||
// At this point every enabled solver is available.
|
||||
if (!m_settings.solvers.cvc4 && !m_settings.solvers.smtlib2 && !m_settings.solvers.z3)
|
||||
if (!m_settings.solvers.cvc4 && !m_settings.solvers.z3)
|
||||
{
|
||||
m_errorReporter.warning(
|
||||
7710_error,
|
||||
@@ -121,11 +120,7 @@ void BMC::analyze(SourceUnit const& _source, std::map<ASTNode const*, std::set<V
|
||||
// If this check is true, Z3 and CVC4 are not available
|
||||
// and the query answers were not provided, since SMTPortfolio
|
||||
// guarantees that SmtLib2Interface is the first solver, if enabled.
|
||||
if (
|
||||
!m_interface->unhandledQueries().empty() &&
|
||||
m_interface->solvers() == 1 &&
|
||||
m_settings.solvers.smtlib2
|
||||
)
|
||||
if (!m_interface->unhandledQueries().empty())
|
||||
m_errorReporter.warning(
|
||||
8084_error,
|
||||
SourceLocation(),
|
||||
|
||||
@@ -66,14 +66,12 @@ CHC::CHC(
|
||||
SMTEncoder(_context, _settings, _errorReporter, _unsupportedErrorReporter, _charStreamProvider),
|
||||
m_smtlib2Responses(_smtlib2Responses),
|
||||
m_smtCallback(_smtCallback)
|
||||
{
|
||||
solAssert(!_settings.printQuery || _settings.solvers == smtutil::SMTSolverChoice::SMTLIB2(), "Only SMTLib2 solver can be enabled to print queries");
|
||||
}
|
||||
{}
|
||||
|
||||
void CHC::analyze(SourceUnit const& _source)
|
||||
{
|
||||
// At this point every enabled solver is available.
|
||||
if (!m_settings.solvers.eld && !m_settings.solvers.smtlib2 && !m_settings.solvers.z3)
|
||||
if (!m_settings.solvers.eld && !m_settings.solvers.z3)
|
||||
{
|
||||
m_errorReporter.warning(
|
||||
7649_error,
|
||||
@@ -1168,7 +1166,7 @@ void CHC::resetSourceAnalysis()
|
||||
m_blockCounter = 0;
|
||||
|
||||
// At this point every enabled solver is available.
|
||||
solAssert(m_settings.solvers.smtlib2 || m_settings.solvers.eld || m_settings.solvers.z3);
|
||||
solAssert(m_settings.solvers.eld || m_settings.solvers.z3);
|
||||
|
||||
if (!m_interface)
|
||||
m_interface = std::make_unique<CHCSmtLib2Interface>(m_smtlib2Responses, m_smtCallback, m_settings.solvers, m_settings.timeout);
|
||||
|
||||
@@ -162,7 +162,7 @@ std::vector<std::string> ModelChecker::unhandledQueries()
|
||||
|
||||
SMTSolverChoice ModelChecker::availableSolvers()
|
||||
{
|
||||
smtutil::SMTSolverChoice available = smtutil::SMTSolverChoice::SMTLIB2();
|
||||
smtutil::SMTSolverChoice available = smtutil::SMTSolverChoice::None();
|
||||
#if defined(__linux) || defined(__APPLE__)
|
||||
available.eld = !boost::process::search_path("eld").empty();
|
||||
available.z3 = !boost::process::search_path("z3").empty();
|
||||
|
||||
Reference in New Issue
Block a user