Documentation ¶
Index ¶
- func List() []string
- func NewAllPermutations(root token.Token, r rand.Rand) (chan struct{}, error)
- func NewAlmostAllPermutations(root token.Token, r rand.Rand) (chan struct{}, error)
- func NewPermuteOptionals(root token.Token, r rand.Rand) (chan struct{}, error)
- func NewRandom(root token.Token, r rand.Rand) (chan struct{}, error)
- func Register(name string, strat Strategy)
- type Error
- type ErrorType
- type Strategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAllPermutations ¶
NewAllPermutations implements a fuzzing strategy that generates all possible permutations of a token graph. Every iteration of the strategy generates a new permutation. The generation is deterministic. Since this strategy really produces every possible permutation of a token graph, it is advised to only use the strategy on graphs with few states since the state explosion problem manifests itself quite fast.
func NewAlmostAllPermutations ¶
NewAlmostAllPermutations implements a fuzzing strategy that generates "almost" all possible permutations of a token graph. Every iteration of the strategy generates a new permutation. The generation is deterministic. This strategy does not cover all repititional permutations which can be helpful when less permutations are needed but a almost complete permutation coverage is still needed. For example the definition +2(?(1)?(2)) does not result in 16 permutations but instead it results in only 7.
func NewPermuteOptionals ¶
NewPermuteOptionals implements a fuzzing strategy that generates permutations of only optional tokens of a token graph. Every iteration of the strategy generates a new permutation. The generation is deterministic. This strategy searches the graph for tokens who implement the OptionalToken interface and permutates over them by deactivating or activating them. The permutations always start from the deactivated states so that minimum data is generated first.
func NewRandom ¶
NewRandom implements a fuzzing strategy that generates a random permutation of a token graph. The strategy does exactly one iteration which permutates at random all reachable tokens in the graph. The determinism is dependent on the random generator and is therefore for example deterministic if a seed for the random generator produces always the same outputs.
Types ¶
type Strategy ¶
Strategy defines a fuzzing strategy. The function starts the first iteration of the fuzzing strategy returning a channel which controls the iteration flow. The channel returns a value if the iteration is complete and waits with calculating the next iteration until a value is put in. The channel is automatically closed when there are no more iterations. The error return argument is not nil if an error occurs during the setup of the fuzzing strategy.