Add Top and Bot to contradictory and complementary checks.
This commit is contained in:
parent
3313b820bb
commit
04fc5498c8
|
@ -23,6 +23,8 @@
|
||||||
(and (name-ref=? i1 i2) (subtype t1 t2))]
|
(and (name-ref=? i1 i2) (subtype t1 t2))]
|
||||||
[((NotTypeFilter: t2 p1 i2) (TypeFilter: t1 p1 i1))
|
[((NotTypeFilter: t2 p1 i2) (TypeFilter: t1 p1 i1))
|
||||||
(and (name-ref=? i1 i2) (subtype t1 t2))]
|
(and (name-ref=? i1 i2) (subtype t1 t2))]
|
||||||
|
[((Bot:) _) #t]
|
||||||
|
[(_ (Bot:)) #t]
|
||||||
[(_ _) #f]))
|
[(_ _) #f]))
|
||||||
|
|
||||||
;; complementary: Filter/c Filter/c -> boolean?
|
;; complementary: Filter/c Filter/c -> boolean?
|
||||||
|
@ -33,6 +35,7 @@
|
||||||
(and (name-ref=? i1 i2) (subtype t2 t1))]
|
(and (name-ref=? i1 i2) (subtype t2 t1))]
|
||||||
[((NotTypeFilter: t2 p1 i2) (TypeFilter: t1 p1 i1))
|
[((NotTypeFilter: t2 p1 i2) (TypeFilter: t1 p1 i1))
|
||||||
(and (name-ref=? i1 i2) (subtype t2 t1))]
|
(and (name-ref=? i1 i2) (subtype t2 t1))]
|
||||||
|
[((Top:) (Top:)) #t]
|
||||||
[(_ _) #f]))
|
[(_ _) #f]))
|
||||||
|
|
||||||
(define (name-ref=? a b)
|
(define (name-ref=? a b)
|
||||||
|
|
|
@ -53,6 +53,19 @@
|
||||||
(test-opposite #:not-complementary #:not-contradictory
|
(test-opposite #:not-complementary #:not-contradictory
|
||||||
(-not-filter -Symbol 0)
|
(-not-filter -Symbol 0)
|
||||||
(-filter -String 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"
|
(test-suite "Implied Atomic"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user