summaryrefslogtreecommitdiff
path: root/test/smt
diff options
context:
space:
mode:
authorAlasdair Armstrong2019-04-16 14:14:15 +0100
committerAlasdair Armstrong2019-04-16 18:02:23 +0100
commit3910a0e9241703067264f0a0b1b69c1103f1ccd7 (patch)
tree9c2b2a28d439b2bd84bedaea31a6543246127233 /test/smt
parentfb9deaeeaffb61c4147ef04a7dd52676ef54ec4d (diff)
SMT: Fix inlining issues
Diffstat (limited to 'test/smt')
-rw-r--r--test/smt/inline_regression.unsat.sail20
-rw-r--r--test/smt/inline_test_1.unsat.sail22
2 files changed, 42 insertions, 0 deletions
diff --git a/test/smt/inline_regression.unsat.sail b/test/smt/inline_regression.unsat.sail
new file mode 100644
index 00000000..245ad8b7
--- /dev/null
+++ b/test/smt/inline_regression.unsat.sail
@@ -0,0 +1,20 @@
+default Order dec
+
+$include <prelude.sail>
+
+function id(c: bits(64)) -> bits(64) = c
+
+function g(c__arg: bits(64), c': bits(64)) -> bool = {
+ c = c__arg;
+ c == c'
+}
+
+function f(c: bits(64), c': bits(64)) -> bool = {
+ let c = c;
+ g(c', c)
+}
+
+$property
+function prop(c: bits(64)) -> bool = {
+ f(c, c) & g(c, c)
+} \ No newline at end of file
diff --git a/test/smt/inline_test_1.unsat.sail b/test/smt/inline_test_1.unsat.sail
new file mode 100644
index 00000000..990afd3e
--- /dev/null
+++ b/test/smt/inline_test_1.unsat.sail
@@ -0,0 +1,22 @@
+default Order dec
+
+$include <prelude.sail>
+
+function id(c: bits(64)) -> bits(64) = c
+
+function g(c: bits(64), c': bits(64)) -> bool = {
+ {
+ let c = c;
+ c == c'
+ }
+}
+
+function f(c: bits(64), c': bits(64)) -> bool = {
+ let c = c;
+ c == c' & ({ g(c, c') }) & g(c', c)
+}
+
+$property
+function prop(c: bits(64)) -> bool = {
+ f(c, c) & g(c, c)
+} \ No newline at end of file