diff options
author | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-08-14 17:38:08 -0700 |
---|---|---|
committer | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-08-14 17:38:08 -0700 |
commit | a07b43ac03b38d4af575d1a1df48339ad228751a (patch) | |
tree | 0949d29186e9fdb9ee8caaefebe4653ac24bbedb /Source/Dafny/Printer.cs | |
parent | 22a997192baf246bd86031f319aac154c2ec05cb (diff) |
Start committing split quantifiers
This requires rewriting the parts of the AST that contain these quantifiers. We
unfortunately don't have facilities to do such rewrites at the moment (and there
are loops in the AST, so it would be hard to write such a facility). As a
workaround, this commit introduces a field in quantifier expressions,
SplitQuantifiers. Code that manipulate triggers is expected to look for this
field, and ignore the other fields if that one is found.
Diffstat (limited to 'Source/Dafny/Printer.cs')
-rw-r--r-- | Source/Dafny/Printer.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Dafny/Printer.cs b/Source/Dafny/Printer.cs index 1c7508eb..43b69bbb 100644 --- a/Source/Dafny/Printer.cs +++ b/Source/Dafny/Printer.cs @@ -1729,6 +1729,13 @@ namespace Microsoft.Dafny { } else if (expr is QuantifierExpr) {
QuantifierExpr e = (QuantifierExpr)expr;
+
+ if (e.SplitQuantifier != null) {
+ // CLEMENT TODO TRIGGERS: Should (do) we have a setting to print the original forms instead of rewritten forms?
+ PrintExpr(e.SplitQuantifierExpression, contextBindingStrength, fragileContext, isRightmost, isFollowedBySemicolon, indent, resolv_count);
+ return;
+ }
+
bool parensNeeded = !isRightmost;
if (parensNeeded) { wr.Write("("); }
wr.Write(e is ForallExpr ? "forall" : "exists");
|