aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/formal/SymbolicIntVariable.cpp
diff options
context:
space:
mode:
authorLeonardo Alt <leonardoaltt@gmail.com>2018-03-09 23:19:03 +0800
committerLeonardo Alt <leonardoaltt@gmail.com>2018-03-13 03:16:47 +0800
commitc2d26eb6a20a21f5fe4b5d78a39f8c23f7f3f5cb (patch)
tree5603090f386fc913b8c6cf6c4eb384a96da67a31 /libsolidity/formal/SymbolicIntVariable.cpp
parent6a940f0a99e941c48e5deb695e89ac52784c4f3c (diff)
downloaddexon-solidity-c2d26eb6a20a21f5fe4b5d78a39f8c23f7f3f5cb.tar.gz
dexon-solidity-c2d26eb6a20a21f5fe4b5d78a39f8c23f7f3f5cb.tar.zst
dexon-solidity-c2d26eb6a20a21f5fe4b5d78a39f8c23f7f3f5cb.zip
[SMTChecker_Bool] Fix PR comments; Add support to gt, ge, lt, le. and tests.
Diffstat (limited to 'libsolidity/formal/SymbolicIntVariable.cpp')
-rw-r--r--libsolidity/formal/SymbolicIntVariable.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsolidity/formal/SymbolicIntVariable.cpp b/libsolidity/formal/SymbolicIntVariable.cpp
index d08dc155..eb7b1c17 100644
--- a/libsolidity/formal/SymbolicIntVariable.cpp
+++ b/libsolidity/formal/SymbolicIntVariable.cpp
@@ -24,12 +24,12 @@ using namespace dev;
using namespace dev::solidity;
SymbolicIntVariable::SymbolicIntVariable(
- Declaration const* _decl,
+ Declaration const& _decl,
smt::SolverInterface& _interface
):
SymbolicVariable(_decl, _interface)
{
- solAssert(m_declaration->type()->category() == Type::Category::Integer, "");
+ solAssert(m_declaration.type()->category() == Type::Category::Integer, "");
m_expression = make_shared<smt::Expression>(m_interface.newFunction(uniqueSymbol(), smt::Sort::Int, smt::Sort::Int));
}
@@ -40,7 +40,7 @@ void SymbolicIntVariable::setZeroValue(int _seq)
void SymbolicIntVariable::setUnknownValue(int _seq)
{
- auto const& intType = dynamic_cast<IntegerType const&>(*m_declaration->type());
+ auto const& intType = dynamic_cast<IntegerType const&>(*m_declaration.type());
m_interface.addAssertion(valueAtSequence(_seq) >= minValue(intType));
m_interface.addAssertion(valueAtSequence(_seq) <= maxValue(intType));
}