diff options
author | Cristian Cadar <cristic@cs.stanford.edu> | 2009-07-10 07:34:04 +0000 |
---|---|---|
committer | Cristian Cadar <cristic@cs.stanford.edu> | 2009-07-10 07:34:04 +0000 |
commit | 53b7af62613624ab966934862b160a0b3ed3826d (patch) | |
tree | 5bbaf68d9d611a75933e386c118dde6787cad8c7 /lib/Solver | |
parent | 7300bfbc2d0df000cd9ce3090eb6716c3be9f98d (diff) | |
download | klee-53b7af62613624ab966934862b160a0b3ed3826d.tar.gz |
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
Diffstat (limited to 'lib/Solver')
-rw-r--r-- | lib/Solver/STPBuilder.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
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<Expr> e, int *width_out) { return vc_sbvModExpr(vc, *width_out, left, right); } - // Binary + // Bitwise + + case Expr::Not: { + NotExpr *ne = cast<NotExpr>(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<AndExpr>(e); @@ -712,6 +722,7 @@ ExprHandle STPBuilder::constructActual(ref<Expr> e, int *width_out) { return vc_bvAndExpr(vc, left, right); } } + case Expr::Or: { OrExpr *oe = cast<OrExpr>(e); ExprHandle left = construct(oe->left, width_out); |