mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Refactor setZeroValue and setUnknownValue
This commit is contained in:
@@ -62,15 +62,6 @@ smt::Expression SymbolicBoolVariable::valueAtIndex(int _index) const
|
||||
return m_interface.newVariable(uniqueSymbol(_index), make_shared<smt::Sort>(smt::Kind::Bool));
|
||||
}
|
||||
|
||||
void SymbolicBoolVariable::setZeroValue()
|
||||
{
|
||||
m_interface.addAssertion(currentValue() == smt::Expression(false));
|
||||
}
|
||||
|
||||
void SymbolicBoolVariable::setUnknownValue()
|
||||
{
|
||||
}
|
||||
|
||||
SymbolicIntVariable::SymbolicIntVariable(
|
||||
TypePointer _type,
|
||||
string const& _uniqueName,
|
||||
@@ -86,19 +77,6 @@ smt::Expression SymbolicIntVariable::valueAtIndex(int _index) const
|
||||
return m_interface.newVariable(uniqueSymbol(_index), make_shared<smt::Sort>(smt::Kind::Int));
|
||||
}
|
||||
|
||||
void SymbolicIntVariable::setZeroValue()
|
||||
{
|
||||
m_interface.addAssertion(currentValue() == 0);
|
||||
}
|
||||
|
||||
void SymbolicIntVariable::setUnknownValue()
|
||||
{
|
||||
auto intType = dynamic_cast<IntegerType const*>(m_type.get());
|
||||
solAssert(intType, "");
|
||||
m_interface.addAssertion(currentValue() >= minValue(*intType));
|
||||
m_interface.addAssertion(currentValue() <= maxValue(*intType));
|
||||
}
|
||||
|
||||
SymbolicAddressVariable::SymbolicAddressVariable(
|
||||
string const& _uniqueName,
|
||||
smt::SolverInterface& _interface
|
||||
|
||||
Reference in New Issue
Block a user