Modular Reasoning in the Presence of Event Subtyping

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 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.

[1]  Tom Schrijvers,et al.  Compositional reasoning about aspect interference , 2014, MODULARITY.

[2]  Mehdi Bagherzadeh Enabling expressive aspect oriented modular reasoning by translucid contracts , 2010, SPLASH/OOPSLA Companion.

[3]  Lauretta O. Osho,et al.  Axiomatic Basis for Computer Programming , 2013 .

[4]  Martín Abadi,et al.  A Logic of Object-Oriented Programs , 1997, Verification: Theory and Practice.

[5]  Jörg Kienzle,et al.  Transactions on Aspect-Oriented Software Development XI , 2014, Lecture Notes in Computer Science.

[6]  David R. Cok,et al.  OpenJML: JML for Java 7 by Extending OpenJDK , 2011, NASA Formal Methods.

[7]  Yuanyuan Song,et al.  Information hiding interfaces for aspect-oriented design , 2005, ESEC/FSE-13.

[8]  Hridesh Rajan,et al.  Design pattern implementations in Eos , 2007, PLOP '07.

[9]  Gary T. Leavens,et al.  Ptolemy: A Language with Quantified, Typed Events , 2008, ECOOP.

[10]  Gary T. Leavens,et al.  Translucid Contracts for Aspect-oriented Interfaces , 2009 .

[11]  Bruno C. d. S. Oliveira,et al.  EffectiveAdvice: disciplined advice with explicit effects , 2010, AOSD.

[12]  Yuanyuan Song,et al.  Modular software design with crosscutting interfaces , 2006, IEEE Software.

[13]  Jia Xu,et al.  Understanding aspects via implicit invocation , 2004, Proceedings. 19th International Conference on Automated Software Engineering, 2004..

[14]  Gary T. Leavens,et al.  Quantified, Typed Events for Improved Separation of Concerns , 2008 .

[15]  Hridesh Rajan,et al.  Eos: instance-level aspects for integrated system design , 2003, ESEC/FSE-11.

[16]  Gary T. Leavens,et al.  Modular aspect-oriented design rule enforcement with XPIDRs , 2013, FOAL.

[17]  Guy L. Steele,et al.  The Java Language Specification, Java SE 8 Edition , 2013 .

[18]  Gary T. Leavens,et al.  Reasoning tradeoffs in languages with enhanced modularity features , 2016, MODULARITY.

[19]  Hridesh Rajan,et al.  Unifying aspect- and object-oriented design , 2009, TSEM.

[20]  Jonathan Aldrich,et al.  Open Modules: Modular Reasoning About Advice , 2005, ECOOP.

[21]  Hridesh Rajan,et al.  Unifying aspect- and object-oriented program design , 2005 .

[22]  Sven Apel,et al.  Types and modularity for implicit invocation with implicit announcement , 2010, TSEM.

[23]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[24]  Martin C. Rinard,et al.  A classification system and analysis for aspect-oriented programs , 2004, SIGSOFT '04/FSE-12.

[25]  Mira Mezini,et al.  EScala: modular event-driven object interactions in scala , 2011, AOSD '11.

[26]  Yuanyuan Song,et al.  Modular aspect-oriented design with XPIs , 2010, ACM Trans. Softw. Eng. Methodol..

[27]  Hridesh Rajan,et al.  Event type polymorphism , 2012, FOAL '12.

[28]  Nicolas Tabareau,et al.  Effective Aspects: A Typed Monadic Embedding of Pointcuts and Advice , 2013, LNCS Trans. Aspect Oriented Softw. Dev..

[29]  Patrick Th. Eugster,et al.  EventJava: An Extension of Java for Event Correlation , 2009, ECOOP.

[30]  Gary T. Leavens,et al.  Translucid contracts: expressive specification and modular verification for aspect-oriented interfaces , 2011, AOSD '11.

[31]  Gary T. Leavens,et al.  Static verification of ptolemyrely programs using openJML , 2014, FOAL.

[32]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[33]  Gary T. Leavens,et al.  Specification and verification of object-oriented programs using supertype abstraction , 1995, Acta Informatica.

[34]  Albert L. Baker,et al.  Preliminary design of JML: a behavioral interface specification language for java , 2006, SOEN.

