diff options
author | Rustan Leino <leino@microsoft.com> | 2011-07-11 19:08:48 -0700 |
---|---|---|
committer | Rustan Leino <leino@microsoft.com> | 2011-07-11 19:08:48 -0700 |
commit | cb20c2a781055190994851bb375828db642fa271 (patch) | |
tree | 8c3fae9a78d5ed53bf3b148294a2c8001ad2c94d /Test/dafny1 | |
parent | 2f7dd71225c89e0901bf228203d88b73814d9354 (diff) |
Dafny: allow constructors only inside classes, removed semi-colons at end of body-less functions/methods
Diffstat (limited to 'Test/dafny1')
-rw-r--r-- | Test/dafny1/Celebrity.dfy | 2 | ||||
-rw-r--r-- | Test/dafny1/Rippling.dfy | 4 | ||||
-rw-r--r-- | Test/dafny1/UltraFilter.dfy | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Test/dafny1/Celebrity.dfy b/Test/dafny1/Celebrity.dfy index 74512e01..21b895aa 100644 --- a/Test/dafny1/Celebrity.dfy +++ b/Test/dafny1/Celebrity.dfy @@ -1,6 +1,6 @@ // Celebrity example, inspired by the Rodin tutorial
-static function method Knows<Person>(a: Person, b: Person): bool;
+static function method Knows<Person>(a: Person, b: Person): bool
requires a != b; // forbid asking about the reflexive case
static function IsCelebrity<Person>(c: Person, people: set<Person>): bool
diff --git a/Test/dafny1/Rippling.dfy b/Test/dafny1/Rippling.dfy index fdce6dc7..39e14ea5 100644 --- a/Test/dafny1/Rippling.dfy +++ b/Test/dafny1/Rippling.dfy @@ -163,7 +163,7 @@ function mapF(xs: List): List case Nil => Nil
case Cons(y, ys) => Cons(HardcodedUninterpretedFunction(y), mapF(ys))
}
-function HardcodedUninterpretedFunction(n: Nat): Nat;
+function HardcodedUninterpretedFunction(n: Nat): Nat
function takeWhileAlways(hardcodedResultOfP: Bool, xs: List): List
{
@@ -195,7 +195,7 @@ function filterP(xs: List): List then Cons(y, filterP(ys))
else filterP(ys)
}
-function HardcodedUninterpretedPredicate(n: Nat): Bool;
+function HardcodedUninterpretedPredicate(n: Nat): Bool
function insort(n: Nat, xs: List): List
{
diff --git a/Test/dafny1/UltraFilter.dfy b/Test/dafny1/UltraFilter.dfy index 189ff2b5..c8419890 100644 --- a/Test/dafny1/UltraFilter.dfy +++ b/Test/dafny1/UltraFilter.dfy @@ -29,7 +29,7 @@ class UltraFilter<G> { }
// Dafny currently does not have a set comprehension expression, so this method stub will have to do
- method H(f: set<set<G>>, S: set<G>, M: set<G>) returns (h: set<set<G>>);
+ method H(f: set<set<G>>, S: set<G>, M: set<G>) returns (h: set<set<G>>)
ensures (forall X :: X in h <==> M + X in f);
method Lemma_HIsFilter(h: set<set<G>>, f: set<set<G>>, S: set<G>, M: set<G>)
|