diff options
Diffstat (limited to 'Source/Dafny/Triggers')
-rw-r--r-- | Source/Dafny/Triggers/QuantifierSplitter.cs | 12 | ||||
-rw-r--r-- | Source/Dafny/Triggers/QuantifiersCollector.cs | 13 |
2 files changed, 25 insertions, 0 deletions
diff --git a/Source/Dafny/Triggers/QuantifierSplitter.cs b/Source/Dafny/Triggers/QuantifierSplitter.cs index 865aa33e..e46b64fb 100644 --- a/Source/Dafny/Triggers/QuantifierSplitter.cs +++ b/Source/Dafny/Triggers/QuantifierSplitter.cs @@ -114,6 +114,18 @@ namespace Microsoft.Dafny.Triggers { }
}
+ protected override void VisitOneStmt(Statement stmt) {
+ Contract.Requires(stmt != null);
+ if (stmt is ForallStmt) {
+ ForallStmt s = (ForallStmt)stmt;
+ if (s.ForallExpressions != null) {
+ foreach (Expression expr in s.ForallExpressions) {
+ VisitOneExpr(expr);
+ }
+ }
+ }
+ }
+
/// <summary>
/// See comments above definition of splits for reason why this method exists
/// </summary>
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;
+ }
}
}
|