diff options
author | 2010-07-28 22:28:00 +0000 | |
---|---|---|
committer | 2010-07-28 22:28:00 +0000 | |
commit | 9ab19a65d2d6ff32073ca54cde89309dd8d7c774 (patch) | |
tree | 7f7a1256c04deb0e1a444b5207fb65b15674b9f7 /Source/DafnyDriver | |
parent | 0d7c699e8b805d8e911f63fc779d63753008c151 (diff) |
Dafny: DafnyDriver port part 2/3: Adding new dependent file, removing unnecessary one.
Diffstat (limited to 'Source/DafnyDriver')
-rw-r--r-- | Source/DafnyDriver/AssemblyInfo.ssc | 4 | ||||
-rw-r--r-- | Source/DafnyDriver/cce.cs | 104 |
2 files changed, 104 insertions, 4 deletions
diff --git a/Source/DafnyDriver/AssemblyInfo.ssc b/Source/DafnyDriver/AssemblyInfo.ssc deleted file mode 100644 index 6ed99a25..00000000 --- a/Source/DafnyDriver/AssemblyInfo.ssc +++ /dev/null @@ -1,4 +0,0 @@ -using System.Reflection;
-using System.Runtime.CompilerServices;
-
-[assembly: AssemblyKeyFile("..\\InterimKey.snk")]
diff --git a/Source/DafnyDriver/cce.cs b/Source/DafnyDriver/cce.cs new file mode 100644 index 00000000..34749b5f --- /dev/null +++ b/Source/DafnyDriver/cce.cs @@ -0,0 +1,104 @@ +using System;
+using System.Collections.Generic;
+using System.Diagnostics.Contracts;
+using System.Text;
+using Microsoft.Boogie;
+
+ /// <summary>
+ /// A class containing static methods to extend the functionality of Code Contracts
+ /// </summary>
+
+public static class cce {
+ [Pure]
+ public static T NonNull<T>(T t) {
+ Contract.Assert(t != null);
+ return t;
+ }
+ [Pure]
+ public static bool NonNullElements<T>(IEnumerable<T> collection) {
+ return collection != null && Contract.ForAll(collection, c => c != null);
+ }
+ [Pure]
+ public static bool NonNullElements<TKey, TValue>(IDictionary<TKey, TValue> collection) {
+ return collection != null && NonNullElements(collection.Keys) && NonNullElements(collection.Values);
+ }
+ [Pure]
+ public static bool NonNullElements(VariableSeq collection) {
+ return collection != null && Contract.ForAll(0, collection.Length, i => collection[i] != null);
+ }
+ [Pure]
+ public static void BeginExpose(object o) {
+ }
+ [Pure]
+ public static void EndExpose() {
+ }
+ [Pure]
+ public static bool IsPeerConsistent(object o) {
+ return true;
+ }
+ [Pure]
+ public static bool IsConsistent(object o) {
+ return true;
+ }
+ [Pure]
+ public static bool IsExposable(object o) {
+ return true;
+ }
+ [Pure]
+ public static bool IsExposed(object o) {
+ return true;
+ }
+ public static class Owner {
+ [Pure]
+ public static bool Same(object o, object p) {
+ return true;
+ }
+ [Pure]
+ public static void AssignSame(object o, object p) {
+ }
+ [Pure]
+ public static object ElementProxy(object o) {
+ return o;
+ }
+ [Pure]
+ public static bool None(object o) {
+ return true;
+ }
+ }
+ [Pure]
+ public static void LoopInvariant(bool p) {
+ Contract.Assert(p);
+ }
+
+ public class UnreachableException : Exception {
+ public UnreachableException() {
+ }
+ }
+}
+
+public class PeerAttribute : System.Attribute {
+}
+public class RepAttribute : System.Attribute {
+}
+public class CapturedAttribute : System.Attribute {
+}
+public class NotDelayedAttribute : System.Attribute {
+}
+public class NoDefaultContractAttribute : System.Attribute {
+}
+public class VerifyAttribute : System.Attribute {
+ public VerifyAttribute(bool b) {
+
+ }
+}
+public class StrictReadonlyAttribute : System.Attribute {
+ }
+public class AdditiveAttribute : System.Attribute {
+}
+public class ReadsAttribute : System.Attribute {
+ public enum Reads {
+ Nothing,
+ };
+ public ReadsAttribute(object o) {
+ }
+}
\ No newline at end of file |