Skip to Main Content
In this paper, we describe temporal invariants, which are class invariants that are qualified by the operators eventually, always, never, or already. Temporal invariants can capture assertions that may not be valid initially but, as the program continues, must eventually become valid. Moreover, temporal invariants can indicate references to memory that should eventually be deallocated. To facilitate incorporation of temporal invariants as a maintenance or reengineering activity, we weave invariants into the system as aspects. In our case study of a C++ system, the aspects are woven into join points using policies. We investigate the effectiveness of temporal invariants and we compare the performance of our aspect-oriented implementation with several other approaches.