about summary refs log tree commit diff homepage
path: root/test/Expr/Parser/MultiByteReads.kquery
diff options
context:
space:
mode:
Diffstat (limited to 'test/Expr/Parser/MultiByteReads.kquery')
-rw-r--r--test/Expr/Parser/MultiByteReads.kquery20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Expr/Parser/MultiByteReads.kquery b/test/Expr/Parser/MultiByteReads.kquery
new file mode 100644
index 00000000..71f0288f
--- /dev/null
+++ b/test/Expr/Parser/MultiByteReads.kquery
@@ -0,0 +1,20 @@
+# RUN: %kleaver -print-ast -pc-multibyte-reads=true %s > %t.log
+# RUN: grep -q "(ReadLSB w32 4 arr1)" %t.log
+# RUN: grep -q "(ReadMSB w32 2 arr2)" %t.log
+
+array arr1[8] : w32 -> w8 = symbolic
+array arr2[8] : w32 -> w8 = symbolic
+
+(query [(Not (Slt 100
+                  (Concat w32 (Read w8 7 arr1)
+                              (Concat w24 (Read w8 6 arr1)
+                                          (Concat w16 (Read w8 5 arr1) (Read w8 4 arr1))))))]
+       false)
+
+
+(query [(Not (Slt 100
+                  (Concat w32 (Read w8 2 arr2)
+                              (Concat w24 (Read w8 3 arr2)
+                                          (Concat w16 (Read w8 4 arr2) (Read w8 5 arr2))))))]
+       false)
+