summaryrefslogtreecommitdiff
path: root/Source/Provers
diff options
context:
space:
mode:
authorGravatar qadeer <unknown>2012-02-23 23:32:00 -0800
committerGravatar qadeer <unknown>2012-02-23 23:32:00 -0800
commit44cc8ee3486a320aae809bc4755f4da8c4de4b79 (patch)
tree8955f708bb69f407640ca7ccf85e5dbff98abcfb /Source/Provers
parent88a325c862048ab6d487fc8f5d6fcba3602960df (diff)
bug fixes related to using ControlFlowFunction instead of labels
Diffstat (limited to 'Source/Provers')
-rw-r--r--Source/Provers/SMTLib/ProverInterface.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/Provers/SMTLib/ProverInterface.cs b/Source/Provers/SMTLib/ProverInterface.cs
index 7ffe8323..657603d0 100644
--- a/Source/Provers/SMTLib/ProverInterface.cs
+++ b/Source/Provers/SMTLib/ProverInterface.cs
@@ -285,6 +285,15 @@ namespace Microsoft.Boogie.SMTLib
Process.Close();
}
+ string controlFlowVariable;
+
+ private VCExpr ArgumentZero(VCExpr vc) {
+ VCExprNAry naryExpr = vc as VCExprNAry;
+ if (naryExpr == null)
+ return null;
+ return naryExpr[0];
+ }
+
public override void BeginCheck(string descriptiveName, VCExpr vc, ErrorHandler handler)
{
//Contract.Requires(descriptiveName != null);
@@ -298,6 +307,9 @@ namespace Microsoft.Boogie.SMTLib
currentLogFile.Write(common.ToString());
}
+ if (!CommandLineOptions.Clo.UseLabels)
+ controlFlowVariable = VCExpr2String(ArgumentZero(ArgumentZero(ArgumentZero(vc))),1);
+
PrepareCommon();
string vcString = "(assert (not\n" + VCExpr2String(vc, 1) + "\n))";
FlushAxioms();
@@ -450,7 +462,7 @@ namespace Microsoft.Boogie.SMTLib
}
private string[] CalculatePath() {
- SendThisVC("(get-value ((ControlFlow @cfc 0)))");
+ SendThisVC("(get-value ((ControlFlow " + controlFlowVariable + " 0)))");
var path = new List<string>();
while (true) {
var resp = Process.GetProverResponse();
@@ -472,7 +484,7 @@ namespace Microsoft.Boogie.SMTLib
else {
path.Add("+" + v);
}
- SendThisVC("(get-value ((ControlFlow @cfc " + v + ")))");
+ SendThisVC("(get-value ((ControlFlow " + controlFlowVariable + " " + v + ")))");
}
return path.ToArray();
}