Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1007/978-3-540-89330-1_13guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Reasoning about Java's Reentrant Locks

Published: 09 December 2008 Publication History

Abstract

This paper presents a verification technique for a concurrent Java-like language with reentrant locks. The verification technique is based on permissionaccounting separation logic. As usual, each lock is associated with a resource invariant, i.e., when acquiring the lock the resources are obtained by the thread holding the lock, and when releasing the lock, the resources are released. To accommodate for reentrancy, the notion of lockset is introduced: a multiset of locks held by a thread. Keeping track of the lockset enables the logic to ensure that resources are not re-acquired upon reentrancy, thus avoiding the introduction of new resources in the system. To be able to express flexible locking policies, we combine the verification logic with value-parameterized classes. Verified programs satisfy the following properties: data race freedom, absence of null-dereferencing and partial correctness. The verification technique is illustrated on several examples, including a challenging lock-coupling algorithm.

References

[1]
Á brahám, E., de Boer, F.S., de Roever, W.-P., Steffen, M.: Tool-supported proof system for multithreaded Java. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2002. LNCS, vol. 2852, pp. 1-32. Springer, Heidelberg (2003)
[2]
Andrews, G.: Concurrent Programming: Principles and Practice. Benjamin/Cummings (1991)
[3]
Barnett, M., DeLine, R., Fähndrich, M., Leino, K.R.M., Schulte, W.: Verification of object-oriented programs with invariants. Journal of Object Technology 3(6) (2004)
[4]
Bornat, R., O'Hearn, P.W., Calcagno, C., Parkinson, M.: Permission accounting in separation logic. In: Principles of Programming Languages. ACM Press, New York (2005)
[5]
Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: Preventing data races and deadlocks. In: ACM Conference on Object-Oriented Programming Systems, Languages, and Applications (2002)
[6]
Boyland, J.: Checking interference with fractional permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, Springer, Heidelberg (2003)
[7]
Clarke, D.G., Potter, J.M., Noble, J.: Ownership types for flexible alias protection. In: ACM Conference on Object-Oriented Programming Systems, Languages, and Applications. ACM SIGPLAN Notices, vol. 33(10). ACM Press, New York (1998)
[8]
de Boer, F.S.: A sound and complete shared-variable concurrency model for multithreaded Java programs. In: International Conference on Formal Methods for Open Object-based Distributed Systems (2007)
[9]
DeLine, R., Fähndrich, M.: Typestates for objects. In: European Conference on Object-Oriented Programming (2004)
[10]
Gotsman, A., Berdine, J., Cook, B., Rinetzky, N., Sagiv, M.: Local reasoning for storable locks and threads. In: Asian Programming Languages and Systems Symposium (2007)
[11]
Haack, C., Huisman, M., Hurlin, C.: Reasoning about Java's reentrant locks. Technical Report ICIS-R08014, Radboud University Nijmegen (2008)
[12]
Haack, C., Hurlin, C.: Separation logic contracts for a Java-like language with fork/join. In: Meseguer, J., Roşu, G. (eds.) AMAST 2008. LNCS, vol. 5140, pp. 199-215. Springer, Heidelberg (2008)
[13]
Hobor, A., Appel, A., Nardelli, F.: Oracle semantics for concurrent separation logic. In: Drossopoulou, S. (ed.) ESOP 2008. LNCS, vol. 4960, pp. 353-367. Springer, Heidelberg (2008)
[14]
Ishtiaq, S., O'Hearn, P.W.: BI as an assertion language for mutable data structures. In: Principles of Programming Languages (2001)
[15]
Jacobs, B., Smans, J., Piessens, F., Schulte, W.: A statically verifiable programming model for concurrent object-oriented programs. In: International Conference on Formal Engineering Methods (2006)
[16]
Müller, P. (ed.): Modular Specification and Verification of Object-Oriented Programs. LNCS, vol. 2262, p. 195. Springer, Heidelberg (2002)
[17]
Naftalin, M., Wadler, P.: Java Generics. O'Reilly, Sebastopol (2006)
[18]
O'Hearn, P.W.: Resources, concurrency and local reasoning. Theoretical Computer Science 375(1-3), 271-307 (2007)
[19]
O'Hearn, P.W., Pym, D.J.: The logic of bunched implications. Bulletin of Symbolic Logic 5(2) (1999)
[20]
Parkinson, M.: Local Reasoning for Java. Ph.D thesis, University of Cambridge (2005)
[21]
Parkinson, M., Bierman, G.: Separation logic and abstraction. In: Principles of Programming Languages (2005)
[22]
Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: Logic in Computer Science, Copenhagen, Denmark. IEEE Press, Los Alamitos (2002)
[23]
Wadler, P.: A taste of linear logic. In:Mathematical Foundations of Computer Science (1993)

Cited By

View all
  1. Reasoning about Java's Reentrant Locks

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image Guide Proceedings
    APLAS '08: Proceedings of the 6th Asian Symposium on Programming Languages and Systems
    December 2008
    341 pages
    ISBN:9783540893295
    • Editor:
    • G. Ramalingam

    Publisher

    Springer-Verlag

    Berlin, Heidelberg

    Publication History

    Published: 09 December 2008

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 04 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)VeyMont: Choreography-Based Generation of Correct Concurrent Programs with Shared MemoryIntegrated Formal Methods10.1007/978-3-031-76554-4_12(217-236)Online publication date: 11-Nov-2024
    • (2023)Protecting Locks Against Unbalanced Unlock()Proceedings of the 35th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3558481.3591091(199-211)Online publication date: 17-Jun-2023
    • (2016)Concurrent separation logicACM SIGLOG News10.1145/2984450.29844573:3(47-65)Online publication date: 8-Aug-2016
    • (2016)The Design and Formalization of Mezzo, a Permission-Based Programming LanguageACM Transactions on Programming Languages and Systems10.1145/283702238:4(1-94)Online publication date: 2-Aug-2016
    • (2016)Verifying Custom Synchronization Constructs Using Higher-Order Separation LogicACM Transactions on Programming Languages and Systems10.1145/281863838:2(1-72)Online publication date: 4-Jan-2016
    • (2014)Verification of Concurrent Systems with VerCorsAdvanced Lectures of the 14th International School on Formal Methods for Executable Software Models - Volume 848310.1007/978-3-319-07317-0_5(172-216)Online publication date: 16-Jun-2014
    • (2013)Proof-Directed Parallelization Synthesis by Separation LogicACM Transactions on Programming Languages and Systems10.1145/2491522.249152535:2(1-60)Online publication date: 1-Jul-2013
    • (2012)The VerCors projectProceedings of the sixth workshop on Programming languages meets program verification10.1145/2103776.2103785(71-82)Online publication date: 24-Jan-2012
    • (2012)Resource-sensitive synchronization inference by abductionProceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages10.1145/2103656.2103694(309-322)Online publication date: 25-Jan-2012
    • (2012)Resource-sensitive synchronization inference by abductionACM SIGPLAN Notices10.1145/2103621.210369447:1(309-322)Online publication date: 25-Jan-2012
    • Show More Cited By

    View Options

    View options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media