Fix issue in datatypes care graph computation involving subtyping (#8125)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Wed, 23 Feb 2022 03:12:06 +0000 (21:12 -0600)
committerGitHub <noreply@github.com>
Wed, 23 Feb 2022 03:12:06 +0000 (03:12 +0000)
commitf039c2a0eaf7ce44af9e8b8df64960cf0c409478
tree01e2f7b5ca23656d1bebf9f03187ffe3b46c27d6
parent33fab4e47b9f5cc7dae76a30d7850a82bf8290d7
Fix issue in datatypes care graph computation involving subtyping (#8125)

The datatypes care graph was incorrectly computed for constructors taking `Real` arguments, due to subtyping.

This fixes the term index to cache on the *return* type for constructors, not the argument types.  Caching based on argument types was incorrect even for non-parametric datatypes with arguments that have subtyping.

Fixes https://github.com/cvc5/cvc5/issues/8124.

This also does minor cleanup and additions done while debugging the issue.
src/printer/ast/ast_printer.cpp
src/theory/datatypes/theory_datatypes.cpp
test/regress/CMakeLists.txt
test/regress/regress1/datatypes/issue8124-real-int-cg.smt2 [new file with mode: 0644]