ABSTRACT
Modular understanding of behaviors and flows of exceptions may help in their better use and handling. Such reasoning tasks about exceptions face unique challenges in event-based implicit invocation (II) languages that allow subjects to implicitly invoke observers, and run the observers in a chain. In this work, we illustrate these challenge in Ptolemy and propose Ptolemy-X that enables modular reasoning about behaviors and flows of exceptions for event announcement and handling. Ptolemy-X's exception-aware specification expressions and boundary exceptions limit the set of (un)checked exceptions of subjects and observers of an event. Exceptional postconditions specify the behaviors of these exceptions. Greybox specifications specify the flows of these exceptions among the observers in the chain. Ptolemy-X's type system and refinement rules enforce these specifications and thus enable its modular reasoning. We evaluate the utility of Ptolemy-X's exception flow reasoning by applying it to understand a set of aspect-oriented (AO) bug patterns. We also present Ptolemy-X's semantics including its sound static semantics.
- M. Bagherzadeh, H. Rajan, and A. Darvish. On exceptions, events and observer chains. Technical Report 12-12, Iowa State U., 2012.Google Scholar
- M. Bagherzadeh, H. Rajan, G. T. Leavens, and S. Mooney. Translucid contracts: expressive specification and modular verification for aspect-oriented interfaces. In AOSD'11. Google ScholarDigital Library
- E. Bodden, E. Tanter, and M. Inostroza. Safe and practical decoupling of aspects with join point interfaces. Technical Report TUD-CS-2012-0106, Technische U. Darmstadt.Google Scholar
- M. Büchi and W. Weck. The greybox approach: When blackbox specifications hide too much. Technical Report 297, Turku Center for Computer Science, 1999. Google ScholarDigital Library
- N. Cacho, F. C. Filho, A. Garcia, and E. Figueiredo. EJFlow: taming exceptional control flows in aspect-oriented programming. In AOSD'08. Google ScholarDigital Library
- R. Coelho, A. Rashid, A. von Staa, J. Noble, U. Kulesza, and C. Lucena. A catalogue of bug patterns for exception handling in aspect-oriented programs. In PLoP'08. Google ScholarDigital Library
- J. Dingel, D. Garlan, S. Jha, and D. Notkin. Towards a formal treatment of implicit invocation using rely/guarantee reasoning. Formal Asp. Comput.'98, 10(3).Google Scholar
- S. Drossopoulou, S. Eisenbach, and T. Valkevych. Java type soundness revisited. Technical report, Imperial College.Google Scholar
- S. Drossopoulou and T. Valkevych. Java exceptions throw no surprises. Technical report, Imperial College London, 2000.Google Scholar
- I. Figueroa and E. Tanter. A semantics for execution levels with exceptions. In FOAL'11. Google ScholarDigital Library
- F. Filho, P. da S. Brito, and C. Rubira. Reasoning about exception flow at the architectural level. In Rigorous Development of Complex Fault-Tolerant Systems'06. Google ScholarDigital Library
- C. Flanagan, K. R. M. Leino, M. Lillibridge, G. Nelson, J. B. Saxe, and R. Stata. Extended static checking for Java. In PLDI'02. Google ScholarDigital Library
- C. Fu, A. Milanova, B. G. Ryder, and D. G. Wonnacott. Robustness testing of Java server applications. TSE'05, 31(4). Google ScholarDigital Library
- D. Garlan, S. Jha, D. Notkin, and J. Dingel. Reasoning about implicit invocation. In FSE'98. Google ScholarDigital Library
- D. Garlan and D. Notkin. Formalizing design spaces: Implicit invocation mechanisms. In VDM '91. Google ScholarDigital Library
- B. Jacobs, P. Muller, and F. Piessens. Sound reasoning about unchecked exceptions. In SEFM'07. Google ScholarDigital Library
- B. Jacobs and F. Piessens. Failboxes: Provably safe exception handling. In ECOOP 2000. Google ScholarDigital Library
- J.-W. Jo, B.-M. Chang, K. Yi, and K.-M. Choe. An uncaught exception analysis for Java. J. Syst. Softw.'04, 72(1). Google ScholarDigital Library
- C. B. Jones. Tentative steps toward a development method for interfering programs. TOPLAS'83, 5(4). Google ScholarDigital Library
- R. Khatchadourian, J. Dovland, and N. Soundarajan. Enforcing behavioral constraints in evolving aspect-oriented programs. In FOAL'08. Google ScholarDigital Library
- G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold. An overview of AspectJ. In ECOOP'01. Google ScholarDigital Library
- G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. V. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. In ECOOP'97.Google Scholar
- G. Kiczales and M. Mezini. Aspect-oriented programming and modular reasoning. In ICSE'05. Google ScholarDigital Library
- N. Krishnaswami, J. Aldrich, L. Birkedal, K. Svendsen, and A. Buisse. Design patterns in separation logic. In TLDI'09. Google ScholarDigital Library
- G. T. Leavens, A. L. Baker, and C. Ruby. Preliminary design of JML: a behavioral interface specification language for Java. Softw. Eng. Notes'06, 31(3). Google ScholarDigital Library
- G. T. Leavens and W. E. Weihl. Specification and verification of object-oriented programs using supertype abstraction. Acta Informatica'95, 32(8).Google Scholar
- X. Leroy and F. Pessaux. Type-based analysis of uncaught exceptions. TOPLAS 2000, 22(2). Google ScholarDigital Library
- D. Malayeri and J. Aldrich. Practical exception specifications. In Advanced Topics in Exception Handling Techniques'06. Google ScholarDigital Library
- R. A. Maxion and R. T. Olszewski. Improving software robustness with dependability cases. In FTCS'98. Google ScholarDigital Library
- J. M. Morris. A theoretical basis for stepwise refinement and the programming calculus. Sci. Com. Program.'87, 9(3). Google ScholarDigital Library
- H. Rajan and G. T. Leavens. Ptolemy: A language with quantified, typed events. In ECOOP'08. Google ScholarDigital Library
- H. Rajan, J. Tao, S. M. Shaner, and G. T. Leavens. Tisa: A language design and modular verification technique for temporal policies in web services. In ESOP'09. Google ScholarDigital Library
- M. P. Robillard and G. C. Murphy. Static analysis to support the evolution of exception structure in object-oriented systems. TOSEM'03, 12(2). Google ScholarDigital Library
- S. M. Shaner, G. T. Leavens, and D. A. Naumann. Modular verification of higher-order methods with mandatory calls specified by model programs. In OOPSLA '07. Google ScholarDigital Library
- S. Sinha, A. Orso, and M. J. Harrold. Automated support for development, maintenance, and testing in the presence of implicit control flow. In ICSE'04. Google ScholarDigital Library
- F. Steimann, T. Pawlitzki, S. Apel, and C. Kastner. Types and modularity for implicit invocation with implicit announcement. TOSEM'10, 20(1). Google ScholarDigital Library
- K. Sullivan, W. G. Griswold, H. Rajan, Y. Song, Y. Cai, M. Shonle, and N. Tewari. Modular aspect-oriented design with XPIs. TOSEM'10, 20(2). Google ScholarDigital Library
- B. Tyler and N. Soundarajan. Black-box testing of grey-box behavior. In FATES'03.Google Scholar
- M. van Dooren and E. Steegmans. Combining the robustness of checked exceptions with the flexibility of unchecked exceptions using anchored exception declarations. In OOPSLA'05. Google ScholarDigital Library
- J. Zhao and M. Rinard. Pipa: a behavioral interface specification language for AspectJ. In FASE'03. Google ScholarDigital Library
Index Terms
- On exceptions, events and observer chains
Recommendations
A review on exception analysis
Context: Exception handling has become popular in most major programming languages, including Ada, C++, Java, and ML. Since exception handling was introduced in programming languages, there have been various kinds of exception analyses, which analyze ...
Static analysis to support the evolution of exception structure in object-oriented systems
Exception-handling mechanisms in modern programming languages provide a means to help software developers build robust applications by separating the normal control flow of a program from the control flow of the program under exceptional situations. ...
Predicting exceptions in agent-based supply-chains
ESAW'05: Proceedings of the 6th international conference on Engineering Societies in the Agents WorldExceptions take place when one or more events take place unexpectedly. Exceptions occur frequently in supply-chains and mostly result in severe monetary losses. Consequently, detecting exceptions timely is of great practical value. Traditional ...
Comments