· #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line...

15
Crowdsourced Conformance Testing via Remote Sandboxing Joe Gibbs Politz

Transcript of  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line...

Page 1:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”

Crowdsourced Conformance

Testing via Remote

Sandboxing

Joe Gibbs Politz

Page 2:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”
Page 3:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”

http://www.batchgeo.com

Page 4:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”

“Remote Sandboxing?”

Page 5:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”

1600 times?

grade.rktStudents' interpreters

Page 6:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”

Students' interpreters grade.rkt

Page 7:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”

#lang racket/base

(require 'interp.rkt')

(command-line“--test” test-dir(run-tests interp test-dir))

Page 8:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”

#lang racket/base

(require 'interp.rkt')

(command-line“--test” test-dir(run-tests interp test-dir) “--report”(sign (run-tests interp our-tests) “sooper-seekret”))

Page 9:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”

#lang racket/base

(define interp (dynamic-require “interp.rkt” 'interp))

(command-line“--test” test-dir(run-tests interp test-dir) “--report”(sign (run-tests interp our-tests) “sooper-seekret”))

Page 10:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”

000101010001010111000111010111

000101010001010111000111010111

000101010001010111000111010111

000101010001010111000111010111

Students' interpreters grade.bin

Remote Sandboxing

Page 11:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”

“Crowdsouced Conformance Testing”?

Page 12:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”

correct-interp

for-update-after-test

plus-coerces-strings

arity-before-evaluate

.

.

.

• tests/• loop-tests/

• for-test1.psl• for-test2.psl

• operator-tests/• subtract-test1.psl• subtract-test2.psl• add-test1.psl

• function-tests/• apply1.psl• apply2.psl• closure1.psl• closure2.psl

discard-if-effects

✓✓✓

ParselTongue Testing Assignment

Page 13:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”
Page 14:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”

> 10,000 tests from 250 people

That's as many tests as JavaScript'sconformance suite.

Crowdsourced Conformance Testing

Page 15:  · #lang racket/base (define interp (dynamic-require “interp.rkt” 'interp)) (command-line “--test” test-dir (run-tests interp test-dir) “--report”

Lessons

● Racket's dynamic code support is awesome, and Racket's build tools for distribution just work

● Value proposition for teaching PL online – get crowdsourced tools and tests