Checking Interface Interaction Protocols Using Aspect-Oriented Programming
Anh-Hoang Truong, Thanh-Binh Trinh, Dang Van Hung, Viet-Ha Nguyen, Nguyen Thi Thu Trang, Pham Dinh Hung · 2008
We propose an approach based on aspect-oriented programming to specify and to verify interaction protocols in the component interfaces of Java programs. First, based on method patterns of AspectJ we introduce a simple protocol specification language that specifies temporal orders of operations of an interface. We then develop an algorithm that takes a protocol specification and produces aspect code that will check for protocol conformance of programs that use the interface at runtime. Finally, we propose several extensions that enable the integration of our approach with static techniques and allow checking protocols over multiple components.