Skip to content

Commit

Permalink
Fix synthax tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
emina committed Mar 4, 2021
1 parent 46d44cf commit 59079bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions test/query/grammar.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,11 @@
(define (verified-equal? vars impl spec)
(or (equal? impl spec)
(begin
(match-define `(,_ ... (define ,impl-h ,_ ...)) impl)
(match-define `(,_ ... (define ,spec-h ,_ ...)) spec)
(define consts
(append (map term->datum vars)
(make-list (- (length impl-h) (length vars) 1) #f)))
(define body `(let ([impl (lambda ,(cdr impl-h) ,@impl ,impl-h)]
(make-list (- (length spec-h) (length vars) 1) #f)))
(define body `(let ([impl (lambda ,(cdr spec-h) ,@impl ,spec-h)]
[spec (lambda ,(cdr spec-h) ,@spec ,spec-h)])
(unsat?
(verify
Expand Down
5 changes: 2 additions & 3 deletions test/query/synthax.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@
(define (verified-equal? vars impl spec)
(or (equal? impl spec)
(begin
(match-define `(,_ ... (define ,impl-h ,_ ...)) impl)
(match-define `(,_ ... (define ,spec-h ,_ ...)) spec)
(define consts (map term->datum vars))
(define body `(let ([impl (lambda ,(cdr impl-h) ,@impl ,impl-h)]
(define consts (take (map term->datum vars) (sub1 (length spec-h))))
(define body `(let ([impl (lambda ,(cdr spec-h) ,@impl ,spec-h)]
[spec (lambda ,(cdr spec-h) ,@spec ,spec-h)])
(unsat?
(verify
Expand Down

0 comments on commit 59079bb

Please sign in to comment.