gazprea-fuzzer-python/ast_generator/test/config.yaml
ayrton 9f915bd80e Fixed conditionals rarely evaluating
Added the setting in the yaml for truthiness, and added a timeout error to the code generation.

Need to fix the generation error that prevents a large amount of code from being generated...

Took 1 hour 47 minutes
2023-11-25 11:40:46 -07:00

98 lines
2.9 KiB
YAML

# The default configuration for the Gazprea Fuzzer
---
generation-options:
max-nesting-depth: 5 # maximum nesting depth for statements
max-conditionals-loops: 5 # maximum number of loops/conditionals per routine
max-number-of-routines: 5 # maximum number of routines (main will always be generated)
generate-dead-code: True # generate dead code
max-loop-iterations: 100 # maximum number of iterations in a loop
max-globals: 5 # maximum number of global variables
properties:
max-range-length: 5 # maximum length of ranges, vectors and tuples, (AxA matrices can exist)
use-english-words: True # use english words instead of random names (if we run out, we switch to random)
id-length: # length of identifiers
min: 1
max: 5
function-name-length: # length of function names
min: 1
max: 10
number-of-arguments: # number of arguments to a routine
min: 1
max: 10
generate-max-int: False # if False, generate integers between [-1000, 1000] else
expression-weights: # weights for expressions
# the higher a weight, the more likely (0, 10000), 0 to exclude, 10000 for only that
brackets: 10
arithmetic:
addition: 80
subtraction: 80
multiplication: 30
division: 10
modulo: 10
power: 5
comparison:
equality: 50
inequality: 50
less-than: 30
greater-than: 30
less-than-or-equal: 10
greater-than-or-equal: 10
logical:
and: 50
or: 50
xor: 10
vector-or-string:
generator: 20
range: 30
filter: 10
reverse: 10
concatenation: 50
unary:
noop: 10
negation: 20
not: 10
statement-weights: # set to 0 for any statements you wish to exclude
variable-declaration: 50
routine-call: 20
conditional: 30
loop: 20
assignment: 40
out-stream: 20
in-stream: 5
type-weights:
atomic-types:
int: 50 # TODO change these to the gaz types
float: 50
bool: 50
char: 50
void: 0 # TODO add support for void
composite-types:
vector: 20
tuple: 5
matrix: 10
string: 10
composite: 0 #TODO add support for composite types
atomic: 40
routine-weights:
procedure: 20
function: 50
misc-weights:
type-qualifier-weights:
const: 10
var: 60
truthiness: 0.9 # Probability of conditionals being true
block-termination-probability: 0.2 # probability for a block to terminate