summaryrefslogtreecommitdiff
path: root/Dafny/Resolver.cs
diff options
context:
space:
mode:
authorGravatar Rustan Leino <leino@microsoft.com>2012-09-26 00:09:04 -0700
committerGravatar Rustan Leino <leino@microsoft.com>2012-09-26 00:09:04 -0700
commit225930765d1f6c11dcf6c523ce0730457c07ec47 (patch)
tree5ea7ecbd4e5a972ea27c64dc5a6f1004647603fc /Dafny/Resolver.cs
parent3aac24b3f84b0c969e08a13aee01c75457c43851 (diff)
Dafny: compile iterators
Diffstat (limited to 'Dafny/Resolver.cs')
-rw-r--r--Dafny/Resolver.cs16
1 files changed, 13 insertions, 3 deletions
diff --git a/Dafny/Resolver.cs b/Dafny/Resolver.cs
index d568ab0e..1fd828a0 100644
--- a/Dafny/Resolver.cs
+++ b/Dafny/Resolver.cs
@@ -546,15 +546,25 @@ namespace Microsoft.Dafny
// Also add "Valid" and "MoveNext"
var init = new Constructor(iter.tok, iter.Name, new List<TypeParameter>(), iter.Ins,
/* TODO: Fill in the spec here */
- new List<MaybeFreeExpression>(), new Specification<FrameExpression>(null, null), new List<MaybeFreeExpression>(), new Specification<Expression>(null, null),
+ new List<MaybeFreeExpression>(),
+ new Specification<FrameExpression>(new List<FrameExpression>(), null),
+ new List<MaybeFreeExpression>(),
+ new Specification<Expression>(new List<Expression>(), null),
null, null, false);
var valid = new Predicate(iter.tok, "Valid", false, true, new List<TypeParameter>(), iter.tok,
- new List<Formal>(), new List<Expression>(), new List<FrameExpression>()/*TODO: does this need to be filled?*/, new List<Expression>(), new Specification<Expression>(null, null),
+ new List<Formal>(),
+ new List<Expression>(),
+ new List<FrameExpression>()/*TODO: does this need to be filled?*/,
+ new List<Expression>(),
+ new Specification<Expression>(new List<Expression>(), null),
null/*TODO: does this need to be fileld?*/, Predicate.BodyOriginKind.OriginalOrInherited, null, false);
var moveNext = new Method(iter.tok, "MoveNext", false, false, new List<TypeParameter>(),
new List<Formal>(), new List<Formal>() { new Formal(iter.tok, "more", Type.Bool, false, false) },
/* TODO: Do the first 3 of the specification components on the next line need to be filled in? */
- new List<MaybeFreeExpression>(), new Specification<FrameExpression>(null, null), new List<MaybeFreeExpression>(), new Specification<Expression>(null, null),
+ new List<MaybeFreeExpression>(),
+ new Specification<FrameExpression>(new List<FrameExpression>(), null),
+ new List<MaybeFreeExpression>(),
+ new Specification<Expression>(new List<Expression>(), null),
null, null, false);
init.EnclosingClass = iter;
valid.EnclosingClass = iter;