diff options
author | ajreynol <andrew.j.reynolds@gmail.com> | 2017-07-12 08:35:03 -0500 |
---|---|---|
committer | ajreynol <andrew.j.reynolds@gmail.com> | 2017-07-12 08:50:58 -0500 |
commit | 360d6ee8d3cdd5ddb47c328043eaed3a107b8db1 (patch) | |
tree | 9e1fb4d128a62ca3e9152530dbfadb448ed49a45 /src/theory/sets | |
parent | d6d34604fa6d4c260edfc10a5b7f543540be75f4 (diff) |
Make type rules more strict for operators whose type rules involve subtypes. Disable support for subrange and predicate subtypes (which were only partially supported previously).
Diffstat (limited to 'src/theory/sets')
-rw-r--r-- | src/theory/sets/theory_sets_type_rules.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/theory/sets/theory_sets_type_rules.h b/src/theory/sets/theory_sets_type_rules.h index 1fd5f08be..23b185230 100644 --- a/src/theory/sets/theory_sets_type_rules.h +++ b/src/theory/sets/theory_sets_type_rules.h @@ -115,6 +115,21 @@ struct MemberTypeRule { throw TypeCheckingExceptionPrivate(n, "checking for membership in a non-set"); } TypeNode elementType = n[0].getType(check); + // TODO : still need to be flexible here due to situations like: + // + // T : (Set Int) + // S : (Set Real) + // (= (as T (Set Real)) S) + // (member 0.5 S) + // ...where (member 0.5 T) is inferred + // + // or + // + // S : (Set Real) + // (not (member 0.5 s)) + // (member 0.0 s) + // ...find model M where M( s ) = { 0 }, check model will generate (not (member 0.5 (singleton 0))) + // if(!elementType.isComparableTo(setType.getSetElementType())) { //if(!elementType.isSubtypeOf(setType.getSetElementType())) { //FIXME:typing std::stringstream ss; |