summaryrefslogtreecommitdiff
path: root/Source/Dafny/Triggers/QuantifiersCollector.cs
diff options
context:
space:
mode:
authorGravatar qunyanm <unknown>2015-11-25 10:27:02 -0800
committerGravatar qunyanm <unknown>2015-11-25 10:27:02 -0800
commitb8fad094ad74180ca16670bebe602737d856b5da (patch)
treee14e7b6caac6fc2282b585b4bdbcd30b4a0a077a /Source/Dafny/Triggers/QuantifiersCollector.cs
parent7dfa02c3da9f68b10b20e6afcd81767d3c6ebf02 (diff)
Fix issue 103. Emit the quantifiers for ForallStmt before AutoTrigger so that
the auto-triggers can be computed for ForallStmt.
Diffstat (limited to 'Source/Dafny/Triggers/QuantifiersCollector.cs')
-rw-r--r--Source/Dafny/Triggers/QuantifiersCollector.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/Dafny/Triggers/QuantifiersCollector.cs b/Source/Dafny/Triggers/QuantifiersCollector.cs
index 1f37dcfa..789e7614 100644
--- a/Source/Dafny/Triggers/QuantifiersCollector.cs
+++ b/Source/Dafny/Triggers/QuantifiersCollector.cs
@@ -40,5 +40,18 @@ namespace Microsoft.Dafny.Triggers {
return true;
}
+
+ protected override bool VisitOneStmt(Statement stmt, ref bool st) {
+ Contract.Requires(stmt != null);
+ if (stmt is ForallStmt) {
+ ForallStmt s = (ForallStmt)stmt;
+ if (s.ForallExpressions != null) {
+ foreach (Expression expr in s.ForallExpressions) {
+ VisitOneExpr(expr, ref st);
+ }
+ }
+ }
+ return true;
+ }
}
}