Fix computation of whether a type is finite (#6312)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Mon, 12 Apr 2021 21:55:44 +0000 (16:55 -0500)
committerGitHub <noreply@github.com>
Mon, 12 Apr 2021 21:55:44 +0000 (21:55 +0000)
commit76f495646c0e3a95f2474c5d746bc61ece18f89f
tree5390007f4be229dfb18e641f34b9d9df6a9dea92
parentaf398235ef9f3a909991fddbb71d43434d6cf3a1
Fix computation of whether a type is finite (#6312)

This PR generalizes TypeNode::isFinite / TypeNode::isInterpretedFinite with TypeNode::getCardinalityClass. It then uses this method to fix our computation of when a type should be treated as finite.

Fixes #4260, fixes #6100 (that benchmark now says unknown without an error).
31 files changed:
src/api/cpp/cvc5.cpp
src/expr/dtype.cpp
src/expr/dtype.h
src/expr/dtype_cons.cpp
src/expr/dtype_cons.h
src/expr/type_node.cpp
src/expr/type_node.h
src/theory/datatypes/sygus_extension.cpp
src/theory/datatypes/theory_datatypes.cpp
src/theory/datatypes/type_enumerator.cpp
src/theory/datatypes/type_enumerator.h
src/theory/quantifiers/fmf/bounded_integers.cpp
src/theory/quantifiers/fmf/model_engine.cpp
src/theory/quantifiers/quant_bound_inference.cpp
src/theory/quantifiers/quant_split.cpp
src/theory/quantifiers/sygus/sygus_enumerator.cpp
src/theory/sep/theory_sep.cpp
src/theory/sets/cardinality_extension.cpp
src/theory/strings/base_solver.cpp
src/theory/term_registration_visitor.cpp
src/theory/theory_engine.cpp
src/theory/theory_engine.h
src/theory/theory_model_builder.cpp
src/theory/theory_model_builder.h
src/theory/theory_state.cpp
src/theory/theory_state.h
src/theory/uf/ho_extension.cpp
src/theory/valuation.cpp
src/theory/valuation.h
src/util/CMakeLists.txt
test/regress/regress0/fmf/issue4260-arrays-card-one.smt2 [new file with mode: 0644]