[35]  Hridesh Rajan,et al.  On exceptions, events and observer chains , 2013, AOSD.

[36]  Eric Bodden,et al.  Join point interfaces for modular reasoning in aspect-oriented programs , 2011, ESEC/FSE '11.

[37]  H. Rajan,et al.  Classpects: unifying aspect- and object-oriented language design , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[38]  Yuanfang Cai,et al.  A Preliminary Study of Quantified , Typed Events , 2010 .

[39]  Yuanfang Cai,et al.  An exploratory study of the design impact of language features for aspect-oriented interfaces , 2012, AOSD.

[40]  Eric Bodden,et al.  Join point interfaces for safe and flexible decoupling of aspects , 2014, TSEM.

[41]  Carroll Morgan Procedures, parameters, and abstraction: Separate concerns , 1988, Sci. Comput. Program..

[42]  Gary T. Leavens,et al.  Forcing behavioral subtyping through specification inheritance , 1996, Proceedings of IEEE 18th International Conference on Software Engineering.

[43]  Hridesh Rajan,et al.  Modular reasoning in the presence of event subtyping , 2015, LNCS Trans. Modul. Compos..

[44]  Zohar Manna,et al.  Verification : theory and practice : essays dedicated to Zohar Manna on the occasion of his 64th birthday , 2004 .

[45]  Patrick Th. Eugster,et al.  Bridging Java and AspectJ through explicit join points , 2007, PPPJ.

[46]  Gary T. Leavens,et al.  Behavioral Subtyping, Specification Inheritance, and Modular Reasoning , 2015, ACM Trans. Program. Lang. Syst..

[47]  Hridesh Rajan,et al.  Implicit invocation meets safe, implicit concurrency , 2010, GPCE '10.

[48]  G. Kiczales,et al.  Aspect-oriented programming and modular reasoning , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[49]  Bruno C. d. S. Oliveira,et al.  MRI: Modular reasoning about interference in incremental programming , 2012, J. Funct. Program..

[50]  Gary T. Leavens,et al.  MAO: Ownership and Effects for More Effective Reasoning About Aspects , 2007, ECOOP.

[51]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..

[52]  Robert Dyer,et al.  Preserving Separation of Concerns through Compilation , 2006 .

[53]  Gary T. Leavens,et al.  Modular verification of higher-order methods with mandatory calls specified by model programs , 2007, OOPSLA.

[54]  Frank S. de Boer,et al.  A WP-calculus for OO , 1999, FoSSaCS.

[55]  Ira R. Forman,et al.  Release-to-release binary compatibility in SOM , 1995, OOPSLA.

[56]  Neelam Soundarajan,et al.  Enforcing behavioral constraints in evolving aspect-oriented programs , 2008, FOAL.

[57]  Gary T. Leavens,et al.  Obliviousness, Modular Reasoning, and the Behavioral Subtyping Analogy , 2003 .

[58]  Wolfgang Weck,et al.  The Greybox Approach: When Blackbox Specifications Hide Too Much , 1999 .

[59]  Sophia Drossopoulou,et al.  What is Java binary compatibility? , 1998, OOPSLA '98.

[60]  D. L. Parnas,et al.  On the criteria to be used in decomposing systems into modules , 1972, Software Pioneers.

[61]  Gary T. Leavens,et al.  A design discipline and language features for modular reasoning in aspect-oriented programs , 2005 .

[62]  Jürgen Dingel,et al.  Towards a Formal Treatment of Implicit Invocation Using Rely/Guarantee Reasoning , 1998, Formal Aspects of Computing.

[63]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[64]  Gary T. Leavens,et al.  Separating Obligations of Subjects and Handlers for More Flexible Event Type Verification , 2013, SC@STAF.

[65]  Daniel M. Zimmerman,et al.  Modularizing crosscutting contracts with AspectJML , 2014, MODULARITY.

[66]  Jeannette M. Wing,et al.  A behavioral notion of subtyping , 1994, TOPL.

[67]  Yuanfang Cai,et al.  Language Features for Software Evolution and Aspect-Oriented Interfaces: An Exploratory Study , 2013, LNCS Trans. Aspect Oriented Softw. Dev..

[68]  Gunter Saake,et al.  Applying Design by Contract to Feature-Oriented Programming , 2012, FASE.