Separating Obligations of Subjects and Handlers for More Flexible Event Type Verification
Implicit invocation languages, like aspect-oriented languages, automate the Observer pattern, which decouples subjects (base code) from handlers (advice), and then compound them together in the final system. For such languages, event types have been proposed as a way of further decoupling subjects from handlers. In Ptolemy, subjects explicitly announce events at certain program points, and pass the announced piece of code to the handlers for its eventual execution. This implies a mutual dependency between subjects and handlers that should be considered in verification; i.e., verification of subject code should consider the handlers and vice versa.
However, in Ptolemy the event type defines only one obligation that both the handlers and the announced piece of code must satisfy. This limits the flexibility and completeness of verification in Ptolemy. That is, some correct programs cannot be verified due to specification mismatches between the announced code and the handlers’ code. For example, when the announced code does not satisfy the specification of the entire event and handlers must make up the difference, or when the announced code has no effect, imposing a monotonic behavior on the handlers.
In this paper we propose an extension to the specification features of Ptolemy that explicitly separates the specification of the handlers from the specification of the announced code. This makes verification in our new language PtolemyRely more flexible and more complete, while preserving modularity.
KeywordsEvent type specification verification Ptolemy language
- 2.Bagherzadeh, M., Rajan, H., Leavens, G.T.: Translucid contracts for aspect-oriented interfaces. In: FOAL ’10: Workshop on Foundations of Aspect-Oriented Languages workshop, March 2010, pp. 5–14 (2010)Google Scholar
- 3.Bagherzadeh, M., Rajan, H., Leavens, G.T., Mooney, S.: Translucid contracts: expressive specification and modular verification for aspect-oriented interfaces. In: Proceedings of the 10th International Conference on Aspect-oriented Software Development, AOSD ’11, pp. 141–152. ACM, New York (2011)Google Scholar
- 4.Bodden, E.: Closure Joinpoints: Block joinpoints without surprises. In: Proceedings of the 10th International Conference on Aspect-oriented Software Development, AOSD ’11, pp. 117–128. ACM, New York (2011)Google Scholar
- 5.Eric Bodden, Éric Tanter, and Milton Inostroza. Joint point interfaces for safe and flexible decoupling of aspects. ACM Transactions on Software Engineering and Methodology (TOSEM), To appear (2013)Google Scholar
- 8.Inostroza, M., Tanter, É., Bodden, E.: Join point interfaces for modular reasoning in aspect-oriented programs. In: ESEC/FSE ’11: Joint meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 508–511 (2011)Google Scholar
- 9.Khatchadourian, R., Soundarajan, N.: Rely-guarantee approach to reasoning about aspect-oriented programs. In: SPLAT ’07: Proceedings of the 5th workshop on Engineering properties of languages and aspect technologies, Vancouver, British Columbia, Canada, p. 5. ACM Press, New York (2007)CrossRefGoogle Scholar
- 10.Kiczales, G., Mezini, M.: Aspect-oriented programming and modular reasoning. In: Proc. of the 27th International Conference on Software Engineering, pp. 49–58. ACM Press, New York (2005)Google Scholar
- 13.Shaner, S.M., Leavens, G.T., Naumann, D.A.: Modular verification of higher-order methods with mandatory calls specified by model programs. In: International Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), Montreal, Canada, October 2007, pp. 351–367. ACM Press, New York (2007)Google Scholar
- 15.F. Steimann, T. Pawlitzki, S. Apel, C. Kästner. Types and modularity for implicit invocation with implicit announcement. ACM Trans. Softw. Eng. Methodol., 1:1–1:43 (2010)Google Scholar
- 16.Sullivan, K., Griswold, W.G., Rajan, H., Song, Y., Cai, Y., Shonle, M., TewariModular, N.: aspect-oriented design with xpis. ACM Trans. Softw. Eng. Methodol., 5:1–5:42 (September 2010)Google Scholar