aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/formal/SymbolicIntVariable.cpp
diff options
context:
space:
mode:
authorLeonardo Alt <leo@ethereum.org>2018-10-15 23:32:17 +0800
committerLeonardo Alt <leo@ethereum.org>2018-10-17 21:58:13 +0800
commitec39fdcb3c6b3d5eb07ea6768fb3926fe54dc47e (patch)
tree01b86486f2cf8554d236a1b02cf728e9342bfb0a /libsolidity/formal/SymbolicIntVariable.cpp
parentaf3300b86caee20efe9df4b75800f73d8f027a85 (diff)
downloaddexon-solidity-ec39fdcb3c6b3d5eb07ea6768fb3926fe54dc47e.tar.gz
dexon-solidity-ec39fdcb3c6b3d5eb07ea6768fb3926fe54dc47e.tar.zst
dexon-solidity-ec39fdcb3c6b3d5eb07ea6768fb3926fe54dc47e.zip
[SMTChecker] Refactoring types
Diffstat (limited to 'libsolidity/formal/SymbolicIntVariable.cpp')
-rw-r--r--libsolidity/formal/SymbolicIntVariable.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/libsolidity/formal/SymbolicIntVariable.cpp b/libsolidity/formal/SymbolicIntVariable.cpp
index 0adb9d09..877495bd 100644
--- a/libsolidity/formal/SymbolicIntVariable.cpp
+++ b/libsolidity/formal/SymbolicIntVariable.cpp
@@ -40,26 +40,26 @@ smt::Expression SymbolicIntVariable::valueAtSequence(int _seq) const
return m_interface.newInteger(uniqueSymbol(_seq));
}
-void SymbolicIntVariable::setZeroValue(int _seq)
+void SymbolicIntVariable::setZeroValue()
{
- m_interface.addAssertion(valueAtSequence(_seq) == 0);
+ m_interface.addAssertion(current() == 0);
}
-void SymbolicIntVariable::setUnknownValue(int _seq)
+void SymbolicIntVariable::setUnknownValue()
{
if (m_type.category() == Type::Category::Integer)
{
auto intType = dynamic_cast<IntegerType const*>(&m_type);
solAssert(intType, "");
- m_interface.addAssertion(valueAtSequence(_seq) >= minValue(*intType));
- m_interface.addAssertion(valueAtSequence(_seq) <= maxValue(*intType));
+ m_interface.addAssertion(current() >= minValue(*intType));
+ m_interface.addAssertion(current() <= maxValue(*intType));
}
else
{
solAssert(m_type.category() == Type::Category::Address, "");
IntegerType addrType{160};
- m_interface.addAssertion(valueAtSequence(_seq) >= minValue(addrType));
- m_interface.addAssertion(valueAtSequence(_seq) <= maxValue(addrType));
+ m_interface.addAssertion(current() >= minValue(addrType));
+ m_interface.addAssertion(current() <= maxValue(addrType));
}
}