aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface/CompilerStack.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-10-13 21:19:53 +0800
committerLeonardo Alt <leo@ethereum.org>2018-11-23 16:43:49 +0800
commitbb10be789c269927e593b41d37aa0637db68bbe1 (patch)
tree63a015ca51e9eb1dbf043172c632d2665e62fb46 /libsolidity/interface/CompilerStack.h
parent9217fbb58d085325ce37ed6ca37f76e8b8de9d90 (diff)
downloaddexon-solidity-bb10be789c269927e593b41d37aa0637db68bbe1.tar.gz
dexon-solidity-bb10be789c269927e593b41d37aa0637db68bbe1.tar.zst
dexon-solidity-bb10be789c269927e593b41d37aa0637db68bbe1.zip
Inject SMTLIB2 queries and responses via standard-json-io.
Diffstat (limited to 'libsolidity/interface/CompilerStack.h')
-rw-r--r--libsolidity/interface/CompilerStack.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h
index 8c50266e..3fceed24 100644
--- a/libsolidity/interface/CompilerStack.h
+++ b/libsolidity/interface/CompilerStack.h
@@ -153,6 +153,13 @@ public:
/// @returns true if a source object by the name already existed and was replaced.
bool addSource(std::string const& _name, std::string const& _content, bool _isLibrary = false);
+ /// Adds a response to an SMTLib2 query (identified by the hash of the query input).
+ void addSMTLib2Response(h256 const& _hash, std::string const& _response) { m_smtlib2Responses[_hash] = _response; }
+
+ /// @returns a list of unhandled queries to the SMT solver (has to be supplied in a second run
+ /// by calling @a addSMTLib2Response.
+ std::vector<std::string> const& unhandledSMTQueries() const { return m_unhandledSMTLib2Queries; }
+
/// Parses all source units that were added
/// @returns false on error.
bool parse();
@@ -334,7 +341,6 @@ private:
) const;
ReadCallback::Callback m_readFile;
- ReadCallback::Callback m_smtQuery;
bool m_optimize = false;
unsigned m_optimizeRuns = 200;
EVMVersion m_evmVersion;
@@ -344,6 +350,8 @@ private:
/// "context:prefix=target"
std::vector<Remapping> m_remappings;
std::map<std::string const, Source> m_sources;
+ std::vector<std::string> m_unhandledSMTLib2Queries;
+ std::map<h256, std::string> m_smtlib2Responses;
std::shared_ptr<GlobalContext> m_globalContext;
std::vector<Source const*> m_sourceOrder;
/// This is updated during compilation.