Remove unhandled subtypes (#1098)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Thu, 14 Sep 2017 19:12:22 +0000 (14:12 -0500)
committerGitHub <noreply@github.com>
Thu, 14 Sep 2017 19:12:22 +0000 (14:12 -0500)
commitab2924e8a6cc34f29167b1ff50273d59dd7a6707
treed9902a389ae70a21f2d5a3f7acde2ce658fb534d
parente4fc6c7b57668f18ce087c45e001c101375c20ea
Remove unhandled subtypes (#1098)

* Remove unhandled subtypes, which consequently makes typing rules uniformly stricter based on weakening the subtype relation. Ensure coercions in the smt2 and cvc parser for Real decimal constants whose type is Integer. Ensure type annotations are computed during preRewrite to ensure rewriting (which does not preserve types) does not impact term construction for parametric datatypes. This fixes issue #1048 (we now give an type exception).

* Update unit test for parametric datatypes to reflect new subtyping relation.

* Remove deprecated test.

* Make array construction for lambdas work with new subtype relations to handle lambdas like (lambda ((x Int) (y Int)) (ite (= x 0) 0.5 0.0)).
16 files changed:
src/expr/type_node.cpp
src/parser/cvc/Cvc.g
src/parser/smt2/Smt2.g
src/theory/builtin/theory_builtin_rewriter.cpp
src/theory/builtin/theory_builtin_rewriter.h
src/theory/datatypes/datatypes_rewriter.h
src/theory/datatypes/theory_datatypes_type_rules.h
test/regress/regress0/Makefile.am
test/regress/regress0/datatypes/tuple-no-clash.cvc
test/regress/regress0/issue1048-arrays-int-real.smt2 [new file with mode: 0644]
test/regress/regress0/quantifiers/Makefile.am
test/regress/regress0/quantifiers/macro-subtype-param.smt2
test/regress/regress0/quantifiers/subtype-param-unk.smt2
test/regress/regress0/quantifiers/subtype-param.smt2
test/regress/regress0/sets/sets-tuple-poly.cvc
test/unit/util/datatype_black.h