PROGRAMMING LANGUAGE ABSTRACTIONS FOR EXTENSIBLE SOFTWARE COMPONENTS

With the growing demand for software systems that can cope with an increasing range of information processing tasks, the reuse of code from existing systems is essential to reduce the production costs of systems as well as the time to manufacture new software applications. For this reason, component-based software development techniques gain increasing attention in industry and research. Component technology is driven by the promise of building software by composing off-the-shelf components provided by a software component industry. Therefore, component technology emphasizes the independent development and deployment of components. Even though components look like perfect reusable assets, they embody general software solutions that need to be adapted to deploymentspecific needs and therefore cannot be deployed "as is" in general. Furthermore, as architectural building blocks, components are subject to continuous change. For these reasons, it is essential that components can easily be extended by both the component manufacturer to create new versions of components and by thirdparties that have to adapt components for use in specific software systems. Since in both cases concrete changes cannot be foreseen in general, mechanisms to integrate unanticipated extensions into components and component systems are required. While today many modern programming techniques, methodologies, and languages provide means that are well suited for creating static black-box components, the design and implementation of extensible components and extensible software systems often remains a challenge. In practice, extensibility is mostly achieved through ad-hoc techniques, like the disciplined use of design patterns and component frameworks, often in conjunction with meta-programming. The use of design patterns and component frameworks requires a rigorous coding discipline and often forces programmers to write tedious "boilerplate" code by hand, which makes this approach fragile and error-prone. Meta-programming techniques on the other hand are rather code-centric and mostly source code-based. Therefore, they are often not very suitable for today's component technology practice that stresses the binary reuse of black-box components. In this thesis I argue that technical difficulties in the development of extensible software components are due to the lack of appropriate programming language abstractions. To overcome the problems, concrete programming language mechanisms are proposed to facilitate the creation of extensible software. The proposed language features are strongly typed to help the programmer extend systems safely and consistently. The first part of the thesis illustrates the vision of truly extensible software components by proposing a simple theoretical model of first-class components built on top of a conventional class-based object-oriented language. This typed model includes a small set of primitives to dynamically build, compose, and extend software components safely, while supporting features like explicit context dependencies, late composition, unanticipated component extensibility, and strong encapsulation. The second part takes some ideas from the theoretical model and applies them in the design of the programming language Keris. Keris extends Java with an expressive module system featuring extensible modules. The main contributions are: A module system that combines the benefits of classical module systems for imperative languages with the advantages of modern component-oriented formalisms. In particular, modules are reusable, generic software components that can be linked with different cooperating modules without the need for resolving context dependencies by hand. A module composition scheme based on aggregation that makes the static architecture of a system explicit, and A type-safe mechanism for extending atomic modules aswell as fully linked systems statically by replacing selected subsystems with compatible versions without needing to re-link the full system. The extensibility mechanism is non-invasive; i.e. it preserves the original version and does not require access to source code. The overall design of the language was guided by the aim to develop a pragmatic, implementable, and conservative extension of Java which supports software development according to the open/closed principle: Systems written in Keris are closed in the sense that they can be executed, but they are open for unanticipated extensions that add, refine, or replace modules or whole subsystems. The last part of the thesis finally presents a case study which compares an extensible Java compiler implemented using mainstream object-oriented language features with one that was written in Keris. It shows how in practice, extensible modules can be used to develop extensible systems safely and efficiently.

[1]  Robin Milner,et al.  A Calculus of Mobile Processes, II , 1992, Inf. Comput..

[2]  Krzysztof Czarnecki,et al.  Generative Programming , 2001, ECOOP Workshops.

[3]  Matthias Felleisen,et al.  Units: cool modules for HOT languages , 1998, PLDI.

[4]  Martin Odersky,et al.  Colored local type inference , 2001, POPL '01.

[5]  Richard N. Taylor,et al.  A Classification and Comparison Framework for Software Architecture Description Languages , 2000, IEEE Trans. Software Eng..

[6]  Oscar Nierstrasz,et al.  Piccola - A Small Composition Language , 1999, ECOOP Workshops.

