adjust plot so that it uses "rvm" for the verification model

This commit is contained in:
Robby Findler 2014-03-25 14:52:43 -05:00
parent 0b852ed312
commit 16d8f6c3ba

View File

@ -74,10 +74,10 @@
30 2.042)) 30 2.042))
(define (bug-file? f) (define (bug-file? f)
(define m (regexp-match #rx"^.*/(.*-[0-9]\\.rkt)$" (define m (regexp-match #rx"^.*/(.*-[0-9]\\.rkt)$"
(path->string f))) (path->string f)))
(and m (and m
(second m))) (second m)))
(define (all-bug-files) (define (all-bug-files)
(sort (sort
@ -123,8 +123,11 @@
(define name-avgs (make-hash)) (define name-avgs (make-hash))
(define (rewrite-name n)
(regexp-replace #rx"verification-" n "rvm-"))
(for ([b (in-list (all-bug-files))]) (for ([b (in-list (all-bug-files))])
(hash-set! name-avgs b '())) (hash-set! name-avgs (rewrite-name b) '()))
(define data-stats (define data-stats
(let loop ([d data] (let loop ([d data]
@ -140,7 +143,7 @@
(for/list ([(name/type times) (in-hash sorted-times)] (for/list ([(name/type times) (in-hash sorted-times)]
#:unless (and ((length times) . < . (min-trials)) #:unless (and ((length times) . < . (min-trials))
(not (equal? (cdr name/type) 'ordered)))) (not (equal? (cdr name/type) 'ordered))))
(define name (last (regexp-split #rx"/" (car name/type)))) (define name (rewrite-name (last (regexp-split #rx"/" (car name/type)))))
(cond (cond
[(equal? (cdr name/type) (order-by)) [(equal? (cdr name/type) (order-by))
(hash-set! name-avgs name (mean times))] (hash-set! name-avgs name (mean times))]
@ -190,7 +193,7 @@
(define (plot-type type n) (define (plot-type type n)
(define this-type (define this-type
(map (λ (d) (map (λ (d)
(define name (last (regexp-split #rx"/" (car d)))) (define name (rewrite-name (last (regexp-split #rx"/" (car d)))))
(cons name (cdr d))) (cons name (cdr d)))
(filter (filter
(λ (l) (λ (l)
@ -198,16 +201,16 @@
(list-ref l 2))) (list-ref l 2)))
data-stats))) data-stats)))
(define ps (define ps
(points (points
(map (map
(λ (l) (λ (l)
(list (get-name-num (list-ref l 0) n) (list-ref l 2))) (list (get-name-num (list-ref l 0) n) (list-ref l 2)))
this-type) this-type)
#:label (string-append (hash-ref type-names type) #:label (string-append (hash-ref type-names type)
(format " (~s successes)" (length this-type))) (format " (~s successes)" (length this-type)))
#:sym (hash-ref type-symbols type) #:sym (hash-ref type-symbols type)
#:size (* (point-size) 1.5) #:size (* (point-size) 1.5)
#:color (add1 n))) #:color (add1 n)))
(if (equal? type 'ordered) (if (equal? type 'ordered)
ps ps
(list (error-bars (list (error-bars