summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ken McMillan <unknown>2013-11-09 15:45:09 -0800
committerGravatar Ken McMillan <unknown>2013-11-09 15:45:09 -0800
commit334d29e2e34647caa2defd9cd0d329e1e9f0dfd3 (patch)
tree31d51078b4fc87fe7b4d3fc361d61084e84b613b
parent762424bf2a12558fd5a1eacbc056ebff3193b318 (diff)
parent0172a2eeb76fafd8aaabd34934b41eca15282956 (diff)
Merge duality changes to mainline
-rw-r--r--Source/Provers/SMTLib/ProverInterface.cs28
-rw-r--r--Source/Provers/SMTLib/Z3.cs1
-rw-r--r--Source/VCGeneration/FixedpointVC.cs2
3 files changed, 28 insertions, 3 deletions
diff --git a/Source/Provers/SMTLib/ProverInterface.cs b/Source/Provers/SMTLib/ProverInterface.cs
index fe749852..c5c867d9 100644
--- a/Source/Provers/SMTLib/ProverInterface.cs
+++ b/Source/Provers/SMTLib/ProverInterface.cs
@@ -673,8 +673,21 @@ namespace Microsoft.Boogie.SMTLib
{
var resp = Process.GetProverResponse();
-
- switch (resp.Name)
+
+ if (proverErrors.Count > 0)
+ {
+ result = Outcome.Undetermined;
+ foreach (var err in proverErrors)
+ {
+ if (err.Contains("canceled"))
+ {
+ result = Outcome.TimeOut;
+ }
+ }
+ }
+ else if(resp == null)
+ HandleProverError("Prover did not respond");
+ else switch (resp.Name)
{
case "unsat":
result = Outcome.Valid;
@@ -685,6 +698,17 @@ namespace Microsoft.Boogie.SMTLib
case "unknown":
result = Outcome.Invalid;
break;
+ case "error":
+ if (resp.ArgCount > 0 && resp.Arguments[0].Name.Contains("canceled"))
+ {
+ result = Outcome.TimeOut;
+ }
+ else
+ {
+ HandleProverError("Prover error: " + resp.Arguments[0]);
+ result = Outcome.Undetermined;
+ }
+ break;
default:
HandleProverError("Unexpected prover response: " + resp.ToString());
break;
diff --git a/Source/Provers/SMTLib/Z3.cs b/Source/Provers/SMTLib/Z3.cs
index a2bf80ba..8dfa8371 100644
--- a/Source/Provers/SMTLib/Z3.cs
+++ b/Source/Provers/SMTLib/Z3.cs
@@ -262,6 +262,7 @@ namespace Microsoft.Boogie.SMTLib
if (options.TimeLimit > 0)
{
options.AddWeakSmtOption("TIMEOUT", options.TimeLimit.ToString());
+ options.AddWeakSmtOption("fixedpoint.TIMEOUT", options.TimeLimit.ToString());
// This kills the Z3 *instance* after the specified time, not a particular query, so we cannot use it.
// options.AddSolverArgument("/T:" + (options.TimeLimit + 1000) / 1000);
}
diff --git a/Source/VCGeneration/FixedpointVC.cs b/Source/VCGeneration/FixedpointVC.cs
index 330ffe49..6fe3a103 100644
--- a/Source/VCGeneration/FixedpointVC.cs
+++ b/Source/VCGeneration/FixedpointVC.cs
@@ -109,7 +109,7 @@ namespace Microsoft.Boogie
program = _program;
gen = ctx;
if(old_checker == null)
- checker = new Checker(this, program, logFilePath, appendLogFile, 0, null);
+ checker = new Checker(this, program, logFilePath, appendLogFile, CommandLineOptions.Clo.ProverKillTime, null);
else {
checker = old_checker;
checker.Retarget(program,checker.TheoremProver.Context);