summaryrefslogtreecommitdiff
path: root/Source/Provers
diff options
context:
space:
mode:
authorGravatar MichalMoskal <unknown>2011-02-23 22:49:09 +0000
committerGravatar MichalMoskal <unknown>2011-02-23 22:49:09 +0000
commit6b34d1a316c047e61ab87f95617778ce65b65c45 (patch)
tree747d786c6e3f6dcac4fe476ab9d17fb6498374e3 /Source/Provers
parentf65685831ad6852cdc051f0e5482544697f7ca9f (diff)
Mimic Z3 logic for figuring out the blocking clause for the next counterexample
Diffstat (limited to 'Source/Provers')
-rw-r--r--Source/Provers/SMTLib/ProverInterface.cs20
1 files changed, 7 insertions, 13 deletions
diff --git a/Source/Provers/SMTLib/ProverInterface.cs b/Source/Provers/SMTLib/ProverInterface.cs
index b46ba916..627d746c 100644
--- a/Source/Provers/SMTLib/ProverInterface.cs
+++ b/Source/Provers/SMTLib/ProverInterface.cs
@@ -336,19 +336,13 @@ namespace Microsoft.Boogie.SMTLib
var negLabels = labels.Where(l => l.StartsWith("@")).ToArray();
var posLabels = labels.Where(l => !l.StartsWith("@"));
- Func<string,string> lbl = (s) => SMTLibNamer.QuoteId(SMTLibNamer.LabelVar(s));
- if (negLabels.Length != 1) {
- HandleProverError("Wrong number of negative labels: " + negLabels.Length);
- break;
- } else {
- if (!options.MultiTraces)
- posLabels = Enumerable.Empty<string>();
- var conjuncts = posLabels.Select(s => "(not " + lbl(s) + ")").Concat1(lbl(negLabels[0])).ToArray();
- var expr = conjuncts.Length == 1 ? conjuncts[0] : ("(or " + conjuncts.Concat(" ") + ")");
- SendThisVC("(assert " + expr + ")");
- SendThisVC("(check-sat)");
- }
-
+ Func<string, string> lbl = (s) => SMTLibNamer.QuoteId(SMTLibNamer.LabelVar(s));
+ if (!options.MultiTraces)
+ posLabels = Enumerable.Empty<string>();
+ var conjuncts = posLabels.Select(s => "(not " + lbl(s) + ")").Concat(negLabels.Select(lbl)).ToArray();
+ var expr = conjuncts.Length == 1 ? conjuncts[0] : ("(or " + conjuncts.Concat(" ") + ")");
+ SendThisVC("(assert " + expr + ")");
+ SendThisVC("(check-sat)");
}
SendThisVC("(pop 1)");