[7]  Atanas Radenski Derivation of Secure Parallel Applications by Means of Module Embedding , 2000, JMLC.

[8]  Thomas Kühne,et al.  The Translator Pattern - External Functionality with Homomorphic Mappings , 1997, TOOLS.

[9]  Mary Shaw,et al.  Software architecture - perspectives on an emerging discipline , 1996 .

[10]  C LuckhamDavid,et al.  Specification and Analysis of System Architecture Using Rapide , 1995 .

[11]  Hans H. Kron,et al.  Programming-in-the-Large Versus Programming-in-the-Small , 1975, IEEE Transactions on Software Engineering.

[12]  Hanspeter Mössenböck,et al.  The Programming Language Oberon-2 , 1991, Struct. Program..

[13]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[14]  Erik Ernst,et al.  Family Polymorphism , 2001, ECOOP.

[15]  X. Leroy The Objective Caml system release 3.09 Documentation and user''s manual , 2005 .

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

[17]  Naranker Dulay,et al.  Specifying Distributed Software Architectures , 1995, ESEC.

[18]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 2001, TOPL.

[19]  Oscar Nierstrasz,et al.  Components, Scripts and Glue , 2000 .

[20]  Matthias Zenger,et al.  KERIS: evolving software with extensible modules , 2005, J. Softw. Maintenance Res. Pract..

[21]  Mira Mezini,et al.  Modules for Crosscutting Models , 2003, Ada-Europe.

[22]  Mehdi Jazayeri,et al.  Software Architecture for Product Families: Principles and Practice , 2000 .

[23]  Davide Ancona,et al.  A Primitive Calculus for Module Systems , 1999, PPDP.

[24]  Rubén Prieto-Díaz,et al.  Status report: software reusability , 1993, IEEE Software.

[25]  Robert Bruce Findler,et al.  Modular object-oriented programming with units and mixins , 1998, ICFP '98.

[26]  Bjarne Stroustrup,et al.  The C++ programming language (2nd ed.) , 1991 .

[27]  David Notkin,et al.  ArchJava: connecting software architecture to implementation , 2002, ICSE '02.

[28]  William R. Cook,et al.  Inheritance is not subtyping , 1989, POPL '90.

[29]  Joe Armstrong,et al.  Concurrent programming in ERLANG , 1993 .

[30]  David Notkin,et al.  Using role components in implement collaboration-based designs , 1996, OOPSLA '96.

[31]  Andrew W. Appel,et al.  Hierarchical modularity , 1999, TOPL.

[32]  Oscar Nierstrasz,et al.  A formal language for composition , 2000 .

[33]  David F. Bacon,et al.  MJ: a rational module system for Java and its applications , 2003, OOPSLA 2003.

[34]  Tom Mens,et al.  Towards a taxonomy of software change , 2005, J. Softw. Maintenance Res. Pract..

[35]  Walid Taha,et al.  Multi-Stage Programming: Its Theory and Applications , 1999 .

[36]  Alexandre Bergel,et al.  Classboxes: A Minimal Module Model Supporting Local Rebinding , 2003, JMLC.

[37]  Atanas Radenski,et al.  The Subclassing Anomaly in Compiler Evolution , 2003 .

[38]  Ali Mili,et al.  Reusing Software: Issues and Research Directions , 1995, IEEE Trans. Software Eng..

[39]  Kent L. Beck,et al.  Extreme programming explained - embrace change , 1990 .

[40]  Kim B. Bruce,et al.  Modules in LOOM: Classes are not enough , 1998 .

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

[42]  Kresten Krab Thorup Genericity in Java with Virtual Types , 1997, ECOOP.

[43]  David Garlan,et al.  Acme: an architecture description interchange language , 1997, CASCON.

[44]  Douglas C. Schmidt,et al.  Double-Checked Locking An Optimization Pattern for Efficiently Initializing and Accessing Thread-safe Objects , 1998 .

[45]  Paul Hudak,et al.  Monad transformers and modular interpreters , 1995, POPL '95.

