aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/formal/SymbolicTypes.h
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/SymbolicTypes.h
parentaf3300b86caee20efe9df4b75800f73d8f027a85 (diff)
downloaddexon-solidity-ec39fdcb3c6b3d5eb07ea6768fb3926fe54dc47e.tar
dexon-solidity-ec39fdcb3c6b3d5eb07ea6768fb3926fe54dc47e.tar.gz
dexon-solidity-ec39fdcb3c6b3d5eb07ea6768fb3926fe54dc47e.tar.bz2
dexon-solidity-ec39fdcb3c6b3d5eb07ea6768fb3926fe54dc47e.tar.lz
dexon-solidity-ec39fdcb3c6b3d5eb07ea6768fb3926fe54dc47e.tar.xz
dexon-solidity-ec39fdcb3c6b3d5eb07ea6768fb3926fe54dc47e.tar.zst
dexon-solidity-ec39fdcb3c6b3d5eb07ea6768fb3926fe54dc47e.zip
[SMTChecker] Refactoring types
Diffstat (limited to 'libsolidity/formal/SymbolicTypes.h')
-rw-r--r--libsolidity/formal/SymbolicTypes.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/libsolidity/formal/SymbolicTypes.h b/libsolidity/formal/SymbolicTypes.h
new file mode 100644
index 00000000..f9df6853
--- /dev/null
+++ b/libsolidity/formal/SymbolicTypes.h
@@ -0,0 +1,45 @@
+/*
+ This file is part of solidity.
+
+ solidity is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ solidity is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with solidity. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include <libsolidity/formal/SolverInterface.h>
+#include <libsolidity/formal/SymbolicVariable.h>
+
+#include <libsolidity/ast/AST.h>
+#include <libsolidity/ast/Types.h>
+
+namespace dev
+{
+namespace solidity
+{
+
+/// So far int, bool and address are supported.
+/// Returns true if type is supported.
+bool isSupportedType(Type::Category _category);
+bool isSupportedType(Type const& _type);
+
+bool isInteger(Type::Category _category);
+bool isInteger(Type const& _type);
+
+bool isBool(Type::Category _category);
+bool isBool(Type const& _type);
+
+std::shared_ptr<SymbolicVariable> newSymbolicVariable(Type const& _type, std::string const& _uniqueName, smt::SolverInterface& _solver);
+
+}
+}