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 Type Method Description
      java.lang.Object initialState()
      Returns the initial state of the datatype
      java.util.Optional<java.lang.Object> nextState​(java.lang.Object currentState, java.lang.Object input, java.lang.Object output)
      Next-state function, checking whether transitioning the datatype in the given state under the provided input and output is valid.
      default java.util.Collection<java.util.List<LinearizabilityChecker.Event>> partition​(java.util.List<LinearizabilityChecker.Event> events)
      For compositional checking, the history can be partitioned into sub-histories
    • Method Detail

      • initialState

        java.lang.Object initialState()
        Returns the initial state of the datatype
      • nextState

        java.util.Optional<java.lang.Object> nextState​(java.lang.Object currentState,
                                                       java.lang.Object input,
                                                       java.lang.Object output)
        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 datatype
        input - the input, associated with the given invocation event
        output - 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 java.util.Collection<java.util.List<LinearizabilityChecker.Event>> partition​(java.util.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