[46]  Davide Ancona,et al.  True Modules for Java-like Languages , 2001, ECOOP.

[47]  Günter Kniesel Type-Safe Delegation for Run-Time Component Adaptation , 1999, ECOOP.

[48]  João Costa Seco,et al.  A Basic Model of Typed Components , 2000, ECOOP.

[49]  Oscar Nierstrasz,et al.  Software Evolution as the Key to Productivity , 2002, RISSEF.

[50]  Ole Lehrmann Madsen,et al.  Virtual classes: a powerful mechanism in object-oriented programming , 1989, OOPSLA '89.

[51]  Nicholas Carriero,et al.  How to write parallel programs: a guide to the perplexed , 1989, CSUR.

[52]  Matthias Felleisen,et al.  Classes and mixins , 1998, POPL '98.

[53]  Martin Odersky,et al.  Extensible algebraic datatypes with defaults , 2001, ICFP '01.

[54]  Peter Sewell Modules, abstract types, and distributed versioning , 2001, POPL '01.

[55]  Brian Postow Book review: A Theory of Objects by Martin Abadi and Luca Cardelli (Springer-Verlag, 1996): Series--Monographs in Computer Science , 1999, SIGA.

[56]  Gilad Bracha,et al.  Mixins in Strongtalk , 2002 .

[57]  Martin Odersky,et al.  Pizza into Java: translating theory into practice , 1997, POPL '97.

[58]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[59]  Yannis Smaragdakis,et al.  Implementing Layered Designs with Mixin Layers , 1998, ECOOP.

[60]  Wolfgang Weck,et al.  Compound types for Java , 1998, OOPSLA '98.

[61]  Loosely Coupled Class Families , .

[62]  Urs Hölzle,et al.  Integrating Independently-Developed Components in Object-Oriented Languages , 1993, ECOOP.

[63]  Dominic Duggan,et al.  Mixin modules , 1996, ICFP '96.

[64]  John H. Reppy,et al.  Inheritance-Based Subtyping , 2002, Inf. Comput..

[65]  Luca Cardelli,et al.  Typeful Programming , 1989, Formal Description of Programming Concepts.

[66]  Andrew W. Appel,et al.  Mechanisms for secure modular programming in Java , 2003, Softw. Pract. Exp..

[67]  Jörg Kienzle,et al.  AOP: Does It Make Sense? The Case of Concurrency and Failures , 2002, ECOOP.

[68]  Tom Mens,et al.  Towards a Taxonomy of Software Evolution , 2003 .

[69]  Andrew W. Appel,et al.  Principles and a Preliminary Design for ML2000 , 2000 .

[70]  Claudio V. Russo Types for Modules , 2004, Electronic Notes in Theoretical Computer Science.

[71]  Jacques Garrigue,et al.  Code reuse through polymorphic variants , 2000 .

[72]  Ole Lehrmann Madsen,et al.  Object-oriented programming in the BETA programming language , 1993 .

[73]  M. Lillibridge Translucent Sums: A Foundation for Higher-Order Module Systems , 1997 .

[74]  Oscar Nierstrasz,et al.  APPLICATIONS = COMPONENTS + SCRIPTS A tour of Piccola , 2001 .

[75]  Charles W. Krueger,et al.  Software reuse , 1992, CSUR.

[76]  Randall B. Smith,et al.  SELF: The power of simplicity , 1987, OOPSLA '87.

[77]  Karl J. Lieberherr,et al.  Object-oriented programming: an objective sense of style , 1988, OOPSLA '88.

[78]  Xavier Leroy,et al.  Manifest types, modules, and separate compilation , 1994, POPL '94.

[79]  Vitaly Shmatikov,et al.  A Core Calculus of Classes and Mixins , 1999, ECOOP.

[80]  Tom Hirschowitz,et al.  Mixin modules in a call-by-value setting , 2002, TOPL.

[81]  John H. Reppy,et al.  Foundations for MOBY Classes , 1998 .

[82]  Luca Cardelli Type systems , 1996, CSUR.

[83]  Mira Mezini,et al.  Conquering aspects with Caesar , 2003, AOSD '03.

