/src/solidity/libsolidity/formal/Cvc5SMTLib2Interface.cpp
Line | Count | Source |
1 | | /* |
2 | | This file is part of solidity. |
3 | | |
4 | | solidity is free software: you can redistribute it and/or modify |
5 | | it under the terms of the GNU General Public License as published by |
6 | | the Free Software Foundation, either version 3 of the License, or |
7 | | (at your option) any later version. |
8 | | |
9 | | solidity is distributed in the hope that it will be useful, |
10 | | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | | GNU General Public License for more details. |
13 | | |
14 | | You should have received a copy of the GNU General Public License |
15 | | along with solidity. If not, see <http://www.gnu.org/licenses/>. |
16 | | */ |
17 | | // SPDX-License-Identifier: GPL-3.0 |
18 | | |
19 | | #include <libsolidity/formal/Cvc5SMTLib2Interface.h> |
20 | | |
21 | | #include <libsolidity/interface/UniversalCallback.h> |
22 | | |
23 | | using namespace solidity::frontend::smt; |
24 | | |
25 | | Cvc5SMTLib2Interface::Cvc5SMTLib2Interface( |
26 | | frontend::ReadCallback::Callback _smtCallback, |
27 | | std::optional<unsigned int> _queryTimeout |
28 | 0 | ): SMTLib2Interface({}, std::move(_smtCallback), _queryTimeout) |
29 | 0 | { |
30 | 0 | } |
31 | | |
32 | 0 | void Cvc5SMTLib2Interface::setupSmtCallback() { |
33 | 0 | if (auto* universalCallback = m_smtCallback.target<frontend::UniversalCallback>()) |
34 | 0 | universalCallback->smtCommand().setCvc5(m_queryTimeout); |
35 | 0 | } |