[SMTChecker] User timeout option

This commit is contained in:
Leonardo Alt
2020-11-03 10:46:11 +00:00
parent 22b31054b6
commit d03ddeb0fa
47 changed files with 436 additions and 62 deletions
+5 -1
View File
@@ -39,8 +39,10 @@ using namespace solidity::smtutil;
SMTLib2Interface::SMTLib2Interface(
map<h256, string> _queryResponses,
ReadCallback::Callback _smtCallback
ReadCallback::Callback _smtCallback,
optional<unsigned> _queryTimeout
):
SolverInterface(_queryTimeout),
m_queryResponses(move(_queryResponses)),
m_smtCallback(move(_smtCallback))
{
@@ -54,6 +56,8 @@ void SMTLib2Interface::reset()
m_variables.clear();
m_userSorts.clear();
write("(set-option :produce-models true)");
if (m_queryTimeout)
write("(set-option :timeout " + to_string(*m_queryTimeout) + ")");
write("(set-logic ALL)");
}