[84]  Alexander L. Wolf,et al.  Acm Sigsoft Software Engineering Notes Vol 17 No 4 Foundations for the Study of Software Architecture , 2022 .

[85]  David B. MacQueen Modules for standard ML , 1984, LFP '84.

[86]  Martin Odersky,et al.  A Nominal Theory of Objects with Dependent Types , 2003, ECOOP.

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

[88]  Lodewijk Bergmans,et al.  An Object-Oriented Language-Database Integration Model: The Composition-Filters Approach , 1992, ECOOP.

[89]  Mira Mezini,et al.  Adaptive plug-and-play components for evolutionary software development , 1998, OOPSLA '98.

[90]  Robert Harper,et al.  Advanced module systems: a guide for the perplexed (abstract of invited talk) , 2000, ICFP.

[91]  Clemens A. Szyperski,et al.  Import is Not Inheritance - Why We Need Both: Modules and Classes , 1992, ECOOP.

[92]  Robert J. Allen A formal approach to software architecture , 1997 .

[93]  Kim B. Bruce,et al.  Subtyping Is Not a Good "Match" for Object-Oriented Languages , 1997, ECOOP.

[94]  Matthew Flatt,et al.  Jiazzi: new-age components for old-fasioned Java , 2001, OOPSLA '01.

[95]  Professor Dr. Niklaus Wirth,et al.  Programming in Modula-2 , 1982, Springer Berlin Heidelberg.

[96]  J. Gregory Morrisett,et al.  Type-safe linking and modular assembly language , 1999, POPL '99.

[97]  Martin Odersky,et al.  Objects + Views = Components? , 2000, Abstract State Machines.

[98]  John Maloney,et al.  Back to the Future The Story of Squeak, A Practical Smalltalk Written in Itself , 1997 .

[99]  Martín Abadi,et al.  A Theory of Objects , 1996, Monographs in Computer Science.

[100]  Martin Fowler,et al.  Planning Extreme Programming , 2000 .

[101]  Ole Lehrmann Madsen,et al.  Virtual classes: a powerful mechanism in object-oriented programming , 1989, OOPSLA 1989.

[102]  Gregor Kiczales,et al.  Aspect-Oriented Programming The Fun Has Just Begun , 2002 .

[103]  William R. Cook,et al.  Mixin-based inheritance , 1990, OOPSLA/ECOOP '90.

[104]  Matthew Flatt,et al.  PLT MzScheme: Language Manual , 2000 .

[105]  Patrick Th. Eugster,et al.  On objects and events , 2001, OOPSLA '01.

[106]  Karl Lieberherr,et al.  Adaptive Object-Oriented Software: The Demeter Method with Propagation Patterns , 1995 .

[107]  Karl Crary,et al.  What is a recursive module? , 1999, PLDI '99.

[108]  Michael Philippsen,et al.  JavaParty - portables paralleles und verteiltes Programmieren in Java , 1998, Java-Informations-Tage.

[109]  Klaus Ostermann,et al.  Dynamically Composable Collaborations with Delegation Layers , 2002, ECOOP.

[110]  Massachusett Framingham,et al.  The Common Object Request Broker: Architecture and Specification Version 3 , 2003 .

[111]  Scott F. Smith,et al.  Modular Internet Programming with Cells , 2002, ECOOP.

[112]  Claudio V. Russo First-Class Structures for Standard ML , 2000, Nord. J. Comput..

[113]  Scott F. Smith,et al.  Component Assemblies and Component Runtimes , 2003 .

[114]  Klaus Pohl,et al.  Software Product Line Engineering , 2005 .

[115]  Uwe Aßmann,et al.  Invasive Software Composition , 2003, Springer Berlin Heidelberg.

[116]  Davide Ancona,et al.  A calculus of module systems , 2002, J. Funct. Program..

[117]  Stanley M. Sutton,et al.  N degrees of separation: multi-dimensional separation of concerns , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[118]  Don S. Batory,et al.  The design and implementation of hierarchical software systems with reusable components , 1992, TSEM.

