Skip to content

Commit

Permalink
Produce error if no unsat core when expecting one
Browse files Browse the repository at this point in the history
  • Loading branch information
atomb committed Mar 12, 2024
1 parent 64a4b5a commit 1c95249
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Source/Provers/SMTLib/SMTLibBatchTheoremProver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,14 @@ private async Task<SolverOutcome> CheckSat(CancellationToken cancellationToken)
errorModel = ParseErrorModel(modelSExp);
}

if (options.LibOptions.ProduceUnsatCores && responseStack.Count > 0) {
var unsatCoreSExp = responseStack.Pop();
if (result == SolverOutcome.Valid) {
ReportCoveredElements(unsatCoreSExp);
if (options.LibOptions.ProduceUnsatCores) {
if (responseStack.Count > 0) {
var unsatCoreSExp = responseStack.Pop();
if (result == SolverOutcome.Valid) {
ReportCoveredElements(unsatCoreSExp);
}
} else {
currentErrorHandler.OnProverError("Solver did not return an unsat core.");
}
}

Expand Down

0 comments on commit 1c95249

Please sign in to comment.