Patrick Eugster · Lukasz Ziarek e n Gary T. Leavens i Guest Editors l b u S l a n r u o Transactions on J 0 Modularity 0 8 9 S and Composition I C N L Shigeru Chiba · Mario Südholt Editors-in-Chief 123 Lecture Notes in Computer Science 9800 Commenced Publication in 1973 Founding and Former Series Editors: Gerhard Goos, Juris Hartmanis, and Jan van Leeuwen Editorial Board David Hutchison Lancaster University, Lancaster, UK Takeo Kanade Carnegie Mellon University, Pittsburgh, PA, USA Josef Kittler University of Surrey, Guildford, UK Jon M. Kleinberg Cornell University, Ithaca, NY, USA Friedemann Mattern ETH Zurich, Zurich, Switzerland John C. Mitchell Stanford University, Stanford, CA, USA Moni Naor Weizmann Institute of Science, Rehovot, Israel C. Pandu Rangan Indian Institute of Technology, Madras, India Bernhard Steffen TU Dortmund University, Dortmund, Germany Demetri Terzopoulos University of California, Los Angeles, CA, USA Doug Tygar University of California, Berkeley, CA, USA Gerhard Weikum Max Planck Institute for Informatics, Saarbrücken, Germany More information about this series at http://www.springer.com/series/15483 ü Shigeru Chiba Mario S dholt (cid:129) Patrick Eugster Lukasz Ziarek (cid:129) Gary T. Leavens (Eds.) Transactions on Modularity and Composition I 123 Editors-in-Chief ShigeruChiba Mario Südholt TheUniversity of Tokyo Écoledes Mines deNantes Tokyo Nantes Japan France GuestEditors Patrick Eugster Gary T.Leavens PurdueUniversity University of Central Florida West Lafayette, IN Orlando, FL USA USA Lukasz Ziarek SUNY at Buffalo Buffalo, NY USA ISSN 0302-9743 ISSN 1611-3349 (electronic) Lecture Notesin Computer Science ISSN 2509-761X ISSN 2509-7628(electronic) Transactions onModularity andComposition ISBN 978-3-319-46968-3 ISBN978-3-319-46969-0 (eBook) DOI 10.1007/978-3-319-46969-0 LibraryofCongressControlNumber:2016952535 ©SpringerInternationalPublishingSwitzerland2016 Chapter 7 is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/).Forfurtherdetailsseelicenseinformationinthechapter. Thisworkissubjecttocopyright.AllrightsarereservedbythePublisher,whetherthewholeorpartofthe material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storageandretrieval,electronicadaptation,computersoftware,orbysimilarordissimilarmethodologynow knownorhereafterdeveloped. Theuseofgeneraldescriptivenames,registerednames,trademarks,servicemarks,etc.inthispublication doesnotimply,evenintheabsenceofaspecificstatement,thatsuchnamesareexemptfromtherelevant protectivelawsandregulationsandthereforefreeforgeneraluse. Thepublisher,theauthorsandtheeditorsaresafetoassumethattheadviceandinformationinthisbookare believedtobetrueandaccurateatthedateofpublication.Neitherthepublishernortheauthorsortheeditors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissionsthatmayhavebeenmade. Printedonacid-freepaper ThisSpringerimprintispublishedbySpringerNature TheregisteredcompanyisSpringerInternationalPublishingAGSwitzerland Editorial WelcometothefirstvolumeoftheTransactionsonModularityandComposition.This journalisthesuccessoroftheTransactionsonAspect-OrientedSoftwareDevelopment, whichconsistedoftwelvevolumes.TheTransactionsonModularityandComposition covers not only aspect-oriented software development but a broader range of topics related to software modularity and composition. It reports research results on how to understand abstraction boundaries of software and also how to combine abstract modules for rapid, maintainable, and/or reliable software development. This first volume has two special sections. The first special section is “Aspects, Events, and Modularity” guest edited by Patrick Eugster, Mario Südholt, and Lukasz Ziarek. Event-handling systems have been independently studied but it is also known that this paradigm is strongly related to aspects and both are motivated by software modularity. This special section collects three papers tackling this issue. The second specialsectionconstitutesacollectionofthepapersselectedfromtheModularity2015 conference. These papers are journal versions of the selected papers from the confer- ence. Their original versions are available from ACM digital library. This section was guest edited by Gary T. Leavens, Research Results Program Chair of the conference. Wethanktheguesteditorsforsolicitingsubmissions,runningreviewprocesses,and collecting final versions within such a short period. We are pleased to publish these specialissuesinatimely fashion.Wealso thank theeditorial board members for their continued guidance and input on the policies of the journal, the reviewers for volun- teering a significant amountof time despite their busy schedules, and the authorswho submitted papers to the journal. May 2016 Shigeru Chiba Mario Südholt Editors-in-Chief Guest Editors’ Foreword Special Section on Aspects, Events, and Modularity There exist a number of synergies between paradigms such as implicit invocations, aspects, first-class events, asynchronous methods, as well as design and architectural patterns such as subject/observer and publish/subscribe respectively. Many of these abstractions have been used directly or indirectly to devise software systems in an event-oriented manner. The different paradigms have emerged from different com- munities, and with slightly different motivations. Concurrency and distribution are common driving forces for event-oriented design. Another motivation is software modularity. In fact, the decoupling of runtime components, which is paramount to concurrent or distributed systems, may also translate to a separation between the softwaremodulesusedtodefinetheseindividualcomponents.Withtheeverincreasing pervasiveness of reactive, concurrent, and distributed systems, the goal of this special issue is to publish novel work in the context of event-oriented software design and implementation related to any of the above paradigms. Of particular interest is work which bridges the gap between the different paradigms and motivations, and helps to clarify the relations between them. In this special section we present three papers covering topics on context-oriented software development, specifications for even- based systems, and development of modular software. May 2016 Patrick Eugster Mario Südholt Lukasz Ziarek Guest Editor’s Foreword Special Section of Selected Papers from Modularity 2015 This special section contains selected papers presented at Modularity 2015, the fourth annual conference on modularity. I had the honor to chair the conference’s “research results” Program Committee and thus to edit this special issue. The papers in this special issue were selected based on input from the conference Program Committee. Authorsoftheseselectedpaperswereinvitedtosubmitarevisedandextendedversion of their work. Each revised paper was refereed by three experts, including members of the original Program Committee when possible. As is usual, papers were revised if necessary. Thepapersinthissectionthusrepresentseveralinterestingpointsincurrentresearch on modularity. The topics covered include: software unbundling, layer activation in context-orientedprogramming,modularreasoninginevent-basedlanguagesthatallow subtyping for events, and dynamic dispatch for method contracts using abstract predicates. Manythankstotheauthorsandrefereesfortheirworkonthisspecialsection.Enjoy the papers! May 2016 Gary T. Leavens Editorial Board Mehmet Akşit University of Twente, The Netherlands Shigeru Chiba The University of Tokyo, Japan Theo D’Hondt Vrije Universiteit Brussel, Belgium Wouter Joosen Katholieke Universiteit Leuven, Belgium Shmuel Katz Technion-Israel Institute of Technology, Israel Gary T. Leavens University of Central Florida, USA Mira Mezini Darmstadt University of Technology, Germany Ana Moreira New University of Lisbon, Portugal Klaus Ostermann Universität Tübingen, Germany Awais Rashid Lancaster University, UK Mario Südholt Ecole des Mines de Nantes, France Contents Aspects, Events, and Modularity Context-Oriented Software Development with Generalized Layer Activation Mechanism. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Tetsuo Kamina, Tomoyuki Aotani, Hidehiko Masuhara, and Tetsuo Tamai Developing and Verifying Response Specifications in Hierarchical Event-Based Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Cynthia Disenfeld and Shmuel Katz Programming with Emergent Gummy Modules. . . . . . . . . . . . . . . . . . . . . . 80 Somayeh Malakuti Selected Papers from Modularity 2015 Generalized Layer Activation Mechanism for Context-Oriented Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara Modular Reasoning in the Presence of Event Subtyping. . . . . . . . . . . . . . . . 167 Mehdi Bagherzadeh, Robert Dyer, Rex D. Fernando, José Sánchez, and Hridesh Rajan Software Unbundling: Challenges and Perspectives. . . . . . . . . . . . . . . . . . . 224 João Bosco Ferreira Filho, Mathieu Acher, and Olivier Barais Dynamic Dispatch for Method Contracts Through Abstract Predicates. . . . . . 238 Wojciech Mostowski and Mattias Ulbrich Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269