Add Top and Bot to contradictory and complementary checks.

original commit: 04fc5498c85bc36bbaf0ab0bcae947560cd60968
This commit is contained in:
Eric Dobson 2014-03-12 21:53:55 -07:00
parent 08b2e5c7f9
commit 4012a728f4
2 changed files with 16 additions and 0 deletions

View File

@ -23,6 +23,8 @@
(and (name-ref=? i1 i2) (subtype t1 t2))]
[((NotTypeFilter: t2 p1 i2) (TypeFilter: t1 p1 i1))
(and (name-ref=? i1 i2) (subtype t1 t2))]
[((Bot:) _) #t]
[(_ (Bot:)) #t]
[(_ _) #f]))
;; complementary: Filter/c Filter/c -> boolean?
@ -33,6 +35,7 @@
(and (name-ref=? i1 i2) (subtype t2 t1))]
[((NotTypeFilter: t2 p1 i2) (TypeFilter: t1 p1 i1))
(and (name-ref=? i1 i2) (subtype t2 t1))]
[((Top:) (Top:)) #t]
[(_ _) #f]))
(define (name-ref=? a b)

View File

@ -53,6 +53,19 @@
(test-opposite #:not-complementary #:not-contradictory
(-not-filter -Symbol 0)
(-filter -String 0))
(test-opposite #:not-complementary #:contradictory
-bot
-bot)
(test-opposite #:not-complementary #:contradictory
-bot
-top)
(test-opposite #:complementary #:not-contradictory
-top
-top)
)
(test-suite "Implied Atomic"