summaryrefslogtreecommitdiff
path: root/Source/Core/AbsyType.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/AbsyType.cs')
-rw-r--r--Source/Core/AbsyType.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/AbsyType.cs b/Source/Core/AbsyType.cs
index 4efe1aea..00e1a5c6 100644
--- a/Source/Core/AbsyType.cs
+++ b/Source/Core/AbsyType.cs
@@ -2093,6 +2093,11 @@ Contract.Requires(that != null);
private static int MinBitsFor(Type t) {
Contract.Requires(t != null);
Contract.Requires(t.IsBv);
+
+ if (t is TypeSynonymAnnotation) {
+ return MinBitsFor(((TypeSynonymAnnotation)t).ExpandedType);
+ }
+
Contract.Ensures(0 <= Contract.Result<int>());
if (t is BvType) {
return t.BvBits;
@@ -2195,6 +2200,11 @@ Contract.Requires(that != null);
Contract.Requires(t != null);
Contract.Requires(t.IsBv && 0 <= to && MinBitsFor(t) <= to);
Contract.Ensures(0 <= Contract.Result<int>() && Contract.Result<int>() <= to);
+
+ if(t is TypeSynonymAnnotation) {
+ return IncreaseBits(((TypeSynonymAnnotation)t).ExpandedType, to);
+ }
+
t = FollowProxy(t);
if (t is BvType) {
return to - t.BvBits;