summaryrefslogtreecommitdiff
path: root/src/theory/sets
diff options
context:
space:
mode:
authorajreynol <andrew.j.reynolds@gmail.com>2017-07-12 08:35:03 -0500
committerajreynol <andrew.j.reynolds@gmail.com>2017-07-12 08:50:58 -0500
commit360d6ee8d3cdd5ddb47c328043eaed3a107b8db1 (patch)
tree9e1fb4d128a62ca3e9152530dbfadb448ed49a45 /src/theory/sets
parentd6d34604fa6d4c260edfc10a5b7f543540be75f4 (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.h15
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;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback