Abstract
A fundamental issue in multithreaded programming is detecting data races. A program is said to be well synchronised if it does not contain data races w.r.t. an interleaving semantics. Formally ensuring this property is central, because the java Memory Model then guarantees that one can safely reason on the interleaved semantics of the program. In this work we formalise in the coq proof assistant a java bytecode data race analyser based on the conditional must-not alias analysis of Naik and Aiken. The formalisation includes a context-sensitive points-to analysis and an instrumented semantics that counts method calls and loop iterations. Our java-like language handles objects, virtual method calls, thread spawning and lock and unlock operations for threads synchronisation.
Work partially supported by EU project MOBIUS, and by the ANR-SETI-06-010 grant.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
AMD. Amd64 architecture programmer’s manual volume 2: System programming. Technical Report 24593 (2007)
Aspinall, D., Sevcík, J.: Formalising java’s data race free guarantee. In: Schneider, K., Brandt, J. (eds.) TPHOLs 2007. LNCS, vol. 4732, pp. 22–37. Springer, Heidelberg (2007)
Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: preventing data races and deadlocks. In: ACM Press (ed.) Proc. of OOPSLA 2002, New York, NY, USA, pp. 211–230 (2002)
Boyapati, C., Rinard, M.: A parameterized type system for race-free Java programs. In: ACM Press (ed.) Proc. of OOPSLA 2001, New York, NY, USA, pp. 56–69 (2001)
Flanagan, C., Abadi, M.: Types for safe locking. In: Swierstra, S.D. (ed.) ESOP 1999. LNCS, vol. 1576, pp. 91–108. Springer, Heidelberg (1999)
Cachera, D., Jensen, T., Pichardie, D., Rusu, V.: Extracting a Data Flow Analyser in Constructive Logic. Theoretical Computer Science 342(1), 56–78 (2005)
Flanagan, C., Freund, S.N.: Type-based race detection for java. In: Proc. of PLDI 2000, pp. 219–232. ACM Press, New York (2000)
Hobor, A., Appel, A.W., Zappa Nardelli, F.: Oracle semantics for concurrent separation logic. In: Drossopoulou, S. (ed.) ESOP 2008. LNCS, vol. 4960, pp. 353–367. Springer, Heidelberg (2008)
Huisman, M., Petri, G.: The Java memory model: a formal explanation. In: Verification and Analysis of Multi-threaded Java-like Programs, VAMP (2007) (to appear)
Intel. Intel 64 architecture memory ordering white paper. Technical Report SKU 318147-001 (2007)
Klein, G., Nipkow, T.: A machine-checked model for a Java-like language, virtual machine and compiler. ACM Transactions on Programming Languages and Systems 28(4), 619–695 (2006)
Lammich, P., Müller-Olm, M.: Formalization of conflict analysis of programs with procedures, thread creation, and monitors. In: The Archive of Formal Proofs (2007)
Leroy, X.: Formal certification of a compiler back-end, or: programming a compiler with a proof assistant. In: Proc. of POPL 2006, pp. 42–54. ACM Press, New York (2006)
Leveson, N.G.: Safeware: system safety and computers. ACM, NY (1995)
Manson, J., Pugh, W., Adve, S.V.: The Java Memory Model. In: Proc. of POPL 2005, pp. 378–391. ACM Press, New York (2005)
Naik, M.: Effective Static Data Race Detection For Java. PhD thesis, Standford University (2008)
Naik, M., Aiken, A.: Conditional must not aliasing for static race detection. In: Proc. of POPL 2007, pp. 327–338. ACM Press, New York (2007)
Naik, M., Aiken, A., Whaley, J.: Effective static race detection for java. In: Proc. of PLDI 2006, pp. 308–319. ACM Press, New York (2006)
Petri, G., Huisman, M.: BicolanoMT: a formalization of multi-threaded Java at bytecode level. In: Bytecode 2008. Electronic Notes in Theoretical Computer Science (2008)
Poulsen, K.: Tracking the blackout bug (2004)
Sun Microsystems, Inc. JSR 133 Expert Group, Java Memory Model and Thread Specification Revision (2004)
Whaley, J., Lam, M.S.: Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In: Proc. of PLDI 2004, pp. 131–144. ACM, New York (2004)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Dabrowski, F., Pichardie, D. (2009). A Certified Data Race Analysis for a Java-like Language. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds) Theorem Proving in Higher Order Logics. TPHOLs 2009. Lecture Notes in Computer Science, vol 5674. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-03359-9_16
Download citation
DOI: https://doi.org/10.1007/978-3-642-03359-9_16
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-03358-2
Online ISBN: 978-3-642-03359-9
eBook Packages: Computer ScienceComputer Science (R0)