summaryrefslogtreecommitdiff
path: root/Source/AbsInt
diff options
context:
space:
mode:
authorGravatar Dan Liew <daniel.liew@imperial.ac.uk>2015-01-25 20:39:09 +0000
committerGravatar Dan Liew <daniel.liew@imperial.ac.uk>2015-01-25 20:39:09 +0000
commitf11b44a267d7b77feccf33dd1d6d3a2ee712458e (patch)
treed4dc13f793f13f5c36e19592497ac82c4433475f /Source/AbsInt
parent458be604ebe9f9ed93a2b8af4c424493f119cd8c (diff)
Change the return type of StandardVisitor.VisitBvExtractExpr() from
BvExtractExpr to Expr. Enforcing the return type be BvExtractExpr is too restrictive. For example it prevents anyone from implementing a visitor that does constant folding of an Expr tree. There is precedence for this. For example VisitNAryExpr() returns an Expr not an NAryExpr. Unfortunately this a breaking API change so anyone who subclasses the StandardVisitor (or one of its sub classes) and overrides this method will get compilation errors until they change the return type. a visitor that does constant folding of an Expr tree
Diffstat (limited to 'Source/AbsInt')
-rw-r--r--Source/AbsInt/IntervalDomain.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/AbsInt/IntervalDomain.cs b/Source/AbsInt/IntervalDomain.cs
index c0303cb3..5a4c606f 100644
--- a/Source/AbsInt/IntervalDomain.cs
+++ b/Source/AbsInt/IntervalDomain.cs
@@ -948,7 +948,7 @@ namespace Microsoft.Boogie.AbstractInterpretation
// don't recurse on subexpression
return node;
}
- public override BvExtractExpr VisitBvExtractExpr(BvExtractExpr node) {
+ public override Expr VisitBvExtractExpr(BvExtractExpr node) {
// don't recurse on subexpression
return node;
}