summaryrefslogtreecommitdiff
path: root/Binaries/DafnyRuntime.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Binaries/DafnyRuntime.cs')
-rw-r--r--Binaries/DafnyRuntime.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Binaries/DafnyRuntime.cs b/Binaries/DafnyRuntime.cs
index 982683b9..610cd2f3 100644
--- a/Binaries/DafnyRuntime.cs
+++ b/Binaries/DafnyRuntime.cs
@@ -218,4 +218,19 @@ namespace Dafny
this.Cdr = b;
}
}
+ public class Helpers
+ {
+ public static T[] InitNewArray<T>(BigInteger size) {
+ int sz = (int)size;
+ T[] a = new T[sz];
+ BigInteger[] b = a as BigInteger[];
+ if (b != null) {
+ BigInteger z = new BigInteger(0);
+ for (int i = 0; i < sz; i++) {
+ b[i] = z;
+ }
+ }
+ return a;
+ }
+ }
}