| Copyright | (c) 2017--2018 Michael Walker |
|---|---|
| License | MIT |
| Maintainer | Michael Walker <mike@barrucadu.co.uk> |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Test.DejaFu.Utils
Contents
Description
Utility functions for users of dejafu.
Synopsis
- toTIdTrace :: Trace -> [(ThreadId, ThreadAction)]
- showTrace :: Trace -> String
- threadNames :: Trace -> [(Int, String)]
- simplestsBy :: (x -> x -> Bool) -> [(x, Trace)] -> [(x, Trace)]
- showFail :: Failure -> String
- tidOf :: ThreadId -> Decision -> ThreadId
- decisionOf :: Foldable f => Maybe ThreadId -> f ThreadId -> ThreadId -> Decision
Traces
toTIdTrace :: Trace -> [(ThreadId, ThreadAction)] Source #
Turn a Trace into an abbreviated form.
Since: dejafu-1.3.2.0
showTrace :: Trace -> String Source #
Pretty-print a trace, including a key of the thread IDs (not including thread 0). Each line of the key is indented by two spaces.
Since: dejafu-0.5.0.0
threadNames :: Trace -> [(Int, String)] Source #
Get all named threads in the trace.
Since: dejafu-0.7.3.0
simplestsBy :: (x -> x -> Bool) -> [(x, Trace)] -> [(x, Trace)] Source #
Find the "simplest" trace leading to each result.
Failures
Scheduling
Arguments
| :: Foldable f | |
| => Maybe ThreadId | The prior thread. |
| -> f ThreadId | The threads. |
| -> ThreadId | The current thread. |
| -> Decision |
Get the Decision that would have resulted in this thread
identifier, given a prior thread (if any) and collection of threads
which are unblocked at this point.
Since: dejafu-0.5.0.0