diff options
author | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-08-27 21:25:06 -0700 |
---|---|---|
committer | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-08-27 21:25:06 -0700 |
commit | 1e725f0c9382a3dd8be109d160581868c9567f61 (patch) | |
tree | 8f4112342c757d402b9e74dbe1b15a6dd3e1001c /Source/Dafny/Triggers/TriggersCollector.cs | |
parent | 7a993f6c87eaa82f383b1c5e7411f1878d4edf30 (diff) |
Further relax the loop detection conditions
Mismatches are now allowed up to expressions not involving any of the bound
variables of the quantifier under inspection.
Diffstat (limited to 'Source/Dafny/Triggers/TriggersCollector.cs')
-rw-r--r-- | Source/Dafny/Triggers/TriggersCollector.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Dafny/Triggers/TriggersCollector.cs b/Source/Dafny/Triggers/TriggersCollector.cs index d78bcb9e..cc3b1978 100644 --- a/Source/Dafny/Triggers/TriggersCollector.cs +++ b/Source/Dafny/Triggers/TriggersCollector.cs @@ -69,7 +69,8 @@ namespace Microsoft.Dafny.Triggers { internal IEnumerable<TriggerMatch> LoopingSubterms(QuantifierExpr quantifier) {
Contract.Requires(quantifier.SplitQuantifier == null); // Don't call this on a quantifier with a Split clause: it's not a real quantifier
var matchingSubterms = this.MatchingSubterms(quantifier);
- return matchingSubterms.Where(tm => tm.CouldCauseLoops(Terms));
+ var boundVars = new HashSet<BoundVar>(quantifier.BoundVars);
+ return matchingSubterms.Where(tm => tm.CouldCauseLoops(Terms, boundVars));
}
internal List<TriggerMatch> MatchingSubterms(QuantifierExpr quantifier) {
|