summaryrefslogtreecommitdiff
path: root/test/regress
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-10-20 06:57:44 -0500
committerGitHub <noreply@github.com>2021-10-20 11:57:44 +0000
commit1c744822538cff4e598b411514c4580848f1517b (patch)
tree0000fbeed74f4d623f87e2adcbb0935e509f9f67 /test/regress
parent3ae2c455dbb6ac95834fd23082688b11784dfcae (diff)
Correctly parse uninterpreted constant values in get-value (#7393)
SMT-LIB indicates that abstract values can appear in terms as arguments to `get-value`. This is not currently the case, as pointed out by #6908. This updates our parser so that bindings are added to the symbol table for all uninterpreted constants in the model whenever we parse a `get-value` term. Fixes #6908.
Diffstat (limited to 'test/regress')
-rw-r--r--test/regress/CMakeLists.txt1
-rw-r--r--test/regress/regress0/parser/issue6908-get-value-uc.smt210
2 files changed, 11 insertions, 0 deletions
diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt
index 81b2bd0c9..da6f4c3c9 100644
--- a/test/regress/CMakeLists.txt
+++ b/test/regress/CMakeLists.txt
@@ -782,6 +782,7 @@ set(regress_0_tests
regress0/parser/force_logic_set_logic.smt2
regress0/parser/force_logic_success.smt2
regress0/parser/issue5163.smt2
+ regress0/parser/issue6908-get-value-uc.smt2
regress0/parser/issue7274.smt2
regress0/parser/linear_arithmetic_err1.smt2
regress0/parser/linear_arithmetic_err2.smt2
diff --git a/test/regress/regress0/parser/issue6908-get-value-uc.smt2 b/test/regress/regress0/parser/issue6908-get-value-uc.smt2
new file mode 100644
index 000000000..b6825fe27
--- /dev/null
+++ b/test/regress/regress0/parser/issue6908-get-value-uc.smt2
@@ -0,0 +1,10 @@
+; COMMAND-LINE: --produce-models
+; EXPECT: sat
+; EXPECT: (((f (as @uc_Foo_0 Foo)) 3))
+(set-logic ALL)
+(set-option :produce-models true)
+(declare-sort Foo 0)
+(declare-fun f (Foo) Int)
+(assert (exists ((x Foo)) (= (f x) 3)))
+(check-sat)
+(get-value ((f @uc_Foo_0)))
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback