about summary refs log tree commit diff homepage
path: root/lib/Expr/Expr.cpp
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2009-06-13 02:56:57 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2009-06-13 02:56:57 +0000
commite3f1ff6980e920d64134a92971f342fabe89f5bf (patch)
tree4319ee69e19da342d3f23bbdd809a4e794456a35 /lib/Expr/Expr.cpp
parent723545c647d93082444f5b49e132c6c9b406babf (diff)
downloadklee-e3f1ff6980e920d64134a92971f342fabe89f5bf.tar.gz
Added a helper function to construct IFF expressions.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Expr/Expr.cpp')
-rw-r--r--lib/Expr/Expr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp
index 7b680567..695312ef 100644
--- a/lib/Expr/Expr.cpp
+++ b/lib/Expr/Expr.cpp
@@ -301,6 +301,11 @@ ref<Expr> Expr::createImplies(ref<Expr> hyp, ref<Expr> conc) {
   return OrExpr::create(Expr::createNot(hyp), conc);
 }
 
+ref<Expr> Expr::createIff(ref<Expr> e1, ref<Expr> e2) {
+  return AndExpr::create(Expr::createImplies(e1, e2), 
+			 Expr::createImplies(e2, e1));
+}
+
 ref<Expr> Expr::createIsZero(ref<Expr> e) {
   return EqExpr::create(e, ConstantExpr::create(0, e->getWidth()));
 }