From ed963d407e5de9b09191324f5e277ea40e1aea0b Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Thu, 7 Nov 2013 11:52:18 +0000 Subject: Fixed overshifting an expression by a constant so that we overshift to zero. A test case was added for this. In addition the use to vc_bvExtract() was removed for shifting left by an expression because we don't want/need bitmasked behaviour anymore. --- test/Solver/overshift-left-by-constant.kquery | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/Solver/overshift-left-by-constant.kquery (limited to 'test/Solver') diff --git a/test/Solver/overshift-left-by-constant.kquery b/test/Solver/overshift-left-by-constant.kquery new file mode 100644 index 00000000..e0709100 --- /dev/null +++ b/test/Solver/overshift-left-by-constant.kquery @@ -0,0 +1,14 @@ +# RUN: %kleaver %s > %t +# RUN: not grep INVALID %t +array x[4] : w32 -> w8 = symbolic +# ∀ x. x > 0 → ( x << 32 = 0 ) +# Check we overshift to zero for when shifting for all 32-bit values >0 + +(query [ (Ult (w32 0) (ReadLSB w32 (w32 0) x)) ] + (Eq + (Shl w32 + (ReadLSB w32 (w32 0) x) + (w32 32) + ) + (w32 0) + ) [ ] [x] ) -- cgit 1.4.1