diff options
author | Rustan Leino <unknown> | 2014-01-06 23:11:49 -0800 |
---|---|---|
committer | Rustan Leino <unknown> | 2014-01-06 23:11:49 -0800 |
commit | 9ae6866cad0c6af00010940013e1ed272c649e77 (patch) | |
tree | 8c17fc08ca9eab32272f6401502e4f0b1ed7197e /Binaries | |
parent | 621178a0da1fee756dcf6dd713c8ef5b14530800 (diff) |
Compile assign-such-that for all integers, not just ones where a bound is found
Diffstat (limited to 'Binaries')
-rw-r--r-- | Binaries/DafnyRuntime.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Binaries/DafnyRuntime.cs b/Binaries/DafnyRuntime.cs index a8faafae..f61163d0 100644 --- a/Binaries/DafnyRuntime.cs +++ b/Binaries/DafnyRuntime.cs @@ -581,6 +581,15 @@ namespace Dafny yield return true;
}
}
+ public static IEnumerable<BigInteger> AllIntegers {
+ get {
+ yield return new BigInteger(0);
+ for (var j = new BigInteger(1);; j++) {
+ yield return j;
+ yield return -j;
+ }
+ }
+ }
// pre: b != 0
// post: result == a/b, as defined by Euclidean Division (http://en.wikipedia.org/wiki/Modulo_operation)
public static BigInteger EuclideanDivision(BigInteger a, BigInteger b) {
|