From 5a49e3034c6c387d5cbe2e549d1afa22b5a896a6 Mon Sep 17 00:00:00 2001 From: Aria Shrimpton Date: Wed, 7 Feb 2024 20:19:47 +0000 Subject: deal with more variables in racket specs --- src/racket_specs/container-setup.rkt | 4 ++-- src/racket_specs/indexable-setup.rkt | 4 ++-- src/racket_specs/mapping-setup.rkt | 2 +- src/racket_specs/stack-setup.rkt | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/racket_specs/container-setup.rkt b/src/racket_specs/container-setup.rkt index 0d5cd79..38e01c8 100644 --- a/src/racket_specs/container-setup.rkt +++ b/src/racket_specs/container-setup.rkt @@ -35,7 +35,7 @@ (define (check-not-contradict prop pre xs) (assert (and (prop xs) (pre xs) (> (length xs) 1)))) -(define (check prop pres specs xs x) +(define (check prop pres specs xs x . rest) (cond [(or (unsat? (solve (check-not-contradict prop (first pres) xs))) (unsat? (solve (check-not-contradict prop (second pres) xs))) @@ -52,4 +52,4 @@ (unsat? (verify (check-spec-remove prop (sixth pres) (sixth specs) xs x))) )])) -(provide check) \ No newline at end of file +(provide check) diff --git a/src/racket_specs/indexable-setup.rkt b/src/racket_specs/indexable-setup.rkt index ddd6239..913544f 100644 --- a/src/racket_specs/indexable-setup.rkt +++ b/src/racket_specs/indexable-setup.rkt @@ -17,7 +17,7 @@ (assert (prop (car (spec xs n))))) -(define (check prop pres specs xs n) +(define (check prop pres specs xs n . rest) (cond [(or (unsat? (solve (check-not-contradict prop (first pres) xs))) (unsat? (solve (check-not-contradict prop (second pres) xs))) @@ -28,4 +28,4 @@ (unsat? (verify (check-spec-nth prop (third pres) (third specs) xs n))) )])) -(provide check) \ No newline at end of file +(provide check) diff --git a/src/racket_specs/mapping-setup.rkt b/src/racket_specs/mapping-setup.rkt index 6b6fc48..03f010b 100644 --- a/src/racket_specs/mapping-setup.rkt +++ b/src/racket_specs/mapping-setup.rkt @@ -27,7 +27,7 @@ (define (check-not-contradict prop pre xs) (assert (and (prop xs) (pre xs) (> (length xs) 1)))) -(define (check prop pres specs xs k v) +(define (check prop pres specs xs k v . rest) (cond [(or (unsat? (solve (check-not-contradict prop (first pres) xs))) (unsat? (solve (check-not-contradict prop (second pres) xs))) diff --git a/src/racket_specs/stack-setup.rkt b/src/racket_specs/stack-setup.rkt index 336cf8d..e676bf8 100644 --- a/src/racket_specs/stack-setup.rkt +++ b/src/racket_specs/stack-setup.rkt @@ -4,7 +4,7 @@ (assume (and ((first pres) xs) ((second pres) xs))) (assert (prop xs))) -(define (check prop pres specs xs x) +(define (check prop pres specs xs x . rest) (unsat? (verify (check-push-pop prop pres xs)))) -(provide check) \ No newline at end of file +(provide check) -- cgit v1.2.3