summaryrefslogtreecommitdiff
path: root/Binaries
diff options
context:
space:
mode:
authorGravatar Jason Koenig <unknown>2012-07-17 18:27:03 -0700
committerGravatar Jason Koenig <unknown>2012-07-17 18:27:03 -0700
commit149540a251282e2b0ed0a4be940d1d91d2908627 (patch)
tree412c80d65b7ef1087f201bdcaf2f2f5cc2af9afa /Binaries
parentcaf298f8cab0138c0dde7328b0565642094256a7 (diff)
Dafny: allowed strictly finite datatypes in comprehensions, quantifiers, and parallel statements.
Diffstat (limited to 'Binaries')
-rw-r--r--Binaries/DafnyRuntime.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Binaries/DafnyRuntime.cs b/Binaries/DafnyRuntime.cs
index 61df448f..ac688143 100644
--- a/Binaries/DafnyRuntime.cs
+++ b/Binaries/DafnyRuntime.cs
@@ -509,6 +509,12 @@ namespace Dafny
}
return frall;
}
+ public static bool QuantDatatype<U>(IEnumerable<U> set, bool frall, System.Predicate<U> pred) {
+ foreach (var u in set) {
+ if (pred(u) != frall) { return !frall; }
+ }
+ return frall;
+ }
// Enumerating other collections
public delegate Dafny.Set<T> ComprehensionDelegate<T>();
public delegate Dafny.Map<U, V> MapComprehensionDelegate<U, V>();