summaryrefslogtreecommitdiff
path: root/Source/Core/AbsyType.cs
diff options
context:
space:
mode:
authorGravatar Dietrich <dgeisler50@gmail.com>2015-07-20 22:27:32 -0600
committerGravatar Dietrich <dgeisler50@gmail.com>2015-07-20 22:27:32 -0600
commitbb5395b35dcea5078c9b38a2f091f26256faac34 (patch)
tree5930116d3f65b25cdcd3a98cca6ced2e30f5e057 /Source/Core/AbsyType.cs
parent52aa9b8f63a3d955031e7a0dfd6e575ca7cf76b3 (diff)
Float type now works correctly for simple variable declaration and comparison.
Diffstat (limited to 'Source/Core/AbsyType.cs')
-rw-r--r--Source/Core/AbsyType.cs22
1 files changed, 12 insertions, 10 deletions
diff --git a/Source/Core/AbsyType.cs b/Source/Core/AbsyType.cs
index 50fde975..5d41a8dd 100644
--- a/Source/Core/AbsyType.cs
+++ b/Source/Core/AbsyType.cs
@@ -330,20 +330,22 @@ namespace Microsoft.Boogie {
return false;
}
}
- public virtual int FloatMantissa {
- get {
+ public virtual int FloatExponent
+ {
+ get
+ {
{
Contract.Assert(false);
throw new cce.UnreachableException();
- } // Type.FloatMantissa should never be called
+ } // Type.FloatExponent should never be called
}
}
- public virtual int FloatExponent {
+ public virtual int FloatMantissa {
get {
{
Contract.Assert(false);
throw new cce.UnreachableException();
- } // Type.FloatExponent should never be called
+ } // Type.FloatMantissa should never be called
}
}
public virtual bool IsBv {
@@ -1050,14 +1052,14 @@ namespace Microsoft.Boogie {
public FloatType(IToken token, int exponent, int mantissa)
: base(token) {
Contract.Requires(token != null);
- Mantissa = mantissa;
Exponent = exponent;
+ Mantissa = mantissa;
}
public FloatType(int exponent, int mantissa)
: base(Token.NoToken) {
- Mantissa = mantissa;
Exponent = exponent;
+ Mantissa = mantissa;
}
//----------- Cloning ----------------------------------
@@ -1092,7 +1094,7 @@ namespace Microsoft.Boogie {
public override string ToString()
{
Contract.Ensures(Contract.Result<string>() != null);
- return "(_ FP " + Exponent + " " + Mantissa + ")";
+ return "float (" + Exponent + " " + Mantissa + ")";
}
//----------- Equality ----------------------------------
@@ -1119,10 +1121,10 @@ namespace Microsoft.Boogie {
//Contract.Requires(cce.NonNullElements(unifier));
that = that.Expanded;
if (that is TypeProxy || that is TypeVariable) {
- return that.Unify(this, unifiableVariables, unifier);
+ return that.Unify(this, unifiableVariables, unifier);
}
else {
- return this.Equals(that);
+ return this.Equals(that);
}
}