Tressa: Claiming the Future
Unlike sequential programs, concurrent programs have to account for interference on shared variables. Static verification of a desired property for such programs crucially depends on precisely asserting the conditions for interference. In a static proof system, in addition to program variables, auxiliary (history) variables summarizing the past of the program execution are used in these assertions. Capable of expressing reachability only, assertions (and history variables) are not as useful in the proofs of programs using optimistic concurrency. Pessimistic implementations which allow access to shared data only after synchronization (e.g. locks) guarantee exclusivity; optimistic concurrency implementations which check for interference after shared data is accessed abandon exclusivity in favor of performance.
In this paper, we propose a new construct, tressa, to express properties, including interference, about the future of an execution. A tressa claim states a condition for reverse reachability from an end state of the program, much like an assert claim states a condition for forward reachability from the initial state of the program. As assertions employ history variables, tressa claims employ prophecy variables, originally introduced for refinement proofs. Being the temporal dual of history variables, prophecy variables summarize the future of the program execution. We present the proof rules and the notion of correctness of a program for two-way reasoning in a static setting: forward in time for assert claims, backward in time for tressa claims. We have incorporated our proof rules into the QED verifier and have used our implementation to verify a small but sophisticated algorithm. Our experience shows that the proof steps and annotations follow closely the intuition of the programmer, making the proof itself a natural extension of implementation.
KeywordsAtomic Statement Global Variable Proof System History Variable Program Execution
Unable to display preview. Download preview PDF.
- 1.Elmas, T., Qadeer, S., Tasiran, S.: A calculus of atomic actions. In: POPL 2009, pp. 2–15. ACM, New York (2009)Google Scholar
- 3.Larus, J.R., Rajwar, R.: Transactional Memory. Morgan & Claypool (2006)Google Scholar
- 6.Wang, L., Stoller, S.D.: Static analysis for programs with non-blocking synchronization. In: PPoPP 2005. ACM Press, New York (2005)Google Scholar
- 9.Freund, S.N., Qadeer, S.: Checking concise specifications for multithreaded software. Journal of Object Technology 3 (2004)Google Scholar