summaryrefslogtreecommitdiff
path: root/Test/dafny1/TreeDatatype.dfy
diff options
context:
space:
mode:
authorGravatar rustanleino <unknown>2010-11-25 21:31:57 +0000
committerGravatar rustanleino <unknown>2010-11-25 21:31:57 +0000
commitd6bc9bf0a6eac0d8eb3b551c6da1d7754a10a6a1 (patch)
treef0d3c6e9e2ccf9725a7cde052358c9458dff575b /Test/dafny1/TreeDatatype.dfy
parent367093297e9a3ae6ac77c8d363d6fbfdf6badefb (diff)
Dafny: Improved default decreases clauses for methods and functions
Dafny: Don't display "alloc" field in BVD Chalice: Fixed error-message parsing error in VS mode
Diffstat (limited to 'Test/dafny1/TreeDatatype.dfy')
-rw-r--r--Test/dafny1/TreeDatatype.dfy6
1 files changed, 0 insertions, 6 deletions
diff --git a/Test/dafny1/TreeDatatype.dfy b/Test/dafny1/TreeDatatype.dfy
index 58124171..7fc62feb 100644
--- a/Test/dafny1/TreeDatatype.dfy
+++ b/Test/dafny1/TreeDatatype.dfy
@@ -10,14 +10,12 @@ datatype Tree {
}
static function Inc(t: Tree): Tree
- decreases t;
{
match t
case Node(n, children) => #Tree.Node(n+1, ForestInc(children))
}
static function ForestInc(forest: List<Tree>): List<Tree>
- decreases forest;
{
match forest
case Nil => forest
@@ -31,14 +29,12 @@ datatype GTree<T> {
}
static function GInc(t: GTree<int>): GTree<int>
- decreases t;
{
match t
case Node(n, children) => #GTree.Node(n+1, GForestInc(children))
}
static function GForestInc(forest: List<GTree<int>>): List<GTree<int>>
- decreases forest;
{
match forest
case Nil => forest
@@ -57,14 +53,12 @@ datatype OneTree {
}
static function XInc(t: OneTree): OneTree
- decreases t;
{
match t
case Node(n, children) => #OneTree.Node(n+1, XForestInc(children))
}
static function XForestInc(forest: TreeList): TreeList
- decreases forest;
{
match forest
case Nil => forest