diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-04-17 21:35:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-17 21:35:47 +0800 |
commit | f92574705033595b4a6bc20473c9f58e6f184f47 (patch) | |
tree | a3a2f6e0ab310cb8d28024412cb9e74d6c10e8c4 /libsolidity/formal/Z3Interface.cpp | |
parent | 4ff5ddad8e8207e570b6d1f3db862b4d029affa0 (diff) | |
parent | ae3350ae0320d140a427d2fa318e7002745a73a5 (diff) | |
download | dexon-solidity-f92574705033595b4a6bc20473c9f58e6f184f47.tar.gz dexon-solidity-f92574705033595b4a6bc20473c9f58e6f184f47.tar.zst dexon-solidity-f92574705033595b4a6bc20473c9f58e6f184f47.zip |
Merge pull request #3840 from ethereum/smt_cvc4
[SMTChecker] Integration with CVC4
Diffstat (limited to 'libsolidity/formal/Z3Interface.cpp')
-rw-r--r-- | libsolidity/formal/Z3Interface.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/libsolidity/formal/Z3Interface.cpp b/libsolidity/formal/Z3Interface.cpp index 125da00d..41943c92 100644 --- a/libsolidity/formal/Z3Interface.cpp +++ b/libsolidity/formal/Z3Interface.cpp @@ -116,21 +116,6 @@ z3::expr Z3Interface::toZ3Expr(Expression const& _expr) for (auto const& arg: _expr.arguments) arguments.push_back(toZ3Expr(arg)); - static map<string, unsigned> arity{ - {"ite", 3}, - {"not", 1}, - {"and", 2}, - {"or", 2}, - {"=", 2}, - {"<", 2}, - {"<=", 2}, - {">", 2}, - {">=", 2}, - {"+", 2}, - {"-", 2}, - {"*", 2}, - {"/", 2} - }; string const& n = _expr.name; if (m_functions.count(n)) return m_functions.at(n)(arguments); @@ -150,7 +135,7 @@ z3::expr Z3Interface::toZ3Expr(Expression const& _expr) return m_context.int_val(n.c_str()); } - solAssert(arity.count(n) && arity.at(n) == arguments.size(), ""); + solAssert(_expr.hasCorrectArity(), ""); if (n == "ite") return z3::ite(arguments[0], arguments[1], arguments[2]); else if (n == "not") |