• DocumentCode
    1405293
  • Title

    Aspect-Oriented Race Detection in Java

  • Author

    Bodden, Eric ; Havelund, Klaus

  • Author_Institution
    Software Technol. Group, Tech. Univ. Darmstadt, Darmstadt, Germany
  • Volume
    36
  • Issue
    4
  • fYear
    2010
  • Firstpage
    509
  • Lastpage
    527
  • Abstract
    In the past, researchers have developed specialized programs to aid programmers in detecting concurrent programming errors such as deadlocks, livelocks, starvation, and data races. In this work, we propose a language extension to the aspect-oriented programming language AspectJ, in the form of three new pointcuts, lock(), unlock(), and maybeShared(). These pointcuts allow programmers to monitor program events where locks are granted or handed back, and where values are accessed that may be shared among multiple Java threads. We decide thread locality using a static thread-local-objects analysis developed by others. Using the three new primitive pointcuts, researchers can directly implement efficient monitoring algorithms to detect concurrent-programming errors online. As an example, we describe a new algorithm which we call RACER, an adaption of the well-known ERASER algorithm to the memory model of Java. We implemented the new pointcuts as an extension to the AspectBench Compiler, implemented the RACER algorithm using this language extension, and then applied the algorithm to the NASA K9 Rover Executive and two smaller programs. Our experiments demonstrate that our implementation is effective in finding subtle data races. In the Rover Executive, RACER finds 12 data races, with no false warnings. Only one of these races was previously known.
  • Keywords
    Java; aspect-oriented programming; concurrency control; multi-threading; program compilers; program debugging; AspectBench compiler; AspectJ; ERASER algorithm; NASA K9 Rover Executive; RACER algorithm; aspect-oriented programming language; aspect-oriented race detection; concurrent programming error detection; multiple Java threads; primitive pointcuts; static thread-local-objects analysis; Race detection; aspect-oriented programming; runtime verification; semantic pointcuts; static analysis.;
  • fLanguage
    English
  • Journal_Title
    Software Engineering, IEEE Transactions on
  • Publisher
    ieee
  • ISSN
    0098-5589
  • Type

    jour

  • DOI
    10.1109/TSE.2010.25
  • Filename
    5406531