checking concurrent contracts with aspects
The applicability of aspects as a means of implementing runtime contract checking has been demonstrated in prior work, where contracts are identified as cross-cutting concerns [12, 13]. Checking contracts at runtime encounters a set of challenges within concurrent environments, such as the risk that evaluation will introduce deadlock to code which is otherwise deadlock-free. This paper presents a simple methodology for generating runtime contract checking aspects targeted at concurrent programs. The novel features of this approach allow contracts to depend on active objects without race conditions or deadlock, and addresses issues relating to timing and blame assignment. The CoJava language is discussed whose tool-supported aspect generation methodology allows the correct checking of contracts predicated on active objects.
concurrency active objects runtime assertion checking java aop