fuzzing

package
v0.3.6-0...-405f123 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultMutator

type DefaultMutator struct {
}

func NewDefaultMutator

func NewDefaultMutator() *DefaultMutator

func (*DefaultMutator) Mutate

type FuzzStrategy

type FuzzStrategy struct {
	*types.BaseService
	// contains filtered or unexported fields
}

Main idea - the input is a sequence of actions. An action can be one of - Deliver to Process p, Drop to process p Generate a random input and use quick mutations to improve coverage

func NewFuzzStrategy

func NewFuzzStrategy(config *FuzzStrategyConfig) *FuzzStrategy

func (*FuzzStrategy) ActionsCh

func (f *FuzzStrategy) ActionsCh() *types.Channel[*strategies.Action]

func (*FuzzStrategy) EndCurIteration

func (f *FuzzStrategy) EndCurIteration(ctx *strategies.Context)

func (*FuzzStrategy) Finalize

func (f *FuzzStrategy) Finalize(ctx *strategies.Context)

func (*FuzzStrategy) NextIteration

func (f *FuzzStrategy) NextIteration(ctx *strategies.Context)

func (*FuzzStrategy) Start

func (f *FuzzStrategy) Start() error

func (*FuzzStrategy) Step

func (f *FuzzStrategy) Step(e *types.Event, ctx *strategies.Context)

func (*FuzzStrategy) Stop

func (f *FuzzStrategy) Stop() error

type FuzzStrategyConfig

type FuzzStrategyConfig struct {
	Mutator           Mutator
	Guider            Guider
	TickDuration      time.Duration
	Steps             int
	Seed              rand.Source
	InitialPopulation int
	MutationsPerTrace int
}

type Guider

type Guider interface {
	HaveNewState(*types.List[*SchedulingChoice], *types.List[*types.Event]) bool
	Reset()
}

type Mutator

type Mutator interface {
	Mutate(*types.List[*SchedulingChoice], *types.List[*types.Event]) (*types.List[*SchedulingChoice], bool)
}

type ScheduleChoiceType

type ScheduleChoiceType string
var (
	ScheduleProcess ScheduleChoiceType = "Process"
	BooleanNonDet   ScheduleChoiceType = "Boolean"
	IntegerNonDet   ScheduleChoiceType = "Integer"
)

type SchedulingChoice

type SchedulingChoice struct {
	Type    ScheduleChoiceType
	Process types.ReplicaID
	Bool    bool
	Integer int
}

type SwapNodesMutator

type SwapNodesMutator struct {
	NumSwaps int
	// contains filtered or unexported fields
}

func NewSwapNodeMutator

func NewSwapNodeMutator(numSwaps int) *SwapNodesMutator

func (*SwapNodesMutator) Mutate

type TLCGuider

type TLCGuider struct {
	// contains filtered or unexported fields
}

func NewTLCGuider

func NewTLCGuider(tlcAddr string) *TLCGuider

func (*TLCGuider) HaveNewState

func (t *TLCGuider) HaveNewState(trace *types.List[*SchedulingChoice], eventTrace *types.List[*types.Event]) bool

func (*TLCGuider) Reset

func (t *TLCGuider) Reset()

type Trace

type Trace struct {
	*types.List[*SchedulingChoice]
}

func NewTrace

func NewTrace() *Trace

func (*Trace) Hash

func (t *Trace) Hash() string

func (*Trace) Reset

func (t *Trace) Reset()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL