Skip to content

Commit

Permalink
Merge pull request #20 from cmsc430/crook
Browse files Browse the repository at this point in the history
crook
  • Loading branch information
dvanhorn authored Dec 2, 2024
2 parents 7b4a99b + 298be8d commit 23b9110
Show file tree
Hide file tree
Showing 14 changed files with 149 additions and 10 deletions.
11 changes: 11 additions & 0 deletions abscond/correct.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#lang racket
(provide check-compiler)
(require rackunit)
(require "interp.rkt")
(require "exec.rkt")

;; Expr -> Void
(define (check-compiler e)
(check-equal? (interp e)
(exec e)))

11 changes: 11 additions & 0 deletions blackmail/correct.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#lang racket
(provide check-compiler)
(require rackunit)
(require "interp.rkt")
(require "exec.rkt")

;; Expr -> Void
(define (check-compiler e)
(check-equal? (interp e)
(exec e)))

11 changes: 11 additions & 0 deletions con/correct.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#lang racket
(provide check-compiler)
(require rackunit)
(require "interp.rkt")
(require "exec.rkt")

;; Expr -> Void
(define (check-compiler e)
(check-equal? (interp e)
(exec e)))

13 changes: 13 additions & 0 deletions dodger/correct.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#lang racket
(provide check-compiler)
(require rackunit)
(require "interp.rkt")
(require "exec.rkt")

;; Expr -> Void
(define (check-compiler e)
(let ((r (with-handlers ([exn:fail? identity])
(interp e))))
(unless (exn? r)
(check-equal? r (exec e)))))

21 changes: 11 additions & 10 deletions dupe/correct.rkt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#lang racket
(provide (all-defined-out))
(require rackunit
"interp.rkt"
"compile.rkt"
"types.rkt"
a86/interp)
(provide check-compiler)
(require rackunit)
(require "interp.rkt")
(require "exec.rkt")

;; Expr -> Void
(define (check-compiler e)
(let ((r (with-handlers ([exn:fail? identity])
(interp e))))
(unless (exn? r)
(check-equal? r (exec e)))))

(define (check-correctness e)
(with-handlers ([exn:fail? void])
(check-eqv? (interp e)
(bits->value (asm-interp (compile e))))))
12 changes: 12 additions & 0 deletions evildoer/correct.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#lang racket
(provide check-compiler)
(require rackunit)
(require "interp-io.rkt")
(require "exec-io.rkt")
;; Expr String -> Void
(define (check-compiler e i)
(let ((r (with-handlers ([exn:fail? identity])
(interp/io e i))))
(unless (exn? r)
(check-equal? r (exec/io e i)))))

10 changes: 10 additions & 0 deletions extort/correct.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#lang racket
(provide check-compiler)
(require rackunit)
(require "interp-io.rkt")
(require "exec-io.rkt")
;; Expr String -> Void
(define (check-compiler e i)
(check-equal? (interp/io e i)
(exec/io e i)))

10 changes: 10 additions & 0 deletions fraud/correct.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#lang racket
(provide check-compiler)
(require rackunit)
(require "interp-io.rkt")
(require "exec-io.rkt")
;; ClosedExpr String -> Void
(define (check-compiler e i)
(check-equal? (interp/io e i)
(exec/io e i)))

10 changes: 10 additions & 0 deletions hoax/correct.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#lang racket
(provide check-compiler)
(require rackunit)
(require "interp-io.rkt")
(require "exec-io.rkt")
;; ClosedExpr String -> Void
(define (check-compiler e i)
(check-equal? (interp/io e i)
(exec/io e i)))

10 changes: 10 additions & 0 deletions hustle/correct.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#lang racket
(provide check-compiler)
(require rackunit)
(require "interp-io.rkt")
(require "exec-io.rkt")
;; ClosedExpr String -> Void
(define (check-compiler e i)
(check-equal? (interp/io e i)
(exec/io e i)))

10 changes: 10 additions & 0 deletions iniquity/correct.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#lang racket
(provide check-compiler)
(require rackunit)
(require "interp-io.rkt")
(require "exec-io.rkt")
;; ClosedExpr String -> Void
(define (check-compiler e i)
(check-equal? (interp/io e i)
(exec/io e i)))

10 changes: 10 additions & 0 deletions jig/correct.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#lang racket
(provide check-compiler)
(require rackunit)
(require "interp-io.rkt")
(require "exec-io.rkt")
;; ClosedExpr String -> Void
(define (check-compiler e i)
(check-equal? (interp/io e i)
(exec/io e i)))

10 changes: 10 additions & 0 deletions knock/correct.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#lang racket
(provide check-compiler)
(require rackunit)
(require "interp-io.rkt")
(require "exec-io.rkt")
;; ClosedExpr String -> Void
(define (check-compiler e i)
(check-equal? (interp/io e i)
(exec/io e i)))

10 changes: 10 additions & 0 deletions loot/correct.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#lang racket
(provide check-compiler)
(require rackunit)
(require "interp-io.rkt")
(require "exec-io.rkt")
;; ClosedExpr String -> Void
(define (check-compiler e i)
(check-equal? (interp/io e i)
(exec/io e i)))

0 comments on commit 23b9110

Please sign in to comment.