diff options
Diffstat (limited to 'Source/Core/AbsyType.cs')
-rw-r--r-- | Source/Core/AbsyType.cs | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/Source/Core/AbsyType.cs b/Source/Core/AbsyType.cs index a22ece7d..d78e0d34 100644 --- a/Source/Core/AbsyType.cs +++ b/Source/Core/AbsyType.cs @@ -13,7 +13,6 @@ namespace Microsoft.Boogie { using System.Diagnostics;
using System.Collections.Generic;
using Microsoft.Boogie.AbstractInterpretation;
- using AI = Microsoft.AbstractInterpretationFramework;
using System.Diagnostics.Contracts;
//=====================================================================
@@ -240,6 +239,11 @@ namespace Microsoft.Boogie { return false;
}
}
+ public virtual bool IsReal {
+ get {
+ return false;
+ }
+ }
public virtual bool IsBool {
get {
return false;
@@ -331,6 +335,7 @@ namespace Microsoft.Boogie { }
public static readonly Type/*!*/ Int = new BasicType(SimpleType.Int);
+ public static readonly Type/*!*/ Real = new BasicType(SimpleType.Real);
public static readonly Type/*!*/ Bool = new BasicType(SimpleType.Bool);
private static BvType[] bvtypeCache;
@@ -866,6 +871,8 @@ namespace Microsoft.Boogie { switch (T) {
case SimpleType.Int:
return "int";
+ case SimpleType.Real:
+ return "real";
case SimpleType.Bool:
return "bool";
}
@@ -983,6 +990,11 @@ namespace Microsoft.Boogie { return this.T == SimpleType.Int;
}
}
+ public override bool IsReal {
+ get {
+ return this.T == SimpleType.Real;
+ }
+ }
public override bool IsBool {
get {
return this.T == SimpleType.Bool;
@@ -1884,6 +1896,12 @@ Contract.Requires(that != null); return p != null && p.IsInt;
}
}
+ public override bool IsReal {
+ get {
+ Type p = ProxyFor;
+ return p != null && p.IsReal;
+ }
+ }
public override bool IsBool {
get {
Type p = ProxyFor;
@@ -2727,6 +2745,11 @@ Contract.Requires(that != null); return ExpandedType.IsInt;
}
}
+ public override bool IsReal {
+ get {
+ return ExpandedType.IsReal;
+ }
+ }
public override bool IsBool {
get {
return ExpandedType.IsBool;
@@ -3500,6 +3523,7 @@ Contract.Ensures(Contract.ValueAtReturn(out tpInstantiation) != null); public enum SimpleType {
Int,
+ Real,
Bool
};
|