summaryrefslogtreecommitdiff
path: root/Source/Provers/SMTLib/Z3.cs
diff options
context:
space:
mode:
authorGravatar Michal Moskal <michal@moskal.me>2011-10-27 17:24:30 -0700
committerGravatar Michal Moskal <michal@moskal.me>2011-10-27 17:24:30 -0700
commit51fe0a74abb863a3bb908e6fced5b9779446d065 (patch)
tree57e71d09eaa014a9bc4da9275d8d5a74474477a8 /Source/Provers/SMTLib/Z3.cs
parentce79ea13047c70583684af34d6ac4bfe88198a72 (diff)
Boogie: Present a nice error message when Z3 of lesser version than 3.2 is found
Diffstat (limited to 'Source/Provers/SMTLib/Z3.cs')
-rw-r--r--Source/Provers/SMTLib/Z3.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/Provers/SMTLib/Z3.cs b/Source/Provers/SMTLib/Z3.cs
index f9e90427..bbe13453 100644
--- a/Source/Provers/SMTLib/Z3.cs
+++ b/Source/Provers/SMTLib/Z3.cs
@@ -65,6 +65,8 @@ namespace Microsoft.Boogie.SMTLib
z3Dirs.AddRange(Directory.GetDirectories(msrDir, "Z3-*"));
}
+ int minMajor = 3, minMinor = 2;
+
// Look for the most recent version of Z3.
int minor = 0, major = 0;
string winner = null;
@@ -86,6 +88,7 @@ namespace Microsoft.Boogie.SMTLib
if (major == 0 && minor == 0) {
throw new ProverException("Cannot find executable: " + firstTry);
}
+
Contract.Assert(winner != null);
_proverPath = Path.Combine(Path.Combine(winner, "bin"), proverExe);
@@ -96,6 +99,12 @@ namespace Microsoft.Boogie.SMTLib
if (CommandLineOptions.Clo.Trace) {
Console.WriteLine("[TRACE] Using prover: " + _proverPath);
}
+
+ if (major < minMajor || (major == minMajor && minor < minMinor)) {
+ throw new ProverException(string.Format("Found version {0}.{1} of Z3. Please install version {0}.{1} or later. " +
+ "(More conservative users might opt to supply -prover:Z3 option instead to get the historic Simplify back-end)",
+ major, minor, minMajor, minMinor));
+ }
}
}