summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ken McMillan <unknown>2013-11-11 15:06:08 -0800
committerGravatar Ken McMillan <unknown>2013-11-11 15:06:08 -0800
commit479fe0571200196552e3d415ab3b90e30083b1b2 (patch)
treeecc2fbc7fd64268b21493d7feb3218547767355f
parent334d29e2e34647caa2defd9cd0d329e1e9f0dfd3 (diff)
Fixedpoint VC catch up with recent changes
-rw-r--r--Source/Provers/SMTLib/ProverInterface.cs2
-rw-r--r--Source/Provers/SMTLib/Z3.cs6
-rw-r--r--Source/VCGeneration/Check.cs7
-rw-r--r--Source/VCGeneration/Context.cs7
-rw-r--r--Source/VCGeneration/FixedpointVC.cs2
5 files changed, 21 insertions, 3 deletions
diff --git a/Source/Provers/SMTLib/ProverInterface.cs b/Source/Provers/SMTLib/ProverInterface.cs
index c5c867d9..86779a54 100644
--- a/Source/Provers/SMTLib/ProverInterface.cs
+++ b/Source/Provers/SMTLib/ProverInterface.cs
@@ -560,7 +560,7 @@ namespace Microsoft.Boogie.SMTLib
// Concatenate all the arguments
string modelString = resp[0].Name;
// modelString = modelString.Substring(7, modelString.Length - 8); // remove "(model " and final ")"
- var models = Model.ParseModels(new StringReader("Z3 error model: \n" + modelString), "");
+ var models = Model.ParseModels(new StringReader("Error model: \n" + modelString), "");
if (models == null || models.Count == 0)
{
HandleProverError("no model from prover: " + resp.ToString());
diff --git a/Source/Provers/SMTLib/Z3.cs b/Source/Provers/SMTLib/Z3.cs
index 8dfa8371..ed8f0908 100644
--- a/Source/Provers/SMTLib/Z3.cs
+++ b/Source/Provers/SMTLib/Z3.cs
@@ -350,9 +350,13 @@ namespace Microsoft.Boogie.SMTLib
options.AddWeakSmtOption("ARRAY_WEAK", "true");
options.AddWeakSmtOption("ARRAY_EXTENSIONAL", "false");
}
+
+ options.AddWeakSmtOption("MODEL_ON_TIMEOUT", "true");
+
}
- options.AddWeakSmtOption("MODEL_ON_TIMEOUT", "true");
+ // KLM: don't add Z3 options here. The options are different in different Z3 versions.
+ // Add options in the above condition for the appropriate version.
// legacy option handling
if (!CommandLineOptions.Clo.z3AtFlag)
diff --git a/Source/VCGeneration/Check.cs b/Source/VCGeneration/Check.cs
index 549c700a..a77bfba5 100644
--- a/Source/VCGeneration/Check.cs
+++ b/Source/VCGeneration/Check.cs
@@ -192,6 +192,13 @@ namespace Microsoft.Boogie {
}
}
+ public void RetargetWithoutReset(Program prog, ProverContext ctx)
+ {
+ ctx.Clear();
+ Setup(prog, ctx);
+ }
+
+
public void SetTimeout()
{
if (0 < timeout)
diff --git a/Source/VCGeneration/Context.cs b/Source/VCGeneration/Context.cs
index 7931a042..83787dc5 100644
--- a/Source/VCGeneration/Context.cs
+++ b/Source/VCGeneration/Context.cs
@@ -35,6 +35,7 @@ namespace Microsoft.Boogie
public abstract VCGenerationOptions VCGenOptions { get; }
public abstract object Clone();
public abstract void Reset();
+ public abstract void Clear();
}
[ContractClassFor(typeof(ProverContext))]
@@ -128,6 +129,12 @@ public abstract class ProverContextContracts:ProverContext{
axiomConjuncts = new List<VCExpr>();
}
+ public override void Clear()
+ {
+ distincts = new List<Variable>();
+ axiomConjuncts = new List<VCExpr>();
+ }
+
protected DeclFreeProverContext(DeclFreeProverContext ctxt) {
Contract.Requires(ctxt != null);
this.gen = ctxt.gen;
diff --git a/Source/VCGeneration/FixedpointVC.cs b/Source/VCGeneration/FixedpointVC.cs
index 6fe3a103..addf69a2 100644
--- a/Source/VCGeneration/FixedpointVC.cs
+++ b/Source/VCGeneration/FixedpointVC.cs
@@ -112,7 +112,7 @@ namespace Microsoft.Boogie
checker = new Checker(this, program, logFilePath, appendLogFile, CommandLineOptions.Clo.ProverKillTime, null);
else {
checker = old_checker;
- checker.Retarget(program,checker.TheoremProver.Context);
+ checker.RetargetWithoutReset(program,checker.TheoremProver.Context);
}
old_checker = checker;
boogieContext = checker.TheoremProver.Context;