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/Compiler.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/Compiler.cs')
-rw-r--r-- | Source/Dafny/Compiler.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Dafny/Compiler.cs b/Source/Dafny/Compiler.cs index 4fdd34f6..d19d2bed 100644 --- a/Source/Dafny/Compiler.cs +++ b/Source/Dafny/Compiler.cs @@ -2816,6 +2816,12 @@ namespace Microsoft.Dafny { } else if (expr is QuantifierExpr) {
var e = (QuantifierExpr)expr;
+
+ if (e.SplitQuantifier != null) { //TODO CLEMENT TRIGGERS: Do we compile a split quantifier in its original form, or in its split form?
+ TrExpr(e.SplitQuantifierExpression);
+ return;
+ }
+
Contract.Assert(e.Bounds != null); // for non-ghost quantifiers, the resolver would have insisted on finding bounds
var n = e.BoundVars.Count;
Contract.Assert(e.Bounds.Count == n);
|