Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix resource limit & timeout handling if some assertion in the batch has already failed #994

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Source/Provers/SMTLib/SMTLibInteractiveTheoremProver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,15 @@ public async Task<SolverOutcome> CheckSat(CancellationToken cancellationToken,
currentErrorHandler.OnModel(labels, model, result);
}

// if the solver is out of resources or has timed out, the global result needs to reflect that.
if (result == SolverOutcome.OutOfResource || result == SolverOutcome.TimeOut) {
globalResult = result;
}

Debug.Assert(errorsDiscovered > 0);
// if errorLimit is 0, loop will break only if there are no more
// counterexamples to be discovered.
// counterexamples to be discovered or the solver is out of resources
// or has timed out.
if (labels == null || !labels.Any() || errorsDiscovered == errorLimit)
{
break;
Expand Down