Try to parse values only for satisfiable answer

This commit is contained in:
Martin Blicha 2023-06-26 13:23:57 +02:00
parent efb0d4253c
commit da2f4cb100

View File

@ -168,7 +168,8 @@ std::pair<CheckResult, std::vector<std::string>> SMTLib2Interface::check(std::ve
solverCommands.emplace_back("cvc4");
CheckResult lastResult = CheckResult::ERROR;
std::vector<std::string> finalValues;
std::vector<string> finalValues;
smtAssert(m_smtCallback);
for (auto const& s: solverCommands)
{
auto callBackResult = m_smtCallback(ReadCallback::kindString(ReadCallback::Kind::SMTQuery) + ' ' + s, query);
@ -181,6 +182,7 @@ std::pair<CheckResult, std::vector<std::string>> SMTLib2Interface::check(std::ve
if (!solverAnswered(lastResult))
{
lastResult = result;
if (result == CheckResult::SATISFIABLE)
finalValues = parseValues(response);
}
else if (lastResult != result)