Sequential specification

Last modified: 21 October 2022

To be sure that the algorithm provides correct sequential behavior, you can define its sequential specification by writing a straightforward sequential implementation of the testing data structure.

To provide a sequential specification of the algorithm for verification:

  1. Implement a sequential version of all the testing methods.

  2. Pass the class with sequential implementation to the sequentialSpecification() option:

    StressOptions().sequentialSpecification(SequentialQueue::class)

For example, here is the test to check correctness of j.u.c.ConcurrentLinkedQueue from the Java standard library.