Supporting Component-Based Software Development with Active Component Repository Systems

Total Page:16

File Type:pdf, Size:1020Kb

Supporting Component-Based Software Development with Active Component Repository Systems Supporting Component-Based Software Development with Active Component Repository Systems by Yunwen Ye B.Sc., Fudan University, China, 1987 M.S., Fudan University, China, 1990 A thesis submitted to the Faculty of the Graduate School of the University of Colorado in partial fulfillment of the requirements for the degree of Doctor of Philosophy Department of Computer Science 2001 This thesis entitled: Supporting Component-Based Software Development with Active Component Repository Systems written by Yunwen Ye has been approved for the Department of Computer Science Gerhard Fischer James Martin Date The final copy of this thesis has been examined by the signatories, and we find that both the content and the form meet acceptable presentation standards of scholarly work in the above mentioned discipline. Ye, Yunwen (Ph.D., Computer Science) Supporting Component-Based Software Development with Active Component Repository Sys- tems Thesis directed by Prof. Gerhard Fischer It is widely believed and empirically proven that component reuse improves both the quality and productivity of software development. Before software components are reused, however, they must be located. Component repository systems provide a means to locate soft- ware components. Current component repository systems are designed to support the paradigm of development-with-reuse, which views reuse as a process independent of the whole software development process and relies on programmers to take the reuse initiative. Such systems fall short in supporting programmers who make no attempt to reuse because they do not know the existence of reusable components or they perceive reuse costs more than programming from scratch. This dissertation advocates a paradigm shift from development-with-reuse to reuse-within- development, which views reuse as an integral part of software development, and component repository systems as information systems that augment programmers’ insufficient knowledge about reusable components and assist them in accomplishing their tasks. Active component repository systems—component repository systems equipped with active information delivery mechanisms—support reuse-within-development. They can be seamlessly integrated with pro- gramming environments. Through this integration, their active information delivery mechanism delivers task-relevant and user-specific components, without being given explicit reuse queries, to help programmers reuse unknown components and to reduce the cost of reuse. An active component repository system, CodeBroker, has been developed and evaluated. CodeBroker runs continuously in the background of a programming environment and infers programmers’ needs for reusable components by monitoring their interactions with the environ- iv ment. Potentially reusable components that match reuse queries extracted from comments and signatures in the programming environment are autonomously located and actively delivered to programmers. Formal evaluations of the CodeBroker system have indicated that it motivated programmers to reuse once relevant components were delivered, and that it was able to deliver components relevant to both the task and the background knowledge of programmers. Acknowledgments I feel very fortunate that my employer, Software Research Associates, Inc. (SRA), Tokyo, Japan, provided me the time and financial support to complete this research. In par- ticular, I thank Kouichi Kishida, executive vice president and technical director of SRA, for his lasting support and encouragement, without which I could not have finished this research. Yoshitaka Matsumura, Kaoru Hayashi, and Yoshikazu Hayashi have been excellent managers who have gone to great lengths to provide the best conditions for me to complete my research. I also want to thank my colleague Tomohiro Oda for his help. I am grateful to the members of my thesis committee. Gerhard Fischer, my advisor, is simply the best advisor I could have found. His conceptual frameworks on Domain-Oriented Design Environments and on learning have provided the foundations for this research. Without his excellent skills in challenging my ideas and motivating me to think deeper, I could not have finished the research in this manner. Kumiyo Nakakoji, my mentor and role model, has provided immeasurable support, both emotionally and intellectually. She has been always there when I needed help. Brent Reeves has spent much time patiently listening to my sometimes rough ideas and reading my immature manuscripts, and has provided frank, yet friendly, critical feedback. His constructive criticism has been invaluable in guiding me to frame the research problem, prioritize my resources, and present my ideas clearly. The support from other members of my thesis committee, Ken Anderson, James Martin, and Walter Kintsch helped me to clarify my understanding, and their input is very much appreciated. In particular, I thank James Martin for his excellent course on Natural Language Processing, which introduced me to the research field vi of information retrieval. That was one of the best courses I have ever taken. Members of Center for LifeLong Learning and Design have been very supportive. I thank Taro Adachi for numerous, wide-ranging discussions that I have greatly enjoyed over the years. Jonathan Ostwald generously offered many times to listen to my thoughts and read my writings. His encouragement and feedback is greatly appreciated. I was extremely delighted to have as an officemate Eric Scharff, who had an answer to every computer problem I had, no matter whether it was a Mac, Windows or Linux problem. Many discussions with Rogerio de Paula helped me structure my thoughts. I thank Gerry Stahl, Hal Eden, Andy Gorman, and Francesca Iovine for their support. Finally, I would like to thank my family members. I thank my parents, who have taught me the joy of learning and have always urged me to do my best. I thank my eldest daughter, Hanlu, for understanding when she had to spend many weekends being bored because dad had to work, and my 5-month-old daughter, Hanlei, for her innocent and sweet smiles which provided the best comfort after a day’s hard work. Most of all, I wholeheartedly acknowledge the endless love, understanding, and support that my wife, Yonghong Pan, has given to me. In particular, I thank her for her unabated confidence in me, which has cheered me greatly at times of frustration. Contents Chapter 1 Introduction 1 1.1 Motivation . 1 1.2 Goal of the Research . 3 1.3 Active Component Repository Systems . 6 1.4 The CodeBroker System . 7 1.5 Organization of the Dissertation . 9 2 Roles of Reusable Components in Programming 11 2.1 A Process Model of Programming . 11 2.2 Programming Knowledge . 13 2.3 Opportunistic Programming . 17 2.4 Benefits of Software Components in Programming . 19 3 Challenges of Software Reuse 22 3.1 Overview of Software Reuse . 22 3.2 General Issues of Component Reuse . 25 3.3 Creating Reusable Components . 29 3.4 Understanding the Cognitive Difficulties of Component Reuse . 32 4 The Component Locating Problem 40 4.1 No Attempt to Reuse . 40 viii 4.2 Paradigm Shift: From Development-with-Reuse to Reuse-within-Development 46 4.3 Information-Enriched Workspaces . 49 4.4 Active Component Repository Systems . 51 5 Active Information Systems 55 5.1 Basic Issues of Active Information Systems . 55 5.2 Acquiring Information of User Tasks . 59 5.3 Personalizing Information Delivery . 73 5.4 Dealing with Partial, Imprecise Queries . 75 5.5 Comparing Active Information Systems with an Example in the Real World . 78 5.6 The Spectrum of Support for Locating Information . 79 6 Indexing and Retrieval Mechanisms in CodeBroker 82 6.1 Indexing and Retrieval Mechanisms . 83 6.2 Creating the Component Repository . 94 7 Locating and Delivering Components in CodeBroker 99 7.1 System Architecture . 99 7.2 Listener . 100 7.3 Fetcher . 103 7.4 Presenter . 105 7.5 The Retrieval-by-Reformulation Mechanism . 113 7.6 Summary of CodeBroker . 117 8 Evaluations of CodeBroker 119 8.1 Evaluating the Retrieval Mechanisms . 120 8.2 Empirical Evaluations of the CodeBroker System . 123 8.3 Findings about the Usage of CodeBroker . 128 8.4 Other Findings about Programming in General . 139 ix 8.5 Problems of CodeBroker and Needed Improvements . 143 8.6 Summary of Evaluations . 147 9 Related Work 149 9.1 Active Information Systems . 149 9.2 Component Repository Systems . 151 9.3 Intelligent Programming Environments . 154 10 Future Work and Conclusions 155 10.1 Future Work . 155 10.2 Summary . 157 10.3 Contributions . 159 Bibliography 161 Appendix A The List of Queries and Relevant Components 173 B Questions Asked in the Post-Experiment Interview 176 C Abbreviations 178 D Glossary 179 x Tables Table 1.1 The rapid growth of the Java Core API library . 2 4.1 Relations between reuse mode, knowledge sources, and tool support . 54 5.1 A comparison between plan recognition and similarity analysis . 66 8.1 Average precision and recall values for LSA, Mixed (average of LSA and Okapi), and Okapi . 122 8.2 Programming knowledge and expertise of subjects . 125 8.3 Overall results of evaluation experiments with programmers . 129 8.4 Subjective evaluations of the CodeBroker system . 130 8.5 Experiment data regarding user models . 136 8.6 Experiment data about discourse models . 137 Figures Figure 1.1 The location-comprehension-modification process of reusing components . 3 1.2 Software reuse failure modes . 4 1.3 Overview of CodeBroker . 9 2.1 The process model of programming . 14 2.2 A program and its program plans . 16 2.3 Orthogonality between program plans and software components . 17 2.4 The role of components in problem framing . 21 3.1 A cognitive model of the component reuse process . 34 4.1 Different levels of programmers’ knowledge about a component repository . 42 4.2 The development-with-reuse paradigm . 47 4.3 The reuse-within-development paradigm . 50 5.1 Feedforward information delivery . 57 5.2 Autocompletion in Internet Explorer . 57 5.3 Feedback information delivery . 58 5.4 Two assumptions of similarity analysis .
Recommended publications
  • Advancing Automatic Programming: Regeneration, Meta-Circularity, and Two-Sided Interfaces
    SOFTNET 2019 Advancing Automatic Programming: Regeneration, Meta-circularity, and Two-Sided Interfaces HERWIGMANNAERT NOVEMBER 2 7 , 2 0 1 9 • Automatic Programming • Toward Automatic Regeneration • Creating Meta-Circular Regeneration • On Meta-Programming Interfaces ADVANCING AUTOMATIC PROGRAMMING • Concluding Facts and Thoughts Overview • Questions and Discussion • Automatic Programming • Concept and Trends • Remaining Challenges • Toward Automatic Regeneration ADVANCING AUTOMATIC PROGRAMMING • Creating Meta-Circular Regeneration • On Meta-Programming Interfaces Overview • Concluding Facts and Thoughts • Questions and Discussion Automatic Programming • Automatic programming: • The act of automatically generating source code from a model or template • Sometimes distinguished from code generation, as performed by a compiler • Has always been a euphemism for programming in a higher-level language than was then available to the programmer [David Parnas] • Also referred to a generative or meta-programming • To manufacture software components in an automated way • It is as old as programming itself: System.out.println(“Hello world.”); System.out.println(“System.out.println(\“Hello world.\”);”); The Need for Automatic Programming • Goal is and has always been to improve programmer productivity • In general, to manufacture software components in an automated way, in the same way as automation in the industrial revolution, would: • Increase programming productivity • Consolidate programming knowledge • Eliminate human programming errors • Such
    [Show full text]
  • New Inheritance Models That Facilitate Source Code Reuse in Object-Oriented Programming
    NEW INHERITANCE MODELS THAT FACILITATE SOURCE CODE REUSE IN OBJECT- ORIENTED PROGRAMMING By HISHAM M. AL-HADDAD Bachelor of Science Yarmouk University lrbid, Jordan 1986 Master of Science Northrop University Los Angeles, California 1988 Submitted to the Faculty of the Graduate College of the Oklahoma State University in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY July, 1992 Oklahoma Statt.' Ur1iv. Library NEW INHERITANCE MODELS THAT FACILITATE SOURCE CODE REUSE IN OBJECT- ORIENTED PROGRAMMING C/ wU::r-~ B I A~c;p .... _.-~ Dean of the Graduate CoUege ii PREFACE Code reusability is a primary objective in the development of software systems. The object-oriented programming methodology is one of the areas that facilitate the development of software systems by allowing and promoting code reuse and modular designs. Object-oriented programming languages (OOPLs) provide different facilities to attain efficient reuse and reliable extension of existing software components. Inheritance is an important language feature that is conducive to reusability and extensibility. Various OOPLs provide different inheritance models based on different interpretations of the inheritance notion. Therefore, OOPLs have different characteristics derived from their respective inheritance models. This dissertation is concerned with solutions for three major problems that limit the utilization of inheritance for code reusability. The range of object-oriented applications and thus the usage of object-oriented programming in general is also discussed. The three major problems are: 1) the relationship between inheritance and other related issues such as encapsulation, access techniques, visibility of inheritance, and subtyping; 2) the hierarchical structure imposed by inheritance among classes; and 3) the accessibility of previous versions of the modified methods defmed in classes located at higher levels of the inheritance structure than the parent classes.
    [Show full text]
  • Turing's Influence on Programming — Book Extract from “The Dawn of Software Engineering: from Turing to Dijkstra”
    Turing's Influence on Programming | Book extract from \The Dawn of Software Engineering: from Turing to Dijkstra" Edgar G. Daylight∗ Eindhoven University of Technology, The Netherlands [email protected] Abstract Turing's involvement with computer building was popularized in the 1970s and later. Most notable are the books by Brian Randell (1973), Andrew Hodges (1983), and Martin Davis (2000). A central question is whether John von Neumann was influenced by Turing's 1936 paper when he helped build the EDVAC machine, even though he never cited Turing's work. This question remains unsettled up till this day. As remarked by Charles Petzold, one standard history barely mentions Turing, while the other, written by a logician, makes Turing a key player. Contrast these observations then with the fact that Turing's 1936 paper was cited and heavily discussed in 1959 among computer programmers. In 1966, the first Turing award was given to a programmer, not a computer builder, as were several subsequent Turing awards. An historical investigation of Turing's influence on computing, presented here, shows that Turing's 1936 notion of universality became increasingly relevant among programmers during the 1950s. The central thesis of this paper states that Turing's in- fluence was felt more in programming after his death than in computer building during the 1940s. 1 Introduction Many people today are led to believe that Turing is the father of the computer, the father of our digital society, as also the following praise for Martin Davis's bestseller The Universal Computer: The Road from Leibniz to Turing1 suggests: At last, a book about the origin of the computer that goes to the heart of the story: the human struggle for logic and truth.
    [Show full text]
  • Model Based Software Development: Issues & Challenges
    Model Based Software Development: Issues & Challenges N Md Jubair Basha 1, Salman Abdul Moiz 2 & Mohammed Rizwanullah 3 1&3 IT Department, Muffakham Jah College of Engineering & Technology, Hyderabad, India 2IT Department, MVSR Engineering College, Hyderabad, India E-mail : [email protected] 1, [email protected] 2, [email protected] 3 Abstract - One of the goals of software design is to model a system in such a way that it is easily understandable . Nowadays the tendency for software development is changing from manual coding to automatic code generation; it is becoming model-based. This is a response to the software crisis, in which the cost of hardware has decreased and conversely the cost of software development has increased sharply. The methodologies that allowed this change are model-based, thus relieving the human from detailed coding. Still there is a long way to achieve this goal, but work is being done worldwide to achieve this objective. This paper presents the drastic changes related to modeling and important challenging issues and techniques that recur in MBSD. Keywords - model based software; domain engineering; domain specificity; transformations. I. INTRODUCTION domain engineering and application. The system described by a model may or may not exist at the time Model is an abstraction of some aspect of a system. the model is created. Models are created to serve Model-based software and system design is based on the particular purposes, for example, to present a human end-to-end use of formal, composable and manipulable understandable description of some aspect of a system models in the product life-cycle.
    [Show full text]
  • Generic Programming
    Generic Programming July 21, 1998 A Dagstuhl Seminar on the topic of Generic Programming was held April 27– May 1, 1998, with forty seven participants from ten countries. During the meeting there were thirty seven lectures, a panel session, and several problem sessions. The outcomes of the meeting include • A collection of abstracts of the lectures, made publicly available via this booklet and a web site at http://www-ca.informatik.uni-tuebingen.de/dagstuhl/gpdag.html. • Plans for a proceedings volume of papers submitted after the seminar that present (possibly extended) discussions of the topics covered in the lectures, problem sessions, and the panel session. • A list of generic programming projects and open problems, which will be maintained publicly on the World Wide Web at http://www-ca.informatik.uni-tuebingen.de/people/musser/gp/pop/index.html http://www.cs.rpi.edu/˜musser/gp/pop/index.html. 1 Contents 1 Motivation 3 2 Standards Panel 4 3 Lectures 4 3.1 Foundations and Methodology Comparisons ........ 4 Fundamentals of Generic Programming.................. 4 Jim Dehnert and Alex Stepanov Automatic Program Specialization by Partial Evaluation........ 4 Robert Gl¨uck Evaluating Generic Programming in Practice............... 6 Mehdi Jazayeri Polytypic Programming........................... 6 Johan Jeuring Recasting Algorithms As Objects: AnAlternativetoIterators . 7 Murali Sitaraman Using Genericity to Improve OO Designs................. 8 Karsten Weihe Inheritance, Genericity, and Class Hierarchies.............. 8 Wolf Zimmermann 3.2 Programming Methodology ................... 9 Hierarchical Iterators and Algorithms................... 9 Matt Austern Generic Programming in C++: Matrix Case Study........... 9 Krzysztof Czarnecki Generative Programming: Beyond Generic Programming........ 10 Ulrich Eisenecker Generic Programming Using Adaptive and Aspect-Oriented Programming .
    [Show full text]
  • Code Reuse and Refactoring: Going Agile on Complex Products
    Code Reuse and Refactoring: Going Agile on Complex Products Using enterprise Software Version Management to coordinate complex products, seamlessly support Git developers, and solve refactoring problems. Table of Contents Component-Based Development __________________________________________________ 1 CBD Product Model ______________________________________________________________ 1 The Repository Model ____________________________________________________________ 2 Managing CBD in Git _____________________________________________________________ 2 Setting Up the CBD Model _____________________________________________________ 2 Incorporating Non-Software Components ____________________________________ 3 Updating Component Baselines ________________________________________________ 3 Submitting Patches to Components _____________________________________________ 4 Developer View _______________________________________________________________ 4 Refactoring: In Practice ________________________________________________________ 4 Refactoring: Developer Impact _________________________________________________ 4 Managing CBD in Perforce Software Version Management and Perforce Git Fusion ______ 5 Setting Up the CBD Model _____________________________________________________ 5 Incorporating Non-Software Components ____________________________________ 5 Updating Component Baselines ________________________________________________ 5 Submitting Patches to Components _____________________________________________ 5 Developer View _______________________________________________________________
    [Show full text]
  • A Model of Inheritance for Declarative Visual Programming Languages
    An Abstract Of The Dissertation Of Rebecca Djang for the degree of Doctor of Philosophy in Computer Science presented on December 17, 1998. Title: Similarity Inheritance: A Model of Inheritance for Declarative Visual Programming Languages. Abstract approved: Margaret M. Burnett Declarative visual programming languages (VPLs), including spreadsheets, make up a large portion of both research and commercial VPLs. Spreadsheets in particular enjoy a wide audience, including end users. Unfortunately, spreadsheets and most other declarative VPLs still suffer from some of the problems that have been solved in other languages, such as ad-hoc (cut-and-paste) reuse of code which has been remedied in object-oriented languages, for example, through the code-reuse mechanism of inheritance. We believe spreadsheets and other declarative VPLs can benefit from the addition of an inheritance-like mechanism for fine-grained code reuse. This dissertation first examines the opportunities for supporting reuse inherent in declarative VPLs, and then introduces similarity inheritance and describes a prototype of this model in the research spreadsheet language Forms/3. Similarity inheritance is very flexible, allowing multiple granularities of code sharing and even mutual inheritance; it includes explicit representations of inherited code and all sharing relationships, and it subsumes the current spreadsheet mechanisms for formula propagation, providing a gradual migration from simple formula reuse to more sophisticated uses of inheritance among objects. Since the inheritance model separates inheritance from types, we investigate what notion of types is appropriate to support reuse of functions on different types (operation polymorphism). Because it is important to us that immediate feedback, which is characteristic of many VPLs, be preserved, including feedback with respect to type errors, we introduce a model of types suitable for static type inference in the presence of operation polymorphism with similarity inheritance.
    [Show full text]
  • Beginning SOLID Principles and Design Patterns for ASP.NET Developers — Bipin Joshi Beginning SOLID Principles and Design Patterns for ASP.NET Developers
    THE EXPERT’S VOICE® IN .NET DEVELOPMENT Beginning SOLID Principles and Design Patterns for ASP.NET Developers — Bipin Joshi Beginning SOLID Principles and Design Patterns for ASP.NET Developers Bipin Joshi Beginning SOLID Principles and Design Patterns for ASP.NET Developers Bipin Joshi 301 Pitruchhaya Thane, India ISBN-13 (pbk): 978-1-4842-1847-1 ISBN-13 (electronic): 978-1-4842-1848-8 DOI 10.1007/978-1-4842-1848-8 Library of Congress Control Number: 2016937316 Copyright © 2016 by Bipin Joshi This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the 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 storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Exempted from this legal reservation are brief excerpts in connection with reviews or scholarly analysis or material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the work. Duplication of this publication or parts thereof is permitted only under the provisions of the Copyright Law of the Publisher's location, in its current version, and permission for use must always be obtained from Springer. Permissions for use may be obtained through RightsLink at the Copyright Clearance Center. Violations are liable to prosecution under the respective Copyright Law. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
    [Show full text]
  • Software Reusability: Approaches and Challenges
    International Journal of Research and Innovation in Applied Science (IJRIAS) |Volume VI, Issue V, May 2021|ISSN 2454-6194 Software Reusability: Approaches and Challenges Moko Anasuodei1, Ojekudo, Nathaniel Akpofure2 1Department of Computer Science and Informatics, Faculty of Science, Federal University Otuoke, Nigeria 2Department of Computer Science, Faculty of Natural and Applied Sciences, Ignatius Ajuru University of Education, Nigeria Abstract: Software reuse is used to aid the software phases. Software engineering has been more centered on development process which in recent times can improve the original development which gives an optimal software at a resulting quality and productivity of software development, by faster and less costly price, a design process based on assisting software engineers throughout various software systemic reusable is now recognized. engineering phases to enhance the quality of software, provide quick turnaround time for software development using few Software reuse reduces efforts and cost, because software people, tools, and methods, which creates a good software development costs can be extremely high, but they are quality by enhancing integration of the software system to shared, such that the cost of reuse can be extremely low. provide a competitive advantage. This paper examines the One major advantage of software reuse suggested by concept of software reuse, the approaches to be considered for keswani et al (2014) explains that there is a significant need software reuse, which is broadly shared into three categories: component-based software reuse, domain engineering and for the number of bugs to be reduced during software software product lines, architecture-based software reuse and development process, such that instead of developing an challenges that affect the software reuse development process.
    [Show full text]
  • Using Recursive Java Generics to Support Code Reuse in the CS2 Course
    Using Recursive Java Generics to Support Code Reuse in the CS2 Course J. Andrew Holey and Lynn R. Ziegler Department of Computer Science Saint John’s University and the College of Saint Benedict Collegeville, Minnesota 56321 [email protected] and [email protected] Abstract Showing students examples of code reuse in early Java programming courses is highly desirable, but one significant class of examples, linked data structures, is difficult to reuse and leads to frequent casting. We show a technique for using recursive generic parameters that significantly simplifies the inheritance of linked data structures, and we discuss the use of this technique in the CS2 course. 1 Introduction Java is well-established as the most frequently-used language in the first two programming courses at colleges and universities (CS1 and CS2). While there is serious and well-founded debate about whether other languages may be more appropriate for an introductory programming sequence at the college level, many computer science faculty members have become comfortable with using Java in these courses and are able to teach programming and problem-solving very effectively using this language. One of the advantages of using object-oriented languages like Java for teaching introductory programming is their support for the construction of abstract data types (ADTs). This support was enhanced in Java 5.0 with the introduction of generics. Libraries like the Java Collection Framework have reduced the emphasis on construction of ADTs in many CS2 courses, but most textbooks and instructors still choose to spend considerable time on the implementation of ADTs. It is now possible to guide students to produce simple and elegant implementations of the standards ADTs, including stacks, queues, various types of lists and trees, maps and even graphs.
    [Show full text]
  • E.W. Dijkstra Archive: on the Cruelty of Really Teaching Computing Science
    On the cruelty of really teaching computing science Edsger W. Dijkstra. (EWD1036) http://www.cs.utexas.edu/users/EWD/ewd10xx/EWD1036.PDF The second part of this talk pursues some of the scientific and educational consequences of the assumption that computers represent a radical novelty. In order to give this assumption clear contents, we have to be much more precise as to what we mean in this context by the adjective "radical". We shall do so in the first part of this talk, in which we shall furthermore supply evidence in support of our assumption. The usual way in which we plan today for tomorrow is in yesterday’s vocabulary. We do so, because we try to get away with the concepts we are familiar with and that have acquired their meanings in our past experience. Of course, the words and the concepts don’t quite fit because our future differs from our past, but then we stretch them a little bit. Linguists are quite familiar with the phenomenon that the meanings of words evolve over time, but also know that this is a slow and gradual process. It is the most common way of trying to cope with novelty: by means of metaphors and analogies we try to link the new to the old, the novel to the familiar. Under sufficiently slow and gradual change, it works reasonably well; in the case of a sharp discontinuity, however, the method breaks down: though we may glorify it with the name "common sense", our past experience is no longer relevant, the analogies become too shallow, and the metaphors become more misleading than illuminating.
    [Show full text]
  • A Foundation for Trait-Based Metaprogramming
    A foundation for trait-based metaprogramming John Reppy Aaron Turon University of Chicago {jhr, adrassi}@cs.uchicago.edu Abstract We present a calculus, based on the Fisher-Reppy polymorphic Scharli¨ et al. introduced traits as reusable units of behavior inde- trait calculus [FR03], with support for trait privacy, hiding and deep pendent of the inheritance hierarchy. Despite their relative simplic- renaming of trait methods, and a more granular trait typing. Our ity, traits offer a surprisingly rich calculus. Trait calculi typically in- calculus is more expressive (it provides new forms of conflict- clude operations for resolving conflicts when composing two traits. resolution) and more flexible (it allows after-the-fact renaming) In the existing work on traits, these operations (method exclusion than the previous work. Traits provide a useful mechanism for shar- and aliasing) are shallow, i.e., they have no effect on the body of the ing code between otherwise unrelated classes. By adding deep re- other methods in the trait. In this paper, we present a new trait sys- naming, our trait calculus supports sharing code between methods. tem, based on the Fisher-Reppy trait calculus, that adds deep oper- For example, the JAVA notion of synchronized methods can im- ations (method hiding and renaming) to support conflict resolution. plemented as a trait in our system and can be applied to multiple The proposed operations are deep in the sense that they preserve methods in the same class to produce synchronized versions. We any existing connections between the affected method and the other term this new use of traits trait-based metaprogramming.
    [Show full text]