Skip to content

Commit

Permalink
Treat incomplete-arithmetic and model-unavailable (#324)
Browse files Browse the repository at this point in the history
* Treat incomplete-arithmetic and model-unavailable

* Remove error codes from new .expect files

* Turn model-unavailable into Undetermined

Note, there will be a new Z3 option, `candidate_models`, that Boogie can use to always get a model back. This would be a good option to use, when Boogie and Boogie clients switch to that future version of Z3. See Z3Prover/z3#4924.

* Add clarification in comments
  • Loading branch information
RustanLeino authored Jan 5, 2021
1 parent 0ac2790 commit b03dd2e
Show file tree
Hide file tree
Showing 7 changed files with 3,552 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Source/Core/VCExp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ condition is for.
APPEND_LOG_FILE=<bool> Append, rather than overwrite the log file.
MEMORY_LIMIT=<int> Memory limit of the prover in megabytes.
VERBOSITY=<int> The higher, the more verbose.
TIME_LIMIT=<int> Time limit per verification condition in miliseconds.
TIME_LIMIT=<int> Time limit per verification condition in milliseconds.
The generic options may or may not be used by the prover plugin.
";
Expand Down
8 changes: 8 additions & 0 deletions Source/Provers/SMTLib/ProverInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1720,6 +1720,12 @@ public override Outcome CheckOutcomeCore(ErrorHandler handler, int taskID = -1)
else
{
labels = CalculatePath(handler.StartingProcId());
if (labels.Length == 0)
{
// Without a path to an error, we don't know what to report
globalResult = Outcome.Undetermined;
break;
}
}

handler.OnModel(labels, model, result);
Expand Down Expand Up @@ -2356,6 +2362,8 @@ private Outcome GetResponse()
{
case "incomplete":
case "(incomplete quantifiers)":
case "(incomplete (theory arithmetic))":
case "smt tactic failed to show goal to be sat/unsat (incomplete (theory arithmetic))":
break;
case "memout":
currentErrorHandler.OnResourceExceeded("memory");
Expand Down
8 changes: 6 additions & 2 deletions Source/Provers/SMTLib/SMTLibProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,14 @@ public SExpr GetProverResponse()
if (resp.Arguments.Length == 1 && resp.Arguments[0].IsId)
if (resp.Arguments[0].Name.Contains("max. resource limit exceeded"))
return resp;
else
else {
HandleError(resp.Arguments[0].Name);
else
return null;
}
else {
HandleError(resp.ToString());
return null;
}
}
else if (resp.Name == "progress")
{
Expand Down
Loading

0 comments on commit b03dd2e

Please sign in to comment.