Documentation
¶
Overview ¶
Package gen produces random but valid ClassAd source text for differential fuzzing. Purely random bytes almost never parse as a ClassAd, so a grammar directed generator is what actually exercises the evaluators. Generation is deterministic given a seed, so any divergence the driver finds can be reproduced from its seed alone.
The generator deliberately avoids nondeterministic builtins (random, time, currentTime, ...) so that a divergence reflects an engine difference rather than wall-clock or RNG state. It also stays within types both engines can represent.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
MaxAttrs int // maximum number of top-level attributes
MaxDepth int // maximum expression nesting depth
MaxListLen int // maximum elements in a generated list
// AllowNonDeterministic, if set, permits time/random builtins. Off by
// default because they make differential results meaningless.
AllowNonDeterministic bool
}
Config bounds the shape of generated ClassAds.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig is a reasonable default for broad coverage.