Verification of Opacity of the FastLane Algorithm

Note: The description is currently incomplete, we will update it within the next week.

This page documents the proof of opacity of the Fastlane algorithm [SEFM18]. The FastLane algorithm itself is from [Wamhoff et al 2013]. We prove that when the STM implementation switches between using a sequential implementation (SEQ) when a single thread is executing, using the FastLane algorithm for a low number of threads, and another (arbitrary) opaque implementation IMPL for a large number of threads, then under some constraints the result is opaque itself. To prove opacity of an algorithm, it is sufficient to encode it as an IO automaton (where each step of the algorithm is a transition of the automaton), and to prove that this automaton refines TMS2. The proof consists of 4 parts:

  • The 4 parts are organized in 4 hierarchical projects (collections of specifications and theorems). As a basis, 2 more projects are used. A generic specification of IO Automata, refinement and simulation, and a specification of TMS2 as an IO Automaton. The following subsections describe these projects.

    IO Automata, Refinement and the TMS2 automaton

    The project specifying IO Automata, forward simulation (see here for an overview) is quite big. The critical specifications specification of TMS2 as an automaton have already been used in an earlier project, where it is proved that TML (another STM implementation) is opaque by refining TMS2. the last section of this page. For the purpose of doing the proofs here, the specifications of TMS2 just have been placed in a separate project that does not contain TML.

    Simulation proof that SEQ refines TMS2

    In this project (see the overview over the specification structure) it is proved, that the trivial single-threaded (not instrumented) implementation refines TMS2.

    Simulation proof that FastLane refines the TMS2

    In this project (see the overview over the specification structure) it is proved, that the FastLane algorithm refines TMS2. The PC values used here differ from the line numbers used in the paper Instead PC values starting with S refer to the START program, those with HR/MR to HELPERREAD/MASTERREAD etc.)
  • Generic proof for: if C1 <=_F1 A and C2 <=_F2 A, then switch(C1,C2) <=_F A

    See the project overview.

    Proof that switch(SEQ,FastLane) <= TMS2 and switch(switch(SEQ,FastLane), IMPL) <= TMS2

    See the project overview.

    Back to the overview of all KIV projects.
    For general informations on KIV and a download site for the whole system refer to this page.


    Bibliography

    [SEFM18] G. Schellhorn, M. Wedel, O. Travkin, J. König, H. Wehrheim.
    Fastlane is Opaque - A Case Study in Mechanized Proofs of Opacity.
    (submitted to SEFM 2018)

    [Wamhoff et al 2013] G. J. Wamhoff, C. Fetzer, P. Felber, E. Riviere, G. Muller.
    Fastlane: improving performance of software transactional memory for low thread counts.
    (PPoPP, pp. 113-122, ACM)