summaryrefslogtreecommitdiff
path: root/Source/Dafny/Triggers/TriggersCollector.cs
diff options
context:
space:
mode:
authorGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-08-21 09:40:17 -0700
committerGravatar Clément Pit--Claudel <clement.pitclaudel@live.com>2015-08-21 09:40:17 -0700
commitb819c42e85eb8ac0968abeab9f3fa3420a5dd760 (patch)
tree9f34664cb3fc11804e397ea09fda313e69d43dc2 /Source/Dafny/Triggers/TriggersCollector.cs
parentaf6f23ba1869c0450c44e917becc48263b565327 (diff)
Allow display expressions as trigger terms
Diffstat (limited to 'Source/Dafny/Triggers/TriggersCollector.cs')
-rw-r--r--Source/Dafny/Triggers/TriggersCollector.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Dafny/Triggers/TriggersCollector.cs b/Source/Dafny/Triggers/TriggersCollector.cs
index 30f7b9e8..167a6a1b 100644
--- a/Source/Dafny/Triggers/TriggersCollector.cs
+++ b/Source/Dafny/Triggers/TriggersCollector.cs
@@ -169,7 +169,7 @@ namespace Microsoft.Dafny.Triggers {
expr.SubExpressions.Iter(e => Annotate(e));
TriggerAnnotation annotation; // TODO: Using ApplySuffix fixes the unresolved members problem in GenericSort
- if (expr is FunctionCallExpr || expr is SeqSelectExpr || expr is MemberSelectExpr || expr is OldExpr || expr is ApplyExpr ||
+ if (expr is FunctionCallExpr || expr is SeqSelectExpr || expr is MemberSelectExpr || expr is OldExpr || expr is ApplyExpr || expr is DisplayExpression ||
(expr is UnaryOpExpr && (((UnaryOpExpr)expr).Op == UnaryOpExpr.Opcode.Cardinality)) || // FIXME || ((UnaryOpExpr)expr).Op == UnaryOpExpr.Opcode.Fresh doesn't work, as fresh is a pretty tricky predicate when it's not about datatypes. See translator.cs:10944
(expr is BinaryExpr && (((BinaryExpr)expr).Op == BinaryExpr.Opcode.NotIn || ((BinaryExpr)expr).Op == BinaryExpr.Opcode.In))) {
annotation = AnnotatePotentialCandidate(expr);
@@ -186,8 +186,7 @@ namespace Microsoft.Dafny.Triggers {
expr is OldExpr ||
expr is ThisExpr ||
expr is BoxingCastExpr ||
- expr is DatatypeValue ||
- expr is SeqDisplayExpr) { //FIXME what abvout other display expressions?
+ expr is DatatypeValue) {
annotation = AnnotateOther(expr, false);
} else {
annotation = AnnotateOther(expr, true);