diff options
author | 2012-02-19 00:18:00 -0800 | |
---|---|---|
committer | 2012-02-19 00:18:00 -0800 | |
commit | ba75a2d0b67ce5c330abd1903a6942a9b385d361 (patch) | |
tree | f77ac15c01adc43eb052f1b29dfa402eb7c87832 /Dafny/DafnyAst.cs | |
parent | 5b6de79e16850e70a9ab1a37ba45245275c3fd20 (diff) |
Dafny: make sure assume->assert transformation gives rise to a check
Diffstat (limited to 'Dafny/DafnyAst.cs')
-rw-r--r-- | Dafny/DafnyAst.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Dafny/DafnyAst.cs b/Dafny/DafnyAst.cs index 27fbb05c..c9c0ec08 100644 --- a/Dafny/DafnyAst.cs +++ b/Dafny/DafnyAst.cs @@ -101,7 +101,18 @@ namespace Microsoft.Dafny { Prev = prev;
}
- public class Argument {
+ public static bool Contains(Attributes attrs, string nm) {
+ Contract.Requires(nm != null);
+ for (; attrs != null; attrs = attrs.Prev) {
+ if (attrs.Name == nm) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public class Argument
+ {
public readonly IToken Tok;
public readonly string S;
public readonly Expression E;
|