add gc2 support to random mutator
This commit is contained in:
parent
3f5a45e904
commit
7109e92b04
|
@ -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
|
||||||
|
|
|
@ -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?)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user