SMTChecker: Ignore model checking without callback

This commit is contained in:
Martin Blicha 2023-08-14 22:06:52 +02:00
parent b6326f4d4d
commit 1b68b5764d
2 changed files with 16 additions and 6 deletions

View File

@ -608,6 +608,14 @@ bool CompilerStack::analyze()
if (m_modelCheckerSettings.engine.any())
m_modelCheckerSettings.solvers = ModelChecker::checkRequestedSolvers(m_modelCheckerSettings.solvers, m_errorReporter);
if (m_modelCheckerSettings.engine.any() && !m_readFile)
m_errorReporter.warning(
7126_error,
SourceLocation(),
"Model checker analysis requested but no callback for SMT queries was provided, ignoring!"
);
else
{
ModelChecker modelChecker(m_errorReporter, *this, m_smtlib2Responses, m_modelCheckerSettings, m_readFile);
modelChecker.checkRequestedSourcesAndContracts(allSources);
for (Source const* source: m_sourceOrder)
@ -616,6 +624,7 @@ bool CompilerStack::analyze()
m_unhandledSMTLib2Queries += modelChecker.unhandledQueries();
}
}
}
catch (FatalError const&)
{
if (m_errorReporter.errors().empty())

View File

@ -207,6 +207,7 @@ def examine_id_coverage(top_dir, source_id_to_file_names, new_ids_only=False):
"2961", # SMTChecker, covered by CL tests
"6240", # SMTChecker, covered by CL tests
"9576", # SMTChecker, covered by CL tests
"7126", # SMTChecker, analysis without callback (not sure how to cover this)
}
assert len(test_ids & white_ids) == 0, "The sets are not supposed to intersect"
test_ids |= white_ids