summaryrefslogtreecommitdiff
path: root/test/regress
diff options
context:
space:
mode:
authormudathirmahgoub <mudathirmahgoub@gmail.com>2021-03-03 02:16:32 -0600
committerGitHub <noreply@github.com>2021-03-03 08:16:32 +0000
commitc4709cb01356dd73fdd767d19af85b36ffd566c4 (patch)
tree9ad44e16486ec4cbb2d4c6776c1d80a179cc6894 /test/regress
parent80d9eab67e60ae8750165ce18ecd4eebcdc06b44 (diff)
Add tuple projection operator (#5904)
This PR adds tuple projection operator to the theory of data types. It Also adds helper functions for selecting elements from a tuple.
Diffstat (limited to 'test/regress')
-rw-r--r--test/regress/CMakeLists.txt1
-rw-r--r--test/regress/regress1/datatypes/tuple_projection.smt211
2 files changed, 12 insertions, 0 deletions
diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt
index 1a43b0335..8da7cfb05 100644
--- a/test/regress/CMakeLists.txt
+++ b/test/regress/CMakeLists.txt
@@ -1476,6 +1476,7 @@ set(regress_1_tests
regress1/datatypes/non-simple-rec.smt2
regress1/datatypes/non-simple-rec-mut-unsat.smt2
regress1/datatypes/non-simple-rec-param.smt2
+ regress1/datatypes/tuple_projection.smt2
regress1/decision/bug374a.smtv1.smt2
regress1/decision/error3.smtv1.smt2
regress1/decision/quant-Arrays_Q1-noinfer.smt2
diff --git a/test/regress/regress1/datatypes/tuple_projection.smt2 b/test/regress/regress1/datatypes/tuple_projection.smt2
new file mode 100644
index 000000000..bdd9d5458
--- /dev/null
+++ b/test/regress/regress1/datatypes/tuple_projection.smt2
@@ -0,0 +1,11 @@
+(set-logic ALL)
+(set-info :status sat)
+(declare-fun t () (Tuple String String String String))
+(declare-fun u () (Tuple String String))
+(declare-fun v () Tuple)
+(declare-fun x () String)
+(assert (= t (mkTuple "a" "b" "c" "d")))
+(assert (= x ((_ tupSel 0) t)))
+(assert (= u ((_ tuple_project 2 3) t)))
+(assert (= v (tuple_project t)))
+(check-sat) \ No newline at end of file
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback