diff options
author | Dietrich <dgeisler50@gmail.com> | 2015-04-17 12:29:04 -0600 |
---|---|---|
committer | Dietrich <dgeisler50@gmail.com> | 2015-04-17 12:29:04 -0600 |
commit | 02326abeca88715427d09f8995ee5ccfd9dab397 (patch) | |
tree | 4cc522fbd5732927f45863bf7b22d518a9807268 /Source/Core/AbsyExpr.cs | |
parent | ea068f2bddb4be2eb4827f75418f46f52fd3a1f9 (diff) |
adding references to the floating point type wherever references to the real type exist. This remains a work in progress
Diffstat (limited to 'Source/Core/AbsyExpr.cs')
-rw-r--r-- | Source/Core/AbsyExpr.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/Core/AbsyExpr.cs b/Source/Core/AbsyExpr.cs index f3a943b8..00306a5e 100644 --- a/Source/Core/AbsyExpr.cs +++ b/Source/Core/AbsyExpr.cs @@ -552,6 +552,21 @@ namespace Microsoft.Boogie { CachedHashCode = ComputeHashCode();
}
+ /// <summary>
+ /// Creates a literal expression for the floating point value "v".
+ /// </summary>
+ /// <param name="tok"></param>
+ /// <param name="v"></param>
+ public LiteralExpr(IToken/*!*/ tok, FP32 v, bool immutable = false)
+ : base(tok, immutable)
+ {
+ Contract.Requires(tok != null);
+ Val = v;
+ Type = Type.Float;
+ if (immutable)
+ CachedHashCode = ComputeHashCode();
+ }
+
[Pure]
[Reads(ReadsAttribute.Reads.Nothing)]
public override bool Equals(object obj) {
|