aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/formal/Z3Interface.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-12-05 20:59:01 +0800
committerGitHub <noreply@github.com>2017-12-05 20:59:01 +0800
commitb47e023df166e2ab9fd085a29f74972b22c4897b (patch)
tree63573be08cdc1fcf5005a314e67826c9baf7c7a1 /libsolidity/formal/Z3Interface.cpp
parent240c79e61450d69f45356242924c23adf2a004b4 (diff)
parent6d609557b6b2f13d7d8f8b13c2ceb1472266860a (diff)
downloaddexon-solidity-b47e023df166e2ab9fd085a29f74972b22c4897b.tar.gz
dexon-solidity-b47e023df166e2ab9fd085a29f74972b22c4897b.tar.zst
dexon-solidity-b47e023df166e2ab9fd085a29f74972b22c4897b.zip
Merge pull request #3032 from ethereum/division
Division and unary operators for SMT checker
Diffstat (limited to 'libsolidity/formal/Z3Interface.cpp')
-rw-r--r--libsolidity/formal/Z3Interface.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libsolidity/formal/Z3Interface.cpp b/libsolidity/formal/Z3Interface.cpp
index e5c1aef4..769e6edb 100644
--- a/libsolidity/formal/Z3Interface.cpp
+++ b/libsolidity/formal/Z3Interface.cpp
@@ -127,7 +127,8 @@ z3::expr Z3Interface::toZ3Expr(Expression const& _expr)
{">=", 2},
{"+", 2},
{"-", 2},
- {"*", 2}
+ {"*", 2},
+ {"/", 2}
};
string const& n = _expr.name;
if (m_functions.count(n))
@@ -173,6 +174,8 @@ z3::expr Z3Interface::toZ3Expr(Expression const& _expr)
return arguments[0] - arguments[1];
else if (n == "*")
return arguments[0] * arguments[1];
+ else if (n == "/")
+ return arguments[0] / arguments[1];
// Cannot reach here.
solAssert(false, "");
return arguments[0];