From 53b7af62613624ab966934862b160a0b3ed3826d Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Fri, 10 Jul 2009 07:34:04 +0000 Subject: Added support for bitwise not. Replacing "false == " with Not in the canonical form. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@75239 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Solver/STPBuilder.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'lib/Solver') diff --git a/lib/Solver/STPBuilder.cpp b/lib/Solver/STPBuilder.cpp index 65ef24d1..4e091600 100644 --- a/lib/Solver/STPBuilder.cpp +++ b/lib/Solver/STPBuilder.cpp @@ -700,7 +700,17 @@ ExprHandle STPBuilder::constructActual(ref e, int *width_out) { return vc_sbvModExpr(vc, *width_out, left, right); } - // Binary + // Bitwise + + case Expr::Not: { + NotExpr *ne = cast(e); + ExprHandle expr = construct(ne->expr, width_out); + if (*width_out==1) { + return vc_notExpr(vc, expr); + } else { + return vc_bvNotExpr(vc, expr); + } + } case Expr::And: { AndExpr *ae = cast(e); @@ -712,6 +722,7 @@ ExprHandle STPBuilder::constructActual(ref e, int *width_out) { return vc_bvAndExpr(vc, left, right); } } + case Expr::Or: { OrExpr *oe = cast(e); ExprHandle left = construct(oe->left, width_out); -- cgit 1.4.1