From e3f1ff6980e920d64134a92971f342fabe89f5bf Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Sat, 13 Jun 2009 02:56:57 +0000 Subject: 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 --- lib/Expr/Expr.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') 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::createImplies(ref hyp, ref conc) { return OrExpr::create(Expr::createNot(hyp), conc); } +ref Expr::createIff(ref e1, ref e2) { + return AndExpr::create(Expr::createImplies(e1, e2), + Expr::createImplies(e2, e1)); +} + ref Expr::createIsZero(ref e) { return EqExpr::create(e, ConstantExpr::create(0, e->getWidth())); } -- cgit 1.4.1