Documentation ¶
Index ¶
- func Exit()
- func Finish()
- func Start(fn func())
- func TIDGenerator() func() TID
- type IncreasingDepth
- type IncreasingTID
- type TID
- type Tester
- func (t *Tester) Explore() (int, error)
- func (t *Tester) ExploreFor(d time.Duration) (int, error)
- func (t *Tester) ExploreN(n int) (int, error)
- func (t *Tester) MutexLock(m *sync.Mutex)
- func (t *Tester) MutexUnlock(m *sync.Mutex)
- func (t *Tester) RWMutexLock(rw *sync.RWMutex)
- func (t *Tester) RWMutexRLock(rw *sync.RWMutex)
- func (t *Tester) RWMutexRUnlock(rw *sync.RWMutex)
- func (t *Tester) RWMutexUnlock(rw *sync.RWMutex)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exit ¶
func Exit()
Exit implements the logic related to modeling and scheduling thread termination.
func Start ¶
func Start(fn func())
Start implements the logic related to modeling and scheduling an execution of "go fn()".
func TIDGenerator ¶
func TIDGenerator() func() TID
TIDGenerator is used for generating unique thread identifiers.
Types ¶
type IncreasingDepth ¶
type IncreasingDepth []*state
IncreasingDepth is used to sort states in the increasing order of their depth.
func (IncreasingDepth) Len ¶
func (states IncreasingDepth) Len() int
func (IncreasingDepth) Less ¶
func (states IncreasingDepth) Less(i, j int) bool
func (IncreasingDepth) Swap ¶
func (states IncreasingDepth) Swap(i, j int)
type IncreasingTID ¶
type IncreasingTID []TID
Increasing is used to sort thread identifiers in an increasing order.
func (IncreasingTID) Len ¶
func (tids IncreasingTID) Len() int
func (IncreasingTID) Less ¶
func (tids IncreasingTID) Less(i, j int) bool
func (IncreasingTID) Swap ¶
func (tids IncreasingTID) Swap(i, j int)
type Tester ¶
type Tester struct {
// contains filtered or unexported fields
}
Tester represents an instance of the systematic test.
func Init ¶
func Init(setup, body, cleanup func()) *Tester
Setup sets up a new instance of the tester.
func (*Tester) Explore ¶
Explore explores the space of possible test schedules until the state space is fully exhausted.
func (*Tester) ExploreFor ¶
ExploreFor explores the space of possible test schedules until the state space is fully exhausted or the given duration elapses, whichever occurs first.
func (*Tester) ExploreN ¶
ExploreN explores the space of possible test schedules until the state space is fully exhausted or the given number of schedules is explored, whichever occurs first.
func (*Tester) MutexLock ¶
MutexLock implements the logic related to modeling and scheduling an execution of "m.Lock()".
func (*Tester) MutexUnlock ¶
MutexUnlock implements the logic related to modeling and scheduling an execution of "m.Unlock()".
func (*Tester) RWMutexLock ¶
RWMutexLock implements the logic related to modeling and scheduling an execution of "rw.Lock()".
func (*Tester) RWMutexRLock ¶
RWMutexRLock implements the logic related to modeling and scheduling an execution of "rw.RLock()".
func (*Tester) RWMutexRUnlock ¶
RWMutexRUnlock implements the logic related to modeling and scheduling an execution of "rw.RUnlock()".
func (*Tester) RWMutexUnlock ¶
RWMutexUnlock implements the logic related to modeling and scheduling an execution of "rw.Unlock()".