summaryrefslogtreecommitdiff
path: root/Source/VCExpr
diff options
context:
space:
mode:
authorGravatar rustanleino <unknown>2009-10-14 01:27:14 +0000
committerGravatar rustanleino <unknown>2009-10-14 01:27:14 +0000
commitd2baa552e457e5b3cf7654f3836da5c96ad1c987 (patch)
treeae9a5123041a908f64eb82c1710b644626f82f9c /Source/VCExpr
parent2e2622a8746e85b8b704ec70adfd35d730e25c19 (diff)
Evidently, Z3 does not like QID's to start with a digit. If a Boogie filename starts with a digit, don't just prepend it to a QID, but prepend another character ('_') first.
This fixes issue 5278 in the Issue Tracker.
Diffstat (limited to 'Source/VCExpr')
-rw-r--r--Source/VCExpr/Boogie2VCExpr.ssc7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/VCExpr/Boogie2VCExpr.ssc b/Source/VCExpr/Boogie2VCExpr.ssc
index f9f76465..f6393679 100644
--- a/Source/VCExpr/Boogie2VCExpr.ssc
+++ b/Source/VCExpr/Boogie2VCExpr.ssc
@@ -405,8 +405,13 @@ namespace Microsoft.Boogie.VCExprAST
if (filename == null) filename = "unknown";
for (int i = 0; i < filename.Length; ++i) {
if (filename[i] == '/' || filename[i] == '\\') buf.Length = 0;
- if (buf.Length < max && char.IsLetterOrDigit(filename[i]))
+ if (buf.Length < max && char.IsLetterOrDigit(filename[i])) {
+ if (buf.Length == 0 && char.IsDigit(filename[i])) {
+ // Z3 does not like QID's to start with a digit, so we prepend another character
+ buf.Append('_');
+ }
buf.Append(filename[i]);
+ }
}
buf.Append('.').Append(v.Line).Append(':').Append(v.Col);
qid = buf.ToString();