Automatic Refinement of Split Binary Semaphore
Binary semaphores can be used to implement conditional critical regions by using the split binary semaphore (SBS) technique. Given a specification of a conditional critical regions problem, the SBS technique provides not only the resulting programs but also some invariants which ensure the correctness of the solution. The programs obtained in this way are generally not efficient. However, they can be optimized by strengthening these invariants and using them to eliminate unnecessary tests.
We present a mechanical method to perform these optimizations. The idea is to use the backward propagation technique over a guarded transition system that models the behavior of the programs generated by the SBS. This process needs proving heavy implications and simplifying growing invariants. Our method automatically entrusts these tasks to the Isabelle theorem prover and the CVC Lite validity checker. We have tested our method on a number of classical examples from concurrent programming.
Unable to display preview. Download preview PDF.
- 1.Dijkstra, E.W.: A tutorial on the split binary semaphore (March 1979), http://www.cs.utexas.edu/users/EWD/ewd07xx/EWD703.PDF
- 4.Barrett, C., Berezin, S.: CVC Lite: A new implementation of the cooperating validity checker. In: Alur, R., Peled, D.A. (eds.) CAV 2004. LNCS, vol. 3114, pp. 515–518. Springer, Heidelberg (2004)Google Scholar
- 5.Paulson, L.C.: The Isabelle reference manual (2004), http://isabelle.in.tum.de/doc/ref.pdf
- 6.Andrews, G.: Foundations of Multithreaded, Parallel, and Distributed Programming. Addison-Wesley, Reading, Massachusetts, USA (1999)Google Scholar
- 7.Martin, A., van de Snepscheut, J.: Design of synchronization algorithms. Constructive Methods in Computing Science, pp. 445–478 (1989)Google Scholar
- 8.Barsotti, D., Blanco, J.O.: (Im)proving split binary semaphores. Tecnical Report (2007), Available at http://www.cs.famaf.unc.edu.ar/~damian/publicaciones/sbdinv/SBDwip_ext.pdf
- 10.Manna, Z., Pnueli, A.: On the faithfulness of formal models. In: Mathematical Foundations of Computer Science, pp. 28–42 (1991)Google Scholar