Define Number of Interleavings

Number of Interleavings: Besides the raw number of threads, the state space is affected by the number of potential interleavings of these threads. While there exist automated techniques (partial-order reduction) to reduce these interleavings, most model checkers include some kind of interface to denote atomic sections (code which does not interfere with other threads). Previous versions of JPF supported two primitives: Verify.beginAtomic() and Verify.endAtomic(). They were used to mark a section of the code that would be executed atomically by the model checker so that no thread interleavings were allowed.

2229_interleavings.jpg

These calls are deprecated in the current version of JPF, which by default supports partial-order reduction instead. Use the Verify.beginAtomic and Verify.endAtomic primitives with care because a deadlock will occur when a thread becomes blocked inside of an atomic section.

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.