Modular reasoning in the presence of event subtyping

Mehdi Bagherzadeh, Robert Dyer, Rex D. Fernando, José Sánchez, Hridesh Rajan
2015 Proceedings of the 14th International Conference on Modularity - MODULARITY 2015  
Separating crosscutting concerns while preserving modular reasoning is challenging. Type-based interfaces (event types) separate modularized crosscutting concerns (observers) and traditional object-oriented concerns (subjects). Event types paired with event specifications were shown to be effective in enabling modular reasoning about subjects and observers. Similar to class subtyping, organizing event types into subtyping hierarchies is beneficial. However, unrelated behaviors of observers and
more » ... s of observers and their arbitrary execution orders could cause unique, somewhat counterintuitive, reasoning challenges in the presence of event subtyping. These challenges threaten both tractability of reasoning and reuse of event types. This work makes three contributions. First, we pose and explain these challenges. Second, we propose an event-based calculus to show how these challenges can be overcome. Finally, we present modular reasoning rules of our technique and show its applicability to other event-based techniques. In this work, we solve problem (1) by imposing a novel refining relation among specifications of an event and its superevents, such that for each event in a subtyping hierarchy its greybox specification [30] refines both behaviors and control effects of the greybox specification of its superevent. Our refining relation is the inverse of the classical refining for blackbox specifications [31] and extends it to greybox specifications with control effect specifications. We solve problem (2) by imposing a non-decreasing rela-
doi:10.1145/2724525.2724569 dblp:conf/aosd/Bagherzadeh0FSR15 fatcat:txgqzf2qz5ck5p4wvjkabgfmee