summaryrefslogtreecommitdiff
path: root/Source/Provers/SMTLib/SMTLibLineariser.cs
diff options
context:
space:
mode:
authorGravatar MichalMoskal <unknown>2011-02-23 03:54:45 +0000
committerGravatar MichalMoskal <unknown>2011-02-23 03:54:45 +0000
commit16913d8e531b9f1f155ca6bcdf7a58d3731b2850 (patch)
treece43b834f079d133ffcdd87b85fb87360f986a22 /Source/Provers/SMTLib/SMTLibLineariser.cs
parent4f9ad03f5d0d6d9a8dbd27adf25b83a3f50d7aa1 (diff)
Add hack for {:bvbuiltin "sign_extend 42"}, which requires slightly different syntax in SMT than in Simplify
Diffstat (limited to 'Source/Provers/SMTLib/SMTLibLineariser.cs')
-rw-r--r--Source/Provers/SMTLib/SMTLibLineariser.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Provers/SMTLib/SMTLibLineariser.cs b/Source/Provers/SMTLib/SMTLibLineariser.cs
index 9f16eb5b..4884b44f 100644
--- a/Source/Provers/SMTLib/SMTLibLineariser.cs
+++ b/Source/Provers/SMTLib/SMTLibLineariser.cs
@@ -155,6 +155,11 @@ namespace Microsoft.Boogie.SMTLib
Contract.Requires(f != null);
string retVal = null;
retVal = f.FindStringAttribute("bvbuiltin");
+
+ // It used to be "sign_extend 12" in Simplify, and is "sign_extend[12]" with SMT
+ if (retVal != null && retVal.StartsWith("sign_extend "))
+ return retVal.Replace(" ", "[") + "]";
+
if (retVal == null) {
retVal = f.FindStringAttribute("builtin");
}