about summary refs log tree commit diff homepage
path: root/include
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2016-11-27 00:00:04 +0000
committerDan Liew <daniel.liew@imperial.ac.uk>2016-11-28 15:07:49 +0000
commit48d20142488fbd644b1be53f42d30517adc59f6f (patch)
tree807b23a6578a43de826e87b336ce86655d7f93ae /include
parentf27cf86466d75c71a302abe5e0a3ffcad1670373 (diff)
downloadklee-48d20142488fbd644b1be53f42d30517adc59f6f.tar.gz
Fix bug in implementation of `NotExpr`. It should not implement
`compareContents()`.

This bug would not have affected correctness but it would have
affected performance because if `Expr::compare()` was called on
two structually equal `NotExpr` then its children would be
checked for structually equality twice - once in
NotExpr::compareContents()` and once in `Expr::compare()`.

This partially addresses #515 .
Diffstat (limited to 'include')
-rw-r--r--include/klee/Expr.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/include/klee/Expr.h b/include/klee/Expr.h
index d70cfdc9..500d7d46 100644
--- a/include/klee/Expr.h
+++ b/include/klee/Expr.h
@@ -765,12 +765,6 @@ public:
   unsigned getNumKids() const { return numKids; }
   ref<Expr> getKid(unsigned i) const { return expr; }
 
-  int compareContents(const Expr &b) const {
-    const NotExpr &eb = static_cast<const NotExpr&>(b);
-    if (expr != eb.expr) return expr < eb.expr ? -1 : 1;
-    return 0;
-  }
-
   virtual ref<Expr> rebuild(ref<Expr> kids[]) const { 
     return create(kids[0]);
   }