[119]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[120]  Clemens A. Szyperski Independently Extensible Systems - Software Engineering Potential and Challenges , 1996 .

[121]  Craig Chambers,et al.  The cecil language: specification and rationale , 1993 .

[122]  Matthias Zenger,et al.  Evolving Software with Extensible Modules , 2002 .

[123]  John H. Reppy,et al.  The design of a class mechanism for Moby , 1999, PLDI '99.

[124]  Xiaolei Qian,et al.  Correct Architecture Refinement , 1995, IEEE Trans. Software Eng..

[125]  Mark P. Jones,et al.  Using parameterized signatures to express modular structure , 1996, POPL '96.

[126]  Ian M. Holland,et al.  Specifying Reusable Components Using Contracts , 1992, ECOOP.

[127]  Davide Ancona,et al.  A theory of mixin modules: basic and derived operators , 1998, Mathematical Structures in Computer Science.

[128]  V. Sreedhar ACOEL on CORAL A COmponent Requirement and Abstraction Language , 2001 .

[129]  Bertrand Meyer,et al.  Eiffel: The Language , 1991 .

[130]  Matthias Felleisen,et al.  Programming languages for reusable software components , 2000 .

[131]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[132]  Atsushi Igarashi,et al.  Foundations for Virtual Types , 1999, Inf. Comput..

[133]  Gary T. Leavens,et al.  MultiJava: modular open classes and symmetric multiple dispatch for Java , 2000, OOPSLA '00.

[134]  Tom Mens,et al.  A State-of-the-Art Survey on Software Merging , 2002, IEEE Trans. Software Eng..

[135]  Kim B. Bruce Safe Static Type Checking With Systems of Mutually Recursive Classes and Inheritance , 1997 .

[136]  Viviana Bono,et al.  Coordinating Mobile Object-Oriented Code , 2002, COORDINATION.

[137]  Akira Tanaka,et al.  Difference-Based Modules: A Class-Independent Module Mechanism , 2002, ECOOP.

[138]  John C. Mitchell,et al.  An extension of standard ML modules with subtyping and inheritance , 1991, POPL '91.

[139]  Andreas Ruping Modules In Object-Oriented Systems , 1994 .

[140]  Mads Torgersen Virtual types are statically safe , 1998 .

[141]  Martin Odersky,et al.  Implementing Extensible Compilers , 2001 .

[142]  C. M. Sperberg-McQueen,et al.  eXtensible Markup Language (XML) 1.0 (Second Edition) , 2000 .

