mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow optimizer steps that require SMT if none is available.
This commit is contained in:
@@ -46,6 +46,15 @@ void ReasoningBasedSimplifier::run(OptimiserStepContext& _context, Block& _ast)
|
||||
ReasoningBasedSimplifier{_context.dialect, ssaVars}(_ast);
|
||||
}
|
||||
|
||||
std::optional<string> ReasoningBasedSimplifier::invalidInCurrentEnvironment()
|
||||
{
|
||||
// SMTLib2 interface is always available, but we would like to have synchronous answers.
|
||||
if (smtutil::SMTPortfolio{}.solvers() <= 1)
|
||||
return string{"No SMT solvers available."};
|
||||
else
|
||||
return nullopt;
|
||||
}
|
||||
|
||||
void ReasoningBasedSimplifier::operator()(VariableDeclaration& _varDecl)
|
||||
{
|
||||
if (_varDecl.variables.size() != 1 || !_varDecl.value)
|
||||
|
||||
Reference in New Issue
Block a user