Make seq.unit robust wrt subtyping (#8209)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Sat, 5 Mar 2022 19:43:43 +0000 (13:43 -0600)
committerGitHub <noreply@github.com>
Sat, 5 Mar 2022 19:43:43 +0000 (19:43 +0000)
commit3614f1c4b8a439ebf785894fa33640fd015aaefa
treec36b4b8e5884665133ddf4adfa48fd80489d70e8
parent7cf1b94025148115f4523150d169a9b3a6c75da9
Make seq.unit robust wrt subtyping (#8209)

Fixes cvc5/cvc5-projects#384.
Fixes cvc5/cvc5-projects#426.
Fixes cvc5/cvc5-projects#427.
Fixes cvc5/cvc5-projects#429.

Issue cvc5/cvc5-projects#423 still remains, to be addressed in a followup PR.

Also fixes issues with subtyping in how sequence constants are printed.

Note this solution is required since we are not ready to eliminate arithmetic subtyping in the short term. These changes will be unnecessary when this happens.
32 files changed:
src/CMakeLists.txt
src/api/cpp/cvc5.cpp
src/expr/node_manager_template.cpp
src/expr/node_manager_template.h
src/printer/smt2/smt2_printer.cpp
src/theory/quantifiers/sygus/sygus_grammar_cons.cpp
src/theory/rewriter.cpp
src/theory/sets/singleton_op.cpp
src/theory/sets/singleton_op.h
src/theory/sets/theory_sets_type_rules.cpp
src/theory/strings/array_core_solver.cpp
src/theory/strings/base_solver.cpp
src/theory/strings/core_solver.cpp
src/theory/strings/eager_solver.cpp
src/theory/strings/extf_solver.cpp
src/theory/strings/kinds
src/theory/strings/seq_unit_op.cpp [new file with mode: 0644]
src/theory/strings/seq_unit_op.h [new file with mode: 0644]
src/theory/strings/sequences_rewriter.cpp
src/theory/strings/theory_strings.cpp
src/theory/strings/theory_strings_preprocess.cpp
src/theory/strings/theory_strings_type_rules.cpp
src/theory/theory_model.cpp
test/regress/CMakeLists.txt
test/regress/regress0/seq/proj-issue384-2-subtypes.smt2 [new file with mode: 0644]
test/regress/regress0/seq/proj-issue384-subtypes.smt2 [new file with mode: 0644]
test/regress/regress0/seq/proj-issue427-subtypes-value.smt2 [new file with mode: 0644]
test/regress/regress0/seq/query0-subtype-skel.smt2 [new file with mode: 0644]
test/regress/regress0/seq/query1-subtype.smt2 [new file with mode: 0644]
test/regress/regress0/seq/query2-subtype.smt2 [new file with mode: 0644]
test/unit/api/cpp/solver_black.cpp
test/unit/theory/sequences_rewriter_white.cpp