Successful Lisp - Contents

Total Page:16

File Type:pdf, Size:1020Kb

Successful Lisp - Contents Successful Lisp - Contents Table of Contents ● About the Author ● About the Book ● Dedication ● Credits ● Copyright ● Acknowledgments ● Foreword ● Introduction 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 Appendix A ● Chapter 1 - Why Bother? Or: Objections Answered Chapter objective: Describe the most common objections to Lisp, and answer each with advice on state-of-the-art implementations and previews of what this book will explain. ❍ I looked at Lisp before, and didn't understand it. ❍ I can't see the program for the parentheses. ❍ Lisp is very slow compared to my favorite language. ❍ No one else writes programs in Lisp. ❍ Lisp doesn't let me use graphical interfaces. ❍ I can't call other people's code from Lisp. ❍ Lisp's garbage collector causes unpredictable pauses when my program runs. ❍ Lisp is a huge language. ❍ Lisp is only for artificial intelligence research. ❍ Lisp doesn't have any good programming tools. ❍ Lisp uses too much memory. ❍ Lisp uses too much disk space. ❍ I can't find a good Lisp compiler. ● Chapter 2 - Is this Book for Me? Chapter objective: Describe how this book will benefit the reader, with specific examples and references to chapter contents. ❍ The Professional Programmer http://psg.com/~dlamkins/sl/contents.html (1 of 13)11/3/2006 5:46:04 PM Successful Lisp - Contents ❍ The Student ❍ The Hobbyist ❍ The Former Lisp Acquaintance ❍ The Curious ● Chapter 3 - Essential Lisp in Twelve Lessons Chapter objective: Explain Lisp in its simplest form, without worrying about the special cases that can confuse beginners. ❍ Lesson 1 - Essential Syntax ■ Lists are surrounded by parentheses ■ Atoms are separated by whitespace or parentheses ❍ Lesson 2 - Essential Evaluation ■ A form is meant to be evaluated ■ A function is applied to its arguments ■ A function can return any number of values ■ Arguments are usually not modified by a function ■ Arguments are usually evaluated before function application ■ Arguments are evaluated in left-to-right order ■ Special forms and macros change argument evaluation ❍ Lesson 3 - Some Examples of Special Forms and Macros ■ SETQ ■ LET ■ COND ■ QUOTE ❍ Lesson 4 - Putting things together, and taking them apart ■ CONS ■ LIST ■ FIRST and REST ❍ Lesson 5 - Naming and Identity ■ A symbol is just a name ■ A symbol is always unique ■ A symbol can name a value ■ A value can have more than one name ❍ Lesson 6 - Binding versus Assignment ■ Binding creates a new place to hold a value ■ Bindings have names ■ A binding can have different values at the same time ■ One binding is innermost ■ The program can only access bindings it creates ■ Assignment gives an old place a new value http://psg.com/~dlamkins/sl/contents.html (2 of 13)11/3/2006 5:46:04 PM Successful Lisp - Contents ❍ Lesson 7 - Essential Function Definition ■ DEFUN defines named functions ■ LAMBDA defines anonymous functions ❍ Lesson 8 - Essential Macro Definition ■ DEFMACRO defines named macros ■ Macros return a form, not values ❍ Lesson 9 - Essential Multiple Values ■ Most forms create only one value ■ VALUES creates multiple (or no) values ■ A few special forms receive multiple values ■ Some forms pass along multiple values ❍ Lesson 10 - A Preview of Other Data Types ■ Lisp almost always does the right thing with numbers ■ Characters give Lisp something to read and write ■ Arrays organize data into tables ■ Vectors are one-dimensional arrays ■ Strings are vectors that contain only characters ■ Symbols are unique, but they have many values ■ Structures let you store related data ■ Type information is apparent at runtime ■ Hash Tables provide quick data access from a lookup key ■ Packages keep names from colliding ❍ Lesson 11 - Essential Input and Output ■ READ accepts Lisp data ■ PRINT writes Lisp data for you and for READ ■ OPEN and CLOSE let you work with files ■ Variations on a PRINT theme ❍ Lesson 12 - Essential Reader Macros ■ The reader turns characters into data ■ Standard reader macros handle built-in data types ■ User programs can define reader macros ● Chapter 4 - Mastering the Essentials Chapter objective: Reinforce the concepts of Chapter 3 with hands-on exercises. ❍ Hands-on! The "toploop" ❍ Spotting and avoiding common mistakes ❍ Defining simple functions ❍ Using global variables and constants ❍ Defining recursive functions ❍ Tail recursion http://psg.com/~dlamkins/sl/contents.html (3 of 13)11/3/2006 5:46:04 PM Successful Lisp - Contents ❍ Exercises in naming ❍ Lexical binding and multiple name spaces ❍ Reading, writing, and arithmetic ❍ Other data types ❍ Simple macros ❍ Reader macros ● Chapter 5 - Introducing Iteration Chapter objective: Introduce the most common looping constructs. "There's no such thing as an infinite loop. Eventually, the computer will break." -- John D. Sullivan ❍ Simple LOOP loops forever... ❍ But there's a way out! ❍ Use DOTIMES for a counted loop ❍ Use DOLIST to process elements of a list ❍ DO is tricky, but powerful ● Chapter 6 - Deeper into Structures Chapter objective: Show the most useful optional features of structures. ❍ Default values let you omit some initializers, sometimes ❍ Change the way Lisp prints your structures ❍ Alter the way structures are stored in memory ❍ Shorten slot accessor names ❍ Allocate new structures without using keyword arguments ❍ Define one structure as an extension of another ● Chapter 7 - A First Look at Objects as Fancy Structures Chapter objective: Introduce CLOS objects as tools for structuring data. Object behaviors will be covered in a later chapter. ❍ Hierarchies: Classification vs. containment ❍ Use DEFCLASS to define new objects ❍ Objects have slots, with more options than structures ❍ Controlling access to a slot helps keep clients honest ❍ Override a slot accessor to do things that the client can't ❍ Define classes with single inheritance for specialization http://psg.com/~dlamkins/sl/contents.html (4 of 13)11/3/2006 5:46:04 PM Successful Lisp - Contents ❍ Multiple inheritance allows mix-and-match definition ❍ Options control initialization and provide documentation ❍ This is only the beginning... ● Chapter 8 - Lifetime and Visibility Chapter objective: Show how lifetime and visibility affect the values of Lisp variables during execution. This is pretty much like local and global variables in other languages, but Lisp's special variables change things. This chapter also sets the stage for understanding that lifetime and visibility isn't just for variables. ❍ Everything in Lisp has both lifetime and visibility ❍ Lifetime: Creation, existence, then destruction ❍ Visibility: To see and to be seen by ❍ The technical names: Extent and Scope ❍ Really easy cases: top-level defining forms ❍ Scope and extent of parameters and LET variables ❍ Slightly trickier: special variables ● Chapter 9 - Introducing Error Handling and Non-Local Exits Chapter objective: Show three new ways of transferring control between parts of a program. ❍ UNWIND-PROTECT: When it absolutely, positively has to run ❍ Gracious exits with BLOCK and RETURN-FROM ❍ Escape from anywhere (but not at any time) with CATCH and THROW ❍ Making sure files only stay open as long as needed ● Chapter 10 - How to Find Your Way Around, Part 1 Chapter objective: Show how to find things in Lisp without resorting to the manual. ❍ APROPOS: I don't remember the name, but I recognize the face ❍ DESCRIBE: Tell me more about yourself ❍ INSPECT: Open wide and say "Ah..." ❍ DOCUMENTATION: I know I wrote that down somewhere ● Chapter 11 - Destructive Modification Chapter objective: Illustrate the difference between assignment and binding, and show why assignment is harder to understand. Then explore reasons for preferring the more difficult concept, and introduce functions that use destructive modification. http://psg.com/~dlamkins/sl/contents.html (5 of 13)11/3/2006 5:46:04 PM Successful Lisp - Contents ❍ Simple assignment is destructive modification ❍ The risk of assignment ❍ Changing vs. copying: an issue of efficiency ❍ Modifying lists with destructive functions ❍ RPLACA, RPLACD, SETF ...; circularity ❍ Places vs. values: destructive functions don't always have the desired side-effect ❍ Contrast e.g. PUSH and DELETE ❍ Shared and constant data: Dangers of destructive changes ● Chapter 12 - Mapping Instead of Iteration Chapter objective: Categorize and demonstrate the mapping functions. Show appropriate and inappropriate uses. Introduce the concept of sequences. ❍ MAPCAR, MAPC, and MAPCAN process successive list elements ❍ MAPLIST, MAPL, and MAPCON process successive sublists ❍ MAP and MAP-INTO work on sequences, not just lists ❍ Mapping functions are good for filtering ❍ It's better to avoid mapping if you care about efficiency ❍ Predicate mapping functions test sequences ❍ SOME, EVERY, NOTANY, NOTEVERY ❍ REDUCE combines sequence elements ● Chapter 13 - Still More Things You Can Do with Sequences Chapter objective: Introduce the most useful sequence functions, and show how to use them. Show how destructive sequence functions must be used to have the intended effect. ❍ CONCATENATE: new sequences from old ❍ ELT and SUBSEQ get what you want from any sequence (also, COPY-SEQ) ❍ REVERSE turns a sequence end-for-end (also, NREVERSE) ❍ LENGTH: size counts after all ❍ COUNT: when it's what's inside that matters ❍ REMOVE, SUBSTITUTE, and other sequence changers ❍ DELETE, REMOVE-DUPLICATES, DELETE-DUPLICATES, and NSUBSTITUTE ❍ FILL and REPLACE ❍ Locating things in sequences: POSITION, FIND, SEARCH, and MISMATCH ❍ SORT and MERGE round out the sequence toolkit ●
Recommended publications
  • A Brief Introduction to Aspect-Oriented Programming
    R R R A Brief Introduction to Aspect-Oriented Programming" R R Historical View Of Languages" R •# Procedural language" •# Functional language" •# Object-Oriented language" 1 R R Acknowledgements" R •# Zhenxiao Yang" •# Gregor Kiczales" •# Eclipse website for AspectJ (www.eclipse.org/aspectj) " R R Procedural Language" R •# Also termed imperative language" •# Describe" –#An explicit sequence of steps to follow to produce a result" •# Examples: Basic, Pascal, C, Fortran" 2 R R Functional Language" R •# Describe everything as a function (e.g., data, operations)" •# (+ 3 4); (add (prod 4 5) 3)" •# Examples" –# LISP, Scheme, ML, Haskell" R R Logical Language" R •# Also termed declarative language" •# Establish causal relationships between terms" –#Conclusion :- Conditions" –#Read as: If Conditions then Conclusion" •# Examples: Prolog, Parlog" 3 R R Object-Oriented Programming" R •# Describe " –#A set of user-defined objects " –#And communications among them to produce a (user-defined) result" •# Basic features" –#Encapsulation" –#Inheritance" –#Polymorphism " R R OOP (cont$d)" R •# Example languages" –#First OOP language: SIMULA-67 (1970)" –#Smalltalk, C++, Java" –#Many other:" •# Ada, Object Pascal, Objective C, DRAGOON, BETA, Emerald, POOL, Eiffel, Self, Oblog, ESP, POLKA, Loops, Perl, VB" •# Are OOP languages procedural? " 4 R R We Need More" R •# Major advantage of OOP" –# Modular structure" •# Potential problems with OOP" –# Issues distributed in different modules result in tangled code." –# Example: error logging, failure handling, performance
    [Show full text]
  • The Machine That Builds Itself: How the Strengths of Lisp Family
    Khomtchouk et al. OPINION NOTE The Machine that Builds Itself: How the Strengths of Lisp Family Languages Facilitate Building Complex and Flexible Bioinformatic Models Bohdan B. Khomtchouk1*, Edmund Weitz2 and Claes Wahlestedt1 *Correspondence: [email protected] Abstract 1Center for Therapeutic Innovation and Department of We address the need for expanding the presence of the Lisp family of Psychiatry and Behavioral programming languages in bioinformatics and computational biology research. Sciences, University of Miami Languages of this family, like Common Lisp, Scheme, or Clojure, facilitate the Miller School of Medicine, 1120 NW 14th ST, Miami, FL, USA creation of powerful and flexible software models that are required for complex 33136 and rapidly evolving domains like biology. We will point out several important key Full list of author information is features that distinguish languages of the Lisp family from other programming available at the end of the article languages and we will explain how these features can aid researchers in becoming more productive and creating better code. We will also show how these features make these languages ideal tools for artificial intelligence and machine learning applications. We will specifically stress the advantages of domain-specific languages (DSL): languages which are specialized to a particular area and thus not only facilitate easier research problem formulation, but also aid in the establishment of standards and best programming practices as applied to the specific research field at hand. DSLs are particularly easy to build in Common Lisp, the most comprehensive Lisp dialect, which is commonly referred to as the “programmable programming language.” We are convinced that Lisp grants programmers unprecedented power to build increasingly sophisticated artificial intelligence systems that may ultimately transform machine learning and AI research in bioinformatics and computational biology.
    [Show full text]
  • Continuation Join Points
    Continuation Join Points Yusuke Endoh, Hidehiko Masuhara, Akinori Yonezawa (University of Tokyo) 1 Background: Aspects are reusable in AspectJ (1) Example: A generic logging aspect can log user inputs in a CUI program by defining a pointcut Login Generic Logging id = readLine(); Aspect Main CUI Aspect cmd = readLine(); pointcut input(): call(readLine()) logging return value 2 Background: Aspects are reusable in AspectJ (2) Example: A generic logging aspect can also log environment variable by also defining a pointcut Q. Now, if we want to log environment variable (getEnv) …? Generic Logging Aspect A. Merely concretize an aspect additionally Env Aspect CUI Aspect pointcut input(): pointcut input(): Aspect reusability call(getEnv()) call(readLine()) 3 Problem: Aspects are not as reusable as expected Example: A generic logging aspect can NOT log inputs in a GUI program by defining a pointcut Login Generic Logging void onSubmit(id) Aspect { … } Main void onSubmit(cmd) GUI Aspect { … } pointcut Input(): call(onSubmit(Str)) logging arguments 4 Why can’t we reuse the aspect? Timing of advice execution depends on both advice modifiers and pointcuts Logging Aspect (inner) Generic Logging abstract pointcut: input(); Aspect after() returning(String s) : input() { Log.add(s); } unable to change to before 5 Workaround in AspectJ is awkward: overview Required changes for more reusable aspect: generic aspect (e.g., logging) two abstract pointcuts, two advice decls. and an auxiliary method concrete aspects two concrete pointcuts even if they are not needed 6 Workaround in AspectJ is awkward: how to define generic aspect Simple Logging Aspect 1. define two pointcuts abstract pointcut: inputAfter(); for before and after abstract pointcut: inputBefore(); after() returning(String s) : inputAfter() { log(s); } 2.
    [Show full text]
  • How Lisp Systems Look Different in Proceedings of European Conference on Software Maintenance and Reengineering (CSMR 2008)
    How Lisp Systems Look Different In Proceedings of European Conference on Software Maintenance and Reengineering (CSMR 2008) Adrian Dozsa Tudor Gˆırba Radu Marinescu Politehnica University of Timis¸oara University of Berne Politehnica University of Timis¸oara Romania Switzerland Romania [email protected] [email protected] [email protected] Abstract rently used in a variety of domains, like bio-informatics (BioBike), data mining (PEPITe), knowledge-based en- Many reverse engineering approaches have been devel- gineering (Cycorp or Genworks), video games (Naughty oped to analyze software systems written in different lan- Dog), flight scheduling (ITA Software), natural language guages like C/C++ or Java. These approaches typically processing (SRI International), CAD (ICAD or OneSpace), rely on a meta-model, that is either specific for the language financial applications (American Express), web program- at hand or language independent (e.g. UML). However, one ming (Yahoo! Store or reddit.com), telecom (AT&T, British language that was hardly addressed is Lisp. While at first Telecom Labs or France Telecom R&D), electronic design sight it can be accommodated by current language inde- automation (AMD or American Microsystems) or planning pendent meta-models, Lisp has some unique features (e.g. systems (NASA’s Mars Pathfinder spacecraft mission) [16]. macros, CLOS entities) that are crucial for reverse engi- neering Lisp systems. In this paper we propose a suite of Why Lisp is Different. In spite of its almost fifty-year new visualizations that reveal the special traits of the Lisp history, and of the fact that other programming languages language and thus help in understanding complex Lisp sys- borrowed concepts from it, Lisp still presents some unique tems.
    [Show full text]
  • Some Global Optimizations for a Prolog Compiler
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Elsevier - Publisher Connector J. LOGIC PROGRAMMING 1985:1:43-66 43 SOME GLOBAL OPTIMIZATIONS FOR A PROLOG COMPILER C. S. MELLISH 1. INTRODUCTION This paper puts forward the suggestion that many PROLOG programs are not radically different in kind from programs written in conventional languages. For these programs, it should be possible for a PROLOG compiler to produce code of similar efficiency to that of other compilers. Moreover, there is no reason why reasonable efficiency should not be obtained without special-purpose hardware. Therefore, at the same time as pursuing the goal of special hardware for running PROLOG programs, we should be looking at how to maximize the use of conven- tional machines and to capitalize on developments in conventional hardware. It seems unlikely that conventional machines can be efficiently used by PROLOG programs without the use of sophisticated compilers. A number of possible optimiza- tions that can be made on the basis of a static, global analysis of programs are presented, together with techniques for obtaining such analyses. These have been embodied in working programs. Timing figures for experimental extensions to the POPLOG PROLOG compiler are presented to make it plausible that such optimiza- tions can indeed make a difference to program efficiency. 2. WHAT ARE REAL PROLOG PROGRAMS LIKE? It is unfortunate that very little time has been spent on studying what kinds of programs PROLOG programmers actually write. Such a study would seem to be an important prerequisite for trying to design a PROLOG optimising compiler.
    [Show full text]
  • The Evolution of Lisp
    1 The Evolution of Lisp Guy L. Steele Jr. Richard P. Gabriel Thinking Machines Corporation Lucid, Inc. 245 First Street 707 Laurel Street Cambridge, Massachusetts 02142 Menlo Park, California 94025 Phone: (617) 234-2860 Phone: (415) 329-8400 FAX: (617) 243-4444 FAX: (415) 329-8480 E-mail: [email protected] E-mail: [email protected] Abstract Lisp is the world’s greatest programming language—or so its proponents think. The structure of Lisp makes it easy to extend the language or even to implement entirely new dialects without starting from scratch. Overall, the evolution of Lisp has been guided more by institutional rivalry, one-upsmanship, and the glee born of technical cleverness that is characteristic of the “hacker culture” than by sober assessments of technical requirements. Nevertheless this process has eventually produced both an industrial- strength programming language, messy but powerful, and a technically pure dialect, small but powerful, that is suitable for use by programming-language theoreticians. We pick up where McCarthy’s paper in the first HOPL conference left off. We trace the development chronologically from the era of the PDP-6, through the heyday of Interlisp and MacLisp, past the ascension and decline of special purpose Lisp machines, to the present era of standardization activities. We then examine the technical evolution of a few representative language features, including both some notable successes and some notable failures, that illuminate design issues that distinguish Lisp from other programming languages. We also discuss the use of Lisp as a laboratory for designing other programming languages. We conclude with some reflections on the forces that have driven the evolution of Lisp.
    [Show full text]
  • Allegro CL User Guide
    Allegro CL User Guide Volume 1 (of 2) version 4.3 March, 1996 Copyright and other notices: This is revision 6 of this manual. This manual has Franz Inc. document number D-U-00-000-01-60320-1-6. Copyright 1985-1996 by Franz Inc. All rights reserved. No part of this pub- lication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means electronic, mechanical, by photocopying or recording, or otherwise, without the prior and explicit written permission of Franz incorpo- rated. Restricted rights legend: Use, duplication, and disclosure by the United States Government are subject to Restricted Rights for Commercial Software devel- oped at private expense as specified in DOD FAR 52.227-7013 (c) (1) (ii). Allegro CL and Allegro Composer are registered trademarks of Franz Inc. Allegro Common Windows, Allegro Presto, Allegro Runtime, and Allegro Matrix are trademarks of Franz inc. Unix is a trademark of AT&T. The Allegro CL software as provided may contain material copyright Xerox Corp. and the Open Systems Foundation. All such material is used and distrib- uted with permission. Other, uncopyrighted material originally developed at MIT and at CMU is also included. Appendix B is a reproduction of chapters 5 and 6 of The Art of the Metaobject Protocol by G. Kiczales, J. des Rivieres, and D. Bobrow. All this material is used with permission and we thank the authors and their publishers for letting us reproduce their material. Contents Volume 1 Preface 1 Introduction 1.1 The language 1-1 1.2 History 1-1 1.3 Format
    [Show full text]
  • “An Introduction to Aspect Oriented Programming in E”
    “An Introduction to Aspect Oriented Programming in e” David Robinson [email protected] Rel_1.0: 21-JUNE-2006 Copyright © David Robinson 2006, all rights reserved 1 This white paper is based on the forthcoming book “What's so wrong with patching anyway? A pragmatic guide to using aspects and e”. Please contact [email protected] for more information. Rel_1.0: 21-JUNE-2006 2 Copyright © David Robinson 2006, all rights reserved Preface ______________________________________ 4 About Verilab__________________________________ 7 1 Introduction _______________________________ 8 2 What are aspects - part I? _____________________ 10 3 Why do I need aspects? What’s wrong with cross cutting concerns? ___________________________________ 16 4 Surely OOP doesn’t have any problems? ___________ 19 5 Why does AOP help?_________________________ 28 6 Theory vs. real life - what else is AOP good for? ______ 34 7 What are aspects - part II?_____________________ 40 Bibliography _________________________________ 45 Index ______________________________________ 48 Rel_1.0: 21-JUNE-2006 Copyright © David Robinson 2006, all rights reserved 3 Preface “But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub” Paul Graham 1 This paper is taken from a forthcoming book about Aspect Oriented Programming. Not just the academic stuff that you’ll read about elsewhere, although that’s useful, but the more pragmatic side of it as well.
    [Show full text]
  • Understanding AOP Through the Study of Interpreters
    Understanding AOP through the Study of Interpreters Robert E. Filman Research Institute for Advanced Computer Science NASA Ames Research Center, MS 269-2 Moffett Field, CA 94035 rfi[email protected] ABSTRACT mapping is of interest (e.g., variables vs. functions). The I return to the question of what distinguishes AOP lan- pseudo-code includes only enough detail to convey the ideas guages by considering how the interpreters of AOP lan- I’m trying to express. guages differ from conventional interpreters. Key elements for static transformation are seen to be redefinition of the Of course, a real implementation would need implementa- set and lookup operators in the interpretation of the lan- tions of the helper functions. In general, the helper functions guage. This analysis also yields a definition of crosscutting on environments—lookup, set, and extend—can be manip- in terms of interlacing of interpreter actions. ulated to create a large variety of different language fea- tures. The most straightforward implementation makes an environment a set of symbol–value pairs (a map from sym- 1. INTRODUCTION bols to values) joined to a pointer to a parent environment. I return to the question of what distinguishes AOP lan- Lookup finds the pair of the appropriate symbol, (perhaps guages from others [12, 14]. chaining through the parent environments in its search), re- turning its value; set finds the pair and changes its value A good way of understanding a programming language is by field; and extend builds a new map with some initial val- studying its interpreter [17]. This motif has been recently ues whose parent is the environment being extended.
    [Show full text]
  • Incremental Compilation in Compose*
    Incremental Compilation in Compose? A thesis submitted for the degree of Master of Science at the University of Twente Dennis Spenkelink Enschede, October 28, 2006 Research Group Graduation Committee Twente Research and Education prof. dr. ir. M. Aksit on Software Engineering dr. ir. L.M.J. Bergmans Faculty of Electrical Engineering, M.Sc. G. Gulesir Mathematics and Computer Science University of Twente Abstract Compose? is a project that provides aspect-oriented programming for object-oriented lan- guages by using the composition filters model. In particular, Compose?.NET is an implemen- tation of Compose? that provides aspect-oriented programming to Microsoft Visual Studio languages. The compilation process of Compose?.NET contains multiple compilation modules. Each of them has their own responsibilities and duties such as parsing, analysis tasks and weaving. However, all of them suffer from the same problem. They do not support any kind of incre- mentality. This means that they perform all of their operations in each compilation without taking advantage of the results and efforts of previous compilations. This unavoidably results in compilations containing many redundant repeats of operations, which slow down compila- tion. To minimize these redundant operations and hence, speed up the compilation, Compose? needs an incremental compilation process. Therefore, we have developed a new compilation module called INCRE. This compilation module provides incremental performance as a service to all other compilation modules of Compose?. This thesis describes in detail the design and implementation of this new compila- tion module and evaluates its performance by charts of tests. i Acknowledgements My graduation time was a long but exciting process and I would not have missed it for the world.
    [Show full text]
  • Separate Compilation As a Separate Concern
    Separate Compilation as a Separate Concern A Framework for Language-Independent Selective Recompilation Nathan Bruning Separate Compilation as a Separate Concern THESIS submitted in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE in COMPUTER SCIENCE by Nathan Bruning born in Dordrecht, the Netherlands Software Engineering Research Group Department of Software Technology Faculty EEMCS, Delft University of Technology Delft, the Netherlands www.ewi.tudelft.nl c 2013 Nathan Bruning. All rights reserved. Separate Compilation as a Separate Concern Author: Nathan Bruning Student id: 1274465 Email: [email protected] Abstract Aspect-oriented programming allows developers to modularize cross-cutting con- cerns in software source code. Concerns are implemented as aspects, which can be re-used across projects. During compilation or at run-time, the cross-cutting aspects are “woven” into the base program code. After weaving, the aspect code is scattered across and tangled with base code and code from other aspects. Many aspects may affect the code generated by a single source module. It is difficult to predict which dependencies exist between base code modules and aspect modules. This language-specific information is, however, crucial for the development of a compiler that supports selective recompilation or incremental compilation. We propose a reusable, language-independent framework that aspect-oriented lan- guage developers can use to automatically detect and track dependencies, transpar- ently enabling selective recompilation. Our implementation is based on Stratego/XT, a framework for developing transformation systems. By using simple and concise rewrite rules, it is very suitable for developing domain-specific languages. Thesis Committee: Chair: Prof.
    [Show full text]
  • Open Modules: Modular Reasoning About Advice
    Open Modules: Modular Reasoning about Advice Jonathan Aldrich December 2004 CMU-ISRI-04-141 Institute for Software Research International School of Computer Science Carnegie Mellon University 5000 Forbes Avenue Pittsburgh, PA 15213-3890 This technical report is an expanded version of a paper submitted for publication. It supercedes Carnegie Mellon University Technical Report CMU-ISRI-04-108, published in March 2004 and revised in July 2004. This work was supported in part by the High Dependability Computing Program from NASA Ames cooperative agreement NCC-2-1298, NSF grant CCR-0204047, and the Army Research Office grant number DAAD19-02-1-0389 entitled ”Perpetually Available and Secure Information Systems.” Abstract Advice is a mechanism used by advanced object-oriented and aspect-oriented programming languages to augment the behavior of methods in a program. Advice can help to make programs more modular by separating crosscutting concerns more effectively, but it also challenges existing ideas about modu- larity and separate development. We study this challenge using a new, simple formal model for advice as it appears in languages like AspectJ. We then add a module system designed to leave program functionality as open to extension through advice as possi- ble, while still enabling separate reasoning about the code within a module. Our system, Open Modules, can either be used directly to facilitate separate, component-based development, or can be viewed as a model of the features that certain AOP IDEs provide. We define a formal system for reasoning about the observational equivalence of programs under advice, which can be used to show that clients are unaffected by semantics-preserving changes to a module’s implementation.
    [Show full text]