Asynchronous assertions

Edward E. Aftandilian, Samuel Z. Guyer, Martin Vechev, Eran Yahav
2011 Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications - OOPSLA '11  
Assertions are a powerful bug detection technique. Traditional assertion checking, however, is performed synchronously, imposing its full cost on the runtime of the program. As a result, many useful kinds of checks are impractical because they lead to extreme slowdowns. We present a solution that decouples assertion evaluation from program execution: assertions are evaluated asynchronously while the program continues to execute. Our technique ensures that the assertion checking thread operates
more » ... n a consistent view of the global state, and that an assertion always produces the same result as it would in a serial execution. We implemented our technique in a system called STROBE, a snapshot-based system for asynchronous assertion checking in both single-and multi-threaded Java applications. STROBE runs inside the Java virtual machine and uses copy-on-write to build snapshots incrementally. We find that asynchronous checking scales almost perfectly over synchronous checking in many cases, indicating that the snapshot overhead is quite low. STROBE provides tolerable overheads (under 2X) even for heavy-weight assertions that would otherwise result in crushing slowdowns. 2011/3/21
doi:10.1145/2048066.2048090 dblp:conf/oopsla/AftandilianGVY11 fatcat:kdxfcpe64fbfhetxgonqtla23u