add gc2 support to random mutator

This commit is contained in:
Robby Findler 2012-02-20 15:28:08 -06:00
parent 3f5a45e904
commit 7109e92b04
2 changed files with 6 additions and 5 deletions

View File

@ -249,14 +249,14 @@
#:heap-values [heap-values (list 0 1 -1 'x 'y #f #t '())] #:heap-values [heap-values (list 0 1 -1 'x 'y #f #t '())]
#:iterations [iterations 200] #:iterations [iterations 200]
#:program-size [program-size 10] #:program-size [program-size 10]
#:heap-size [heap-size 200]) #:heap-size [heap-size 200]
#:gc2? [gc2? #f])
(call-with-output-file filename (call-with-output-file filename
(λ (port) (λ (port)
(cond (cond
[collector [collector
(fprintf port "#lang plai/mutator\n") (fprintf port "#lang plai/~amutator\n" (if gc2? "gc2/" ""))
(fprintf port "~s\n" `(allocator-setup ,collector ,heap-size)) (fprintf port "~s\n" `(allocator-setup ,collector ,heap-size))]
(fprintf port "~s\n" `(import-primitives symbol=?))]
[else [else
(fprintf port "#lang scheme\n") (fprintf port "#lang scheme\n")
(for-each (for-each

View File

@ -11,7 +11,8 @@
exact-positive-integer? exact-positive-integer?
#:heap-values (cons/c heap-value? (listof heap-value?)) #:heap-values (cons/c heap-value? (listof heap-value?))
#:program-size exact-positive-integer? #:program-size exact-positive-integer?
#:heap-size exact-positive-integer?) #:heap-size exact-positive-integer?
#:gc2? boolean?)
void?)] void?)]
[find-heap-values [find-heap-values
(-> (or/c path-string? input-port?) (-> (or/c path-string? input-port?)