A history of BlockingQueues

Marina Zaharieva-Stojanovski, Marieke Huisman, Stefan Blom

    Research output: Chapter in Book/Report/Conference proceedingConference contributionAcademic

    82 Downloads (Pure)

    Abstract

    This paper describes a way to formally specify the behaviour of concurrent data structures. When specifying concurrent data structures, the main challenge is to make specifications stable, i.e., to ensure that they cannot be invalidated by other threads. To this end, we propose to use history-based specifications: instead of describing method behaviour in terms of the object’s state, we specify it in terms of the object’s state history. A history is defined as a list of state updates, which at all points can be related to the actual object’s state. We illustrate the approach on the BlockingQueue hierarchy from the java.util.concurrent library. We show how the behaviour of the interface BlockingQueue is specified, leaving a few decisions open to descendant classes. The classes implementing the interface correctly inherit the specifications. As a specification language, we use a combination of JML and permission-based separation logic, including abstract predicates. This results in an abstract, modular and natural way to specify the behaviour of concurrent queues. The specifications can be used to derive high-level properties about queues, for example to show that the order of elements is preserved. Moreover, the approach can be easily adapted to other concurrent data structures.
    Original languageEnglish
    Title of host publicationProceedings Sixth Workshop on Formal Languages and Analysis of Contract-Oriented Software (FLACOS 2012)
    EditorsGordon J. Pace, Anders P. Ravn
    Place of PublicationLondon
    PublisherEPTCS
    Pages31-35
    Number of pages5
    DOIs
    Publication statusPublished - 19 Sept 2012
    EventSixth Workshop on Formal Languages and Analysis of Contract-Oriented Software, FLACOS 2012 - Bertinoro, Italy
    Duration: 19 Sept 201219 Sept 2012

    Publication series

    NameElectronic Proceedings in Theoretical Computer Science
    PublisherEPTCS
    Volume94
    ISSN (Electronic)2075-2180

    Workshop

    WorkshopSixth Workshop on Formal Languages and Analysis of Contract-Oriented Software, FLACOS 2012
    Period19/09/1219/09/12
    Other19 September 2012

    Keywords

    • CR-D.2.4

    Fingerprint

    Dive into the research topics of 'A history of BlockingQueues'. Together they form a unique fingerprint.

    Cite this