summaryrefslogtreecommitdiff
path: root/Source/Core/AbsyExpr.cs
diff options
context:
space:
mode:
authorGravatar Dan Rosén <danr@chalmers.se>2014-08-01 09:57:25 -0700
committerGravatar Dan Rosén <danr@chalmers.se>2014-08-01 09:57:25 -0700
commita32ac3bff9a24b812d133883fb9f8df5341b7bb9 (patch)
tree917d9933ee9b8b126d02b5c09ee0f36efe6052bc /Source/Core/AbsyExpr.cs
parent315922109c235044f985ca19e1bfbe5b95d1873c (diff)
Add alpha equivalence check for Expr, and use it when lambda lifting
Diffstat (limited to 'Source/Core/AbsyExpr.cs')
-rw-r--r--Source/Core/AbsyExpr.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/Core/AbsyExpr.cs b/Source/Core/AbsyExpr.cs
index bc603ea5..7e71453b 100644
--- a/Source/Core/AbsyExpr.cs
+++ b/Source/Core/AbsyExpr.cs
@@ -1893,7 +1893,19 @@ namespace Microsoft.Boogie {
this.Type = type;
}
- public string/*!*/ FunctionName {
+ public override bool Equals(object obj) {
+ TypeCoercion other = obj as TypeCoercion;
+ if (other == null) {
+ return false;
+ } else {
+ return object.Equals(Type, other.Type);
+ }
+ }
+
+
+
+ public
+ string/*!*/ FunctionName {
get {
Contract.Ensures(Contract.Result<string>() != null);
@@ -2110,7 +2122,7 @@ namespace Microsoft.Boogie {
return false;
NAryExpr other = (NAryExpr)obj;
- return object.Equals(this.Fun, other.Fun) && object.Equals(this.Args, other.Args);
+ return this.Args.ListEquals(other.Args) && object.Equals(this.Fun, other.Fun);
}
[Pure]
public override int GetHashCode() {