diff options
author | Rustan Leino <unknown> | 2013-08-02 21:44:37 -0700 |
---|---|---|
committer | Rustan Leino <unknown> | 2013-08-02 21:44:37 -0700 |
commit | 8af0f2d97ab5ca1a212c7f4901c43059ccb08e36 (patch) | |
tree | f412217ac7bb4e348669f9b34d121349c187e294 /Test/dafny0/ResolutionErrors.dfy | |
parent | 0487bbe1d95c08a458e496240547127f03a7be3b (diff) |
Introduced keywords "lemma" (like a "ghost method", but not allowed to have a "modifies" clause) and "colemma" (synonymous with "comethod"; perhaps "comethod" will go away at some point)
Diffstat (limited to 'Test/dafny0/ResolutionErrors.dfy')
-rw-r--r-- | Test/dafny0/ResolutionErrors.dfy | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Test/dafny0/ResolutionErrors.dfy b/Test/dafny0/ResolutionErrors.dfy index 60314836..92b4aa80 100644 --- a/Test/dafny0/ResolutionErrors.dfy +++ b/Test/dafny0/ResolutionErrors.dfy @@ -642,3 +642,14 @@ module UnderspecifiedTypes { var T4 :| T4 <= S;
}
}
+
+// ------------------------- lemmas ------------------------------
+
+// a lemma is allowed to have out-parameters, but not a modifies clause
+lemma MyLemma(x: int) returns (y: int)
+ requires 0 <= x;
+ modifies this;
+ ensures 0 <= y;
+{
+ y := x;
+}
|