Lazy Runtime Verification for Constraints on Interacting Objects

Jin Shao,Fang Deng,Haiwen Liu,Qianxiang Wang,Hong Mei
DOI: https://doi.org/10.1109/apsec.2010.36
2010-01-01
Abstract:Application Programming Interface (API) constraints on objects are rules that API client code must follow in order to get expected results from these objects. Runtime verification, an important approach for detecting API constraint violations, usually suffers from high runtime overhead. This paper focuses on temporal API constraints on multiple interacting objects. Violation detection of such constraints is more challenging than violation detection of single object constraints, and may induce higher runtime overhead. To reduce the runtime overhead, without compromising the effectiveness of verification, we propose a Lazy Verification Approach (LAVA), which enables verification lazily. Verification probes in LAVA are loaded automatically during the program execution as late as possible. And only probes on objects that have been bound by a binding point (a special method invocation that binds involved objects together) are enabled. Based on these optimization strategies, we implemented an efficient and flexible runtime verification framework. We show the effectiveness of our approach by applying it to verify five constraints in the DaCapo [1] benchmark. The empirical results show that our approach can reduce the number of method invocation events sent by probes, which is the main cause of runtime overhead, by 74% to 100% on average, and bring about an optimization ratio of 44.1% to 89.9% on runtime overhead.
What problem does this paper attempt to address?