Loading…

A Stateful Approach to Testing Monitors in Multithreaded Programs

A monitor is a commonly used synchronization construct in multithreaded programs. Ensuring the correctness of each monitor in a multithreaded program is a critical step towards ensuring the correctness of the entire program. A monitor's correctness can be checked by executing two or more test t...

Full description

Saved in:
Bibliographic Details
Main Authors: Carver, Richard H, Lei, Jeff
Format: Conference Proceeding
Language:English
Subjects:
Online Access:Request full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:A monitor is a commonly used synchronization construct in multithreaded programs. Ensuring the correctness of each monitor in a multithreaded program is a critical step towards ensuring the correctness of the entire program. A monitor's correctness can be checked by executing two or more test threads that call the monitor's methods. Reach ability testing can be used to automatically exercise every possible sequence in which the test threads can enter the monitor. Reach ability testing is a stateless testing technique, which allows it to avoid the high storage cost associated with saving states in memory. However, stateless reach ability testing allows large portions of a program's state space to be visited multiple times, since it is not possible to recognize states that have been visited before. This inefficiency can create a "sequence explosion" problem that causes reach ability testing to take too much time. In this paper, we show how to store and recognize visited states when reach ability testing is applied to a single monitor and its test threads. We also show how to use state pruning to avoid storing all of the visited states at once. The results of an empirical study show that adding states to reach ability testing significantly reduces execution time without significantly increasing storage costs.
ISSN:1530-2059
2640-7507
DOI:10.1109/HASE.2010.14