skip to main content
10.1145/2451436.2451458acmotherconferencesArticle/Chapter ViewAbstractPublication PagesmodularityConference Proceedingsconference-collections
research-article

On exceptions, events and observer chains

Published:24 March 2013Publication History

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.

References

  1. M. Bagherzadeh, H. Rajan, and A. Darvish. On exceptions, events and observer chains. Technical Report 12-12, Iowa State U., 2012.Google ScholarGoogle Scholar
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle Scholar
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. N. Cacho, F. C. Filho, A. Garcia, and E. Figueiredo. EJFlow: taming exceptional control flows in aspect-oriented programming. In AOSD'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle Scholar
  8. S. Drossopoulou, S. Eisenbach, and T. Valkevych. Java type soundness revisited. Technical report, Imperial College.Google ScholarGoogle Scholar
  9. S. Drossopoulou and T. Valkevych. Java exceptions throw no surprises. Technical report, Imperial College London, 2000.Google ScholarGoogle Scholar
  10. I. Figueroa and E. Tanter. A semantics for execution levels with exceptions. In FOAL'11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. C. Fu, A. Milanova, B. G. Ryder, and D. G. Wonnacott. Robustness testing of Java server applications. TSE'05, 31(4). Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D. Garlan, S. Jha, D. Notkin, and J. Dingel. Reasoning about implicit invocation. In FSE'98. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. D. Garlan and D. Notkin. Formalizing design spaces: Implicit invocation mechanisms. In VDM '91. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. B. Jacobs, P. Muller, and F. Piessens. Sound reasoning about unchecked exceptions. In SEFM'07. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. B. Jacobs and F. Piessens. Failboxes: Provably safe exception handling. In ECOOP 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. C. B. Jones. Tentative steps toward a development method for interfering programs. TOPLAS'83, 5(4). Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. Khatchadourian, J. Dovland, and N. Soundarajan. Enforcing behavioral constraints in evolving aspect-oriented programs. In FOAL'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm, and W. G. Griswold. An overview of AspectJ. In ECOOP'01. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. G. Kiczales, J. Lamping, A. Mendhekar, C. Maeda, C. V. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-oriented programming. In ECOOP'97.Google ScholarGoogle Scholar
  23. G. Kiczales and M. Mezini. Aspect-oriented programming and modular reasoning. In ICSE'05. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. N. Krishnaswami, J. Aldrich, L. Birkedal, K. Svendsen, and A. Buisse. Design patterns in separation logic. In TLDI'09. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. G. T. Leavens and W. E. Weihl. Specification and verification of object-oriented programs using supertype abstraction. Acta Informatica'95, 32(8).Google ScholarGoogle Scholar
  27. X. Leroy and F. Pessaux. Type-based analysis of uncaught exceptions. TOPLAS 2000, 22(2). Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. D. Malayeri and J. Aldrich. Practical exception specifications. In Advanced Topics in Exception Handling Techniques'06. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. R. A. Maxion and R. T. Olszewski. Improving software robustness with dependability cases. In FTCS'98. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. J. M. Morris. A theoretical basis for stepwise refinement and the programming calculus. Sci. Com. Program.'87, 9(3). Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. H. Rajan and G. T. Leavens. Ptolemy: A language with quantified, typed events. In ECOOP'08. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. F. Steimann, T. Pawlitzki, S. Apel, and C. Kastner. Types and modularity for implicit invocation with implicit announcement. TOSEM'10, 20(1). Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. B. Tyler and N. Soundarajan. Black-box testing of grey-box behavior. In FATES'03.Google ScholarGoogle Scholar
  39. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  40. J. Zhao and M. Rinard. Pipa: a behavioral interface specification language for AspectJ. In FASE'03. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. On exceptions, events and observer chains

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Other conferences
      AOSD '13: Proceedings of the 12th annual international conference on Aspect-oriented software development
      March 2013
      232 pages
      ISBN:9781450317665
      DOI:10.1145/2451436

      Copyright © 2013 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 24 March 2013

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate41of139submissions,29%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader