Testing Java Monitors through Deterministic Execution

  • Authors:
  • Craig Harvey;Paul Strooper

  • Affiliations:
  • -;-

  • Venue:
  • ASWEC '01 Proceedings of the 13th Australian Conference on Software Engineering
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

Abstract: Java is a popular, modern programming language that supports monitors. However, monitor implementations, like other concurrent programs, are hard to test due to the inherent non-determinism. This paper presents a method for testing Java monitors, which extends the work of Brinch Hansen on testing Concurrent Pascal monitors. A monitor is tested by executing a concurrent program in which the processes are synchronised by a clock to make the sequence of interactions deterministic and reproducible. The method is extended to account for the differences between Concurrent Pascal monitors and Java monitors, and to provide additional coverage of the implementation under test. Tool support and documentation in the form of a test plan are also provided. The method is illustrated in detail on an asymmetric producer-consumer monitor, which is the same example that was used to illustrate the original method. The application of the method to the readers and writers problem is also discussed.