-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from cmsc430/crook
crook
- Loading branch information
Showing
14 changed files
with
149 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | ||
|