[plt-dev] Programmatic running of student programs

From: Eli Barzilay (eli at barzilay.org)
Date: Fri May 15 10:03:38 EDT 2009

On May 14, David Van Horn wrote:
> Eli Barzilay wrote:
> > ... the real answer to this thread is the sandbox library.
> 
> So I can write this:
> 
> (require scheme/sandbox)
> (define ev
>    (call-with-input-file "some-isl-prog.scm"
>      (lambda (p)
>        (make-module-evaluator p
>                               #:language
>                               '(lib "htdp-intermediate.ss" "lang")
>                               #:allow-read empty))))

You'll want to use '(special intermediate) for the language.


> But how do I get the test results, values produced, etc?

To get values you use run stuff through the resulting evaluator.
Getting test results is not possible as far as I know.  There might be
some way to get the printout, but I don't remember how to do that too.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the dev mailing list.