Formal specifications for Java’s synchronisation classes

Afshin Amighi, Stefan Blom, Marieke Huisman, Wojciech Mostowski, Marina Zaharieva-Stojanovski

    Research output: Book/ReportReportProfessional

    42 Downloads (Pure)


    This paper discusses formal specification and verification of the synchronisation classes of the Java API. In many verification systems for concurrent programs, synchronisation is treated as a primitive operation. As a result, verification rules for synchronisation are hard-coded in the logic, and not verified. These rules describe the concrete semantics of the given synchronisation primitive, and manage how resources are protected by synchronisation. In contrast, this paper describes several synchronisation primitives at the specification level, by specifying the behaviour of synchronisation routines from the Java API at method level using permission-based Separation Logic. This gives a generalised, high-level, and easily extendable approach to formalisation of arbitrary synchronisation mechanisms, which allows for modular treatment of synchronisation in verification. Notably, our approach does not only apply to locks, but also to other synchronisation mechanisms such as semaphores and latches that we also discuss in the paper. Finally, we used the verification tool that we are developing and successfully verified (so far simplified) reference implementations of all presented synchronisers; the paper discusses the verification of one of them.
    Original languageEnglish
    Place of PublicationEnschede
    PublisherCentre for Telematics and Information Technology (CTIT)
    Number of pages8
    Publication statusPublished - 11 Sept 2013

    Publication series

    NameCTIT Technical Report Series
    PublisherUniversity of Twente, Centre for Telematics and Information Technology
    ISSN (Print)1381-3625


    • Separation logic
    • Synchronisation
    • Concurrency
    • Formal verification
    • Java
    • Formal specification


    Dive into the research topics of 'Formal specifications for Java’s synchronisation classes'. Together they form a unique fingerprint.

    Cite this