[143]  Jens Palsberg,et al.  The essence of the Visitor pattern , 1998, Proceedings. The Twenty-Second Annual International Computer Software and Applications Conference (Compsac '98) (Cat. No.98CB 36241).

[144]  Frantisek Plasil,et al.  SOFA/DCUP: architecture for component trading and dynamic updating , 1998, Proceedings. Fourth International Conference on Configurable Distributed Systems (Cat. No.98EX159).

[145]  Oren Gross,et al.  Five degrees of separation , 2006 .

[146]  Gilad Bracha,et al.  Modularity meets inheritance , 1992, Proceedings of the 1992 International Conference on Computer Languages.

[147]  Gilad Bracha,et al.  The programming language jigsaw: mixins, modularity and multiple inheritance , 1992 .

[148]  Xavier Leroy,et al.  A modular module system , 2000, J. Funct. Program..

[149]  Simon L. Peyton Jones,et al.  The Implementation of Functional Programming Languages , 1987 .

[150]  Luca Cardelli,et al.  Modula-3 language definition , 1992, SIGP.

[151]  Mark Lillibridge,et al.  A type-theoretic approach to higher-order modules with sharing , 1994, POPL '94.

[152]  Luca Cardelli,et al.  Abstract Types and the Dot Notation , 1990, Programming Concepts and Methods.

[153]  Michael Philippsen,et al.  JavaParty – transparent remote objects in Java , 1997 .

[154]  Stephan Herrmann,et al.  Object Teams: Improving Modularity for Crosscutting Collaborations , 2002, NetObjectDays.

[155]  Wolfgang Weck,et al.  Generic Wrappers , 2000, ECOOP.

[156]  Erik Ernst,et al.  Higher-Order Hierarchies , 2003, ECOOP.

[157]  Jan Bosch,et al.  Evolution of Software Product Families , 2000, IW-SAPF.

[158]  Michael R. Clarkson,et al.  Polyglot: An Extensible Compiler Framework for Java , 2003, CC.

[159]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[160]  Lodewijk Bergmans,et al.  Composing crosscutting concerns using composition filters , 2001, CACM.

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

[162]  Karl J. Lieberherr,et al.  Assuring good style for object-oriented programs , 1989, IEEE Software.

[163]  Yves ROUDIER,et al.  Mixin Composition Strategies for the Modular Implementation of Aspect Weaving the Epp Preprocessor and Its Module Description Language Ld-2 , 1998 .

[164]  Jeremy Manson,et al.  JSR-133: Java Memory Model and Thread Specification , 2003 .

[165]  Ian M. Holland,et al.  Tools for preventive software maintenance , 1989, Proceedings. Conference on Software Maintenance - 1989.

[166]  Kim Mens,et al.  Vrije Universiteit Brussel Faculteit Wetenschappen Reuse Contracts: Managing the Evolution of Reusable Assets Reuse Contracts: Managing the Evolution of Reusable Assets , 2022 .

[167]  Jeremy Manson A New Approach to the Semantics of Multithreaded Java , 2003 .

[168]  Leaf Petersen A Module System for LOOM , 1997 .

[169]  Matthias Felleisen,et al.  Synthesizing Object-Oriented and Functional Design to Promote Re-Use , 1998, ECOOP.

[170]  Erik Ernst gbeta - a Language with Virtual Attributes, Block Structure, and Propagating, Dynamic Inheritance , 2000 .

[171]  William R. Cook,et al.  Object-Oriented Programming Versus Abstract Data Types , 1990, REX Workshop.

[172]  Matthias Zenger,et al.  Type-Safe Prototype-Based Component Evolution , 2002, ECOOP.

[173]  David Notkin,et al.  Architectural Reasoning in ArchJava , 2002, ECOOP.

[174]  Clemens A. Szyperski,et al.  Component software - beyond object-oriented programming , 2002 .

[175]  David Garlan,et al.  Exploiting style in architectural design environments , 1994, SIGSOFT '94.

[176]  David H. Lorenz,et al.  Coupling Aspect-Oriented and Adaptive Programming , 2004 .

[177]  Matthew Flatt,et al.  Mixing COP and OOP , 2001 .

[178]  David Garlan,et al.  A Formal Approach to Software Architectures , 1992, IFIP Congress.

[179]  Harold Ossher,et al.  Subject-oriented programming: a critique of pure objects , 1993, OOPSLA '93.

[180]  Mira Mezini,et al.  Integrating independent components with on-demand remodularization , 2002, OOPSLA '02.

[181]  Bertrand Meyer,et al.  Object-Oriented Software Construction, 2nd Edition , 1997 .

[182]  Mira Mezini,et al.  Component Integration with Pluggable Composite Adapters , 2002 .

[183]  Cédric Fournet,et al.  The reflexive CHAM and the join-calculus , 1996, POPL '96.

[184]  Sanjiva Weerawarana,et al.  Bean Markup Language: A Composition Language for JavaBeans Components , 2001, COOTS.

[185]  Martin Odersky,et al.  Making the future safe for the past: adding genericity to the Java programming language , 1998, OOPSLA '98.

[186]  Atanas Radenski,et al.  Anomaly-free component adaptation with class overriding , 2004, J. Syst. Softw..

[187]  Guy L. Steele,et al.  Java Language Specification, Second Edition: The Java Series , 2000 .

[188]  David Lorge Parnas,et al.  On the Design and Development of Program Families , 2001, IEEE Transactions on Software Engineering.

[189]  Klaus Ostermann Implementing Reusable Collaborations with Delegation Layers , 2001 .