Created
September 22, 2011 00:27
-
-
Save lkuper/1233728 to your computer and use it in GitHub Desktop.
Stuff ignored by the C311 autograder, circa 2010
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
;; Load the assignment we're testing | |
(load input-filename | |
(lambda (x) | |
(pmatch x | |
;; Ignore any (load ___) expressions that might happen | |
;; to be in the assignment. | |
[(load ,anything) (void)] | |
;; Ignore tests they've written themselves | |
[(test . ,anything) (void)] | |
[(multi-test . ,anything) (void)] | |
[(display . ,anything) (void)] | |
[(printf . ,anything) (void)] | |
;; Strip out potentially malicious system calls | |
[(system ,anything) (void)] | |
;; Strip out macros | |
[(define-syntax ,anything) (void)] | |
;; TODO: is there anything else we shouldn't be | |
;; eval'ing? | |
[,otherwise (eval x)]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment