google / google/xls

Extend fuzzer to mutate existing examples

Open
#299 0 comments 0 reactions 0 assignees View on GitHub
fuzz
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

Currently the fuzzer just builds examples from scratch. This results in a program distribution that is different than might appear in human written programs generally with less structure. For a more representative distribution, the fuzzer could also take existing examples and mutate them.

Possible interesting mutations:
* replace random uses in the graph with literals or new parameters
* Randomly rewire the graph by redirecting a use to a new source of the same type. Have to be careful that cycles aren't introduced.
* Randomly change opcodes with compatible types and operand types.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.