Interface LinearizabilityChecker.SequentialSpec
- All Known Subinterfaces:
LinearizabilityChecker.KeyedSpec
- Enclosing class:
- LinearizabilityChecker
public static interface LinearizabilityChecker.SequentialSpec
Sequential specification of a datatype. Used as input for the linearizability checker.
All parameter and return values should be immutable and have proper equals / hashCode implementations
-
Method Summary
Modifier and TypeMethodDescriptionReturns the initial state of the datatypeNext-state function, checking whether transitioning the datatype in the given state under the provided input and output is valid.default Collection<List<LinearizabilityChecker.Event>>
partition
(List<LinearizabilityChecker.Event> events) For compositional checking, the history can be partitioned into sub-histories
-
Method Details
-
initialState
Object initialState()Returns the initial state of the datatype -
nextState
Next-state function, checking whether transitioning the datatype in the given state under the provided input and output is valid.- Parameters:
currentState
- the current state of the datatypeinput
- the input, associated with the given invocation eventoutput
- the output, associated with the corresponding response event- Returns:
- the next state, if the given current state, input and output are a valid transition, or Optional.empty() otherwise
-
partition
default Collection<List<LinearizabilityChecker.Event>> partition(List<LinearizabilityChecker.Event> events) For compositional checking, the history can be partitioned into sub-histories- Parameters:
events
- the history of events to partition- Returns:
- the partitioned history
-