www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit b7c2babf85ad636ff5b73c50a4e4bc953788ab11
parent 64d1756678c158c16345574cb1407672f2e28d17
Author: Georges Dupéron <georges.duperon@gmail.com>
Date:   Tue, 10 Jan 2017 23:02:17 +0100

Preliminary tests to compare stronger and weaker sets of predicates (for now just super/sub-set)

Diffstat:
Minvariants-phantom.hl.rkt | 27++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/invariants-phantom.hl.rkt b/invariants-phantom.hl.rkt @@ -363,6 +363,14 @@ relates two nodes in the graph. @subsection{Putting it all together} +@chunk[<check-a-stronger-b> + (define-syntax (check-a-stronger-or-same-b stx) + (syntax-case stx () + [(_ stronger weaker) + (syntax/top-loc stx + (check-ann (ann witness-value stronger) + weaker))]))] + @chunk[<*> (require (for-syntax phc-toolkit)) @@ -371,8 +379,17 @@ relates two nodes in the graph. <comparison-operators> <≡> - (code:comment "Tests:") - (ann witness-value (Invariants)) ;; No invariants - (ann witness-value (Invariants (≡ (a) (a b c)))) ;; No invariants - - (void)] + (module+ test + (require phc-toolkit) + <check-a-stronger-b> + + (ann witness-value (Invariants)) ;; No invariants + (ann witness-value (Invariants (≡ (a) (a b c)))) + + (check-a-stronger-or-same-b (Invariants (≡ (a) (a b c))) + (Invariants)) + + (check-a-stronger-or-same-b (Invariants (≡ (a) (a b c)) (≡ (a) (a b d))) + (Invariants (≡ (a) (a b c)))) + (check-a-stronger-or-same-b (Invariants (≡ (a) (a b d)) (≡ (a) (a b c))) + (Invariants (≡ (a) (a b c)))))]