Writing a Best-Effort Portable Code Walker in Common Lisp

Total Page:16

File Type:pdf, Size:1020Kb

Writing a Best-Effort Portable Code Walker in Common Lisp Writing a best-effort portable code walker in Common Lisp Michael Raskin∗ LaBRI, University of Bordeaux [email protected] ABSTRACT ACM Reference format: One of the powerful features of the Lisp language family is Michael Raskin. 2017. Writing a best-effort portable code walker possibility to extend the language using macros. Some of in Common Lisp. In Proceedings of 10th European Lisp Simpo- sium, Vrije Universiteit Brussel, Belgium, April 2017 (ELS2017), possible extensions would benefit from a code walker, i.e. a 8 pages. library for processing code that keeps track of the status DOI: 10.5281/zenodo.3254669 of different part of code, for their implementation. But in practice code walking is generally avoided. In this paper, we study facilities useful to code walkers 1 INTRODUCTION provided by \Common Lisp: the Language" (2nd edition) and the Common Lisp standard. We will show that the Much of the power of Common Lisp comes from its extensibil- features described in the standard are not sufficient to write ity. Abstractions that cannot be expressed by functions can a fully portable code walker. still be expressed by macros; actually, many of the features One of the problems is related to a powerful but rarely described in the standard must be implemented as macros. discussed feature. The macrolet special form allows a macro Whilst macros are powerful on their own, some ways of function to pass information easily to other macro invocations extending Lisp would benefit from using higher-level code inside the lexical scope of the expansion. transformation abstractions. For many such abstractions the Another problem for code analysis is related to the usage of most natural way to implement them includes code walk- non-standard special forms in expansions of standard macros. ing, i.e. enumeration of all the subforms of a piece of code, We review the handling of defun by popular free software identification of function calls, variable bindings etc. among Common Lisp implementations. these subforms, and application of some code transforma- We also survey the abilities and limitations of the avail- tions. Unfortunately, code walking is complicated and the able code walking and recursive macro expansion libraries. libraries to perform it are non-portable. Even portable im- Some examples of apparently-conforming code that exhibit plementations of recursive macro expansion, also known as avoidable limitations of the portable code walking tools are macroexpand-all, are missing. provided. Guy Steele writes (in the second edition of the book \Com- We present a new attempt to implement a portable best- mon Lisp: the Language" [3]) that Common Lisp implemen- effort code walker for Common Lisp called Agnostic Lizard. tations are expected to provide all the functionality needed for code walking code analysis tools. The version of the CCS CONCEPTS language described in the book includes support for changing and inspecting the lexical environment objects; the book •Software and its engineering →Macro languages; Soft- explicitly recommends to use macroexpand on the macros in ware testing and debugging; the language core. Lexical environment objects are defined by the Common KEYWORDS Lisp standard [2] are more opaque. Many Common Lisp code walker, macro expansion, code transformation implementations do include some functions for environment inspection and manipulation, and even some code walking function. Unfortunately, both the naming and the feature ∗The author acknowledges support from the Danish National Research set vary between implementations. Foundation and The National Science Foundation of China (under the grant 61361136003) for the Sino-Danish Center for the Theory We will show that (unlike CL:tL2) the Common Lisp stan- of Interactive Computation. This work was supported by the French dard does not allow to implement a portable code walker cor- National Research Agency (ANR project GraphEn / ANR-15-CE40- rectly. We suggest an approach that approximates the desired 0009). functionality fairly well and remains implementation-agnostic even when doing the implementation-specific workarounds. Permission to make digital or hard copies of part or all of this work We present an implementation of this approach, a library for personal or classroom use is granted without fee provided that called Agnostic Lizard. copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. 2 RELATED WORK For all other uses, contact the owner/author(s). ELS2017, Vrije Universiteit Brussel, Belgium 2.1 Portable tools © 2017 Copyright held by the owner/author(s). 978-x-xxxx-xxxx- x/YY/MM. $15.00 The iterate library [4] provides an alternative iteration DOI: 10.5281/zenodo.3254669 construct also called iterate. It is more flexible than the ELS2017, April 2017, Vrije Universiteit Brussel, Belgium Michael Raskin standard loop macro, and it uses code walking for implemen- the implementation name). Even if two Common Lisp imple- tation. It doesn't work exactly as expected for some code, mentations are closely related and have the same names for though. The code snippet the environment processing functions, support for these two (iterate:iterate implementations has to be added separately. This limitation (for x :from 1 :to 3) makes some of the implementation-dependent tools not work (flet on some newer implementations (such as Clasp [15]) even ((f (y) (collect y))) when the tool contains all the code needed for supporting (f x))) the implementation. On the other hand, if different versions of the same Com- works the same as mon Lisp implementation behave in a different way, such (iterate:iterate checks can lead to breakage on some of the relatively recent (for x :from 1 :to 3) versions of a supported Common Lisp implementation. (collect x)) Richards Waters has described [5, 6] a clean, almost portable But the following version with a local macro definition will implementation of macroexpand-all that needs only a single not work environment-related function to be implemented separately for each of the Common Lisp implementations. (iterate:iterate CLWEB [9] by Alex Plotnick follows a similar approach for (for x :from 1 :to 3) its custom code walker, and the same approach is described (macrolet as a \proper code walker" in an essay [10] by Christophe ((f (y) `(collect ,y))) Rhodes. (f x))) hu.dwim.walker [11] is a comprehensive code walking li- The macroexpand-dammit library [7] is an attempt to pro- brary that uses a lot of implementation-specific functions for vide implementation of the full recursive macro expansion inspecting lexical environments etc. Unfortunately, the cur- functionality (macroexpand-all) including an optional lexi- rent versions of some previously supported Common Lisp im- cal environment parameter, but it has some bugs. It is not plementations are not supported because of relatively recent clear if these bugs can be fixed without major changes. For changes in environment handling. Also macroexpand-dammit example, both the original version and the freshest known is implemented in such a way that it removes macrolet and fork [8] return 1 instead of 2 in the following case: symbol-macrolet from the code completely after expanding the local macros and the local symbol macros. (defmacro f () 1) The trivial-macroexpand-all library [13] provides the functionality by wrapping the best func- (defmacro macroexpand-dammit-here macroexpand-all tion provided by each Common Lisp implementation. Un- (form &environment env) fortunately, some implementations don't support the lexical `(quote environment argument (for example, CLISP [16]). The same ,(macroexpand-dammit:macroexpand-dammit approach is used by SLIME (Common Lisp editing and debug- form env))) ging support for Emacs) [12]. Apparently, no more generic code walking functionality is provided in a consistent way by (macrolet ((f () 2)) multiple implementations. (macroexpand-dammit-here (macrolet () (f)))) Additionally, the macroexpand-dammit library includes the macroexpand-dammit-as-macro macro that the environment 3 PROBLEMS handling system of the Common Lisp implementation. Both the function and the macro versions of the recursive macro In this section we present a brief overview of the problems expander remove macrolet and symbol-macrolet forms from that the portable code walkers face. the code (replacing them with progn if necessary). As SICL [14] aims to be a modular and portable con- forming implementation of Common Lisp in Common Lisp, and the standard requires compile to do an equivalent of 3.1 Interpretations and violations of the macroexpand-all, there probably will be a usable code walker standard in SICL at some point; to the best of our knowledge, there is The Common Lisp standard allows Common Lisp imple- currently none. mentations to implement some standard-defined macros as additional special operators. But all special operators added 2.2 Implementation-specific tools instead of macros must also have a macro definition avail- Unfortunately, implementation-specific tools often check the able. This requirement seems to imply that the standard name of the Common Lisp implementation to choose the code expects the code walkers to succeed if they implement special path (for example, using #+ reader conditionals to check for handling only for the special operators listed in the standard. Writing a best-effort portable code walker in Common Lisp ELS2017, April 2017, Vrije
Recommended publications
  • 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]
  • 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]
  • A Lisp Oriented Architecture by John W.F
    A Lisp Oriented Architecture by John W.F. McClain Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degrees of Master of Science in Electrical Engineering and Computer Science and Bachelor of Science in Electrical Engineering at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY September 1994 © John W.F. McClain, 1994 The author hereby grants to MIT permission to reproduce and to distribute copies of this thesis document in whole or in part. Signature of Author ...... ;......................... .............. Department of Electrical Engineering and Computer Science August 5th, 1994 Certified by....... ......... ... ...... Th nas F. Knight Jr. Principal Research Scientist 1,,IA £ . Thesis Supervisor Accepted by ....................... 3Frederic R. Morgenthaler Chairman, Depattee, on Graduate Students J 'FROM e ;; "N MfLIT oARIES ..- A Lisp Oriented Architecture by John W.F. McClain Submitted to the Department of Electrical Engineering and Computer Science on August 5th, 1994, in partial fulfillment of the requirements for the degrees of Master of Science in Electrical Engineering and Computer Science and Bachelor of Science in Electrical Engineering Abstract In this thesis I describe LOOP, a new architecture for the efficient execution of pro- grams written in Lisp like languages. LOOP allows Lisp programs to run at high speed without sacrificing safety or ease of programming. LOOP is a 64 bit, long in- struction word architecture with support for generic arithmetic, 64 bit tagged IEEE floats, low cost fine grained read and write barriers, and fast traps. I make estimates for how much these Lisp specific features cost and how much they may speed up the execution of programs written in Lisp.
    [Show full text]
  • Common Lisp Ultraspec – a Project for Modern Common Lisp Documentation
    Common Lisp UltraSpec – A Project For Modern Common Lisp Documentation Michał „phoe” Herda #lisp-pl @ Freenode Jagiellonian University, Cracow, Poland Previously on European Lisp Symposium 2016 Yet Another Rant About The State Of Common Lisp Documentation Michał „phoe” Herda Presenting the European Lisp Symposium 2017 Exclusive: Yet Another Rant About The State Of Common Lisp Documentation, Part 2 Michał „phoe” Herda http://www.lispworks.com/documentation/HyperSpec/... http://www.sbcl.org/manual/... http://ccl.clozure.com/manual/... http://www.clisp.org/... http://bauhh.dyndns.org:8000/clim-spec/... http://bauhh.de/clxman/... http://metamodular.com/CLOS-MOP/... 50+(?) more websites with library-specific docs Fin, Part 2 (...except it’s not) A Possible Solution To The State Of Common Lisp Documentation, Part 2 Michał „phoe” Herda Parsing dpANS with RegEx Parsing HTML (context-free grammar) with RegEx (regular grammar): Parsing TeX (context-sensitive grammar) with RegEx (regular grammar): Parsing a known subset of TeX used in dpANS with RegEx (regular grammar): (with proper care) What’s done so far? ● Done ● All Dictionaries (e.g. MAPCAR, ADJOIN, …) ● Glossary ● Not done / TODO ● Concepts (e.g. 2.2 Reader Algorithm) ● Linking (esp. glossary entries) What’s done so far? ● Done ● All Dictionaries (e.g. MAPCAR, ADJOIN, …) ● Glossary ● Not done / TODO ● Concepts (e.g. 2.2 Reader Algorithm) ● Linking (esp. glossary entries) ● Review ● Diffs to the original dpANS ● Once it’s finished, SHIP IT! What am I aiming for? Editable Complete Downloadable
    [Show full text]
  • Commonloops Merging Lisp and Object-Oriented Programming Daniel G
    CommonLoops Merging Lisp and Object-Oriented Programming Daniel G. Bobrow, Kenneth Kahn, Gregor Kiczales, Larry Masinter, Mark Stefik, and Frank Zdybel Xerox Palo Alto Research Center Palo Alto, California 94304 CommonLoops blends object-oriented programming Within the procedure-oriented paradigm, Lisp smoothly and tightly with the procedure-oriented provides an important approach for factoring design of Lisp. Functions and methods are combined programs that is'different from common practice in in a more general abstraction. Message passing is object-oriented programming. In this paper we inuoked via normal Lisp function call. Methods are present the linguistic mechanisms that we have viewed as partial descriptions of procedures. Lisp data developed for integrating these styles. We argue that types are integrated with object classes. With these the unification results in something greater than the integrations, it is easy to incrementally move a program sum of the parts, that is, that the mechanisms needed between the procedure and object -oriented styles. for integrating object-oriented and procedure-oriented approaches give CommonLoops surprising strength. One of the most important properties of CommonLoops is its extenswe use of meta-objects. We discuss three We describe a smooth integration of these ideas that kinds of meta-objects: objects for classes, objects for can work efficiently in Lisp systems implemented on a methods, and objects for discriminators. We argue that wide variety of machines. We chose the Common Lisp these meta-objects make practical both efficient dialect as a base on which to bui|d CommonLoops (a implementation and experimentation with new ideas Common Lisp Object-Oriented Programming System).
    [Show full text]
  • 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.
    [Show full text]
  • Basic Lisp Techniques
    Basic Lisp Techniques David J. Cooper, Jr. February 14, 2011 ii 0Copyright c 2011, Franz Inc. and David J. Cooper, Jr. Foreword1 Computers, and the software applications that power them, permeate every facet of our daily lives. From groceries to airline reservations to dental appointments, our reliance on technology is all-encompassing. And, it’s not enough. Every day, our expectations of technology and software increase: • smart appliances that can be controlled via the internet • better search engines that generate information we actually want • voice-activated laptops • cars that know exactly where to go The list is endless. Unfortunately, there is not an endless supply of programmers and developers to satisfy our insatiable appetites for new features and gadgets. Every day, hundreds of magazine and on-line articles focus on the time and people resources needed to support future technological expectations. Further, the days of unlimited funding are over. Investors want to see results, fast. Common Lisp (CL) is one of the few languages and development options that can meet these challenges. Powerful, flexible, changeable on the fly — increasingly, CL is playing a leading role in areas with complex problem-solving demands. Engineers in the fields of bioinformatics, scheduling, data mining, document management, B2B, and E-commerce have all turned to CL to complete their applications on time and within budget. CL, however, no longer just appropriate for the most complex problems. Applications of modest complexity, but with demanding needs for fast development cycles and customization, are also ideal candidates for CL. Other languages have tried to mimic CL, with limited success.
    [Show full text]
  • The Design of TEX and METAFONT: a Retrospective
    The design of TEX and METAFONT: A retrospective Nelson H. F. Beebe University of Utah Department of Mathematics, 110 LCB 155 S 1400 E RM 233 Salt Lake City, UT 84112-0090 USA WWW URL: http://www.math.utah.edu/~beebe Telephone: +1 801 581 5254 FAX: +1 801 581 4148 Internet: [email protected], [email protected], [email protected] Abstract This article looks back at the design of TEX and METAFONT, and analyzes how they were affected by architectures, operating systems, programming languages, and resource limits of the computing world at the time of their creation by a remarkable programmer and human being, Donald E. Knuth. This paper is dedicated to him, with deep gratitude for the continued inspiration and learning that I’ve received from his software, his scientific writing, and our occasional personal encounters over the last 25+ years. 1 Introduction 501 arrived, he was so disappointed that he wrote [68, 2 Computers and people 502 p. 5]: 3TheDECPDP-10 502 I didn’t know what to do. I had spent 15 4 Resource limits 505 years writing those books, but if they were 5 Choosing a programming language 506 going to look awful I didn’t want to write 6 Switching programming languages 510 any more. How could I be proud of such a 7 Switching languages, again 513 product? A few months later, he learned of some new de- 8 TEX’s progeny 514 vices that used digital techniques to create letter 9 METAFONT’s progeny 514 images, and the close connection to the 0s and 1s 10 Wrapping up 515 of computer science led him to think about how 11 Bibliography 515 he himself might design systems to place characters −−∗−− on a page, and draw the individual characters as a matrix of black and white dots.
    [Show full text]
  • Common Lisp Object System
    Common Lisp Object System by Linda G. DeMichiel and Richard P. Gabriel Lucid, Inc. 707 Laurel Street Menlo Park, California 94025 (415)329-8400 [email protected] [email protected] with Major Contributions by Daniel Bobrow, Gregor Kiczales, and David Moon Abstract The Common Lisp Object System is an object-oriented system that is based on the concepts of generic functions, multiple inheritance, and method combination. All objects in the Object System are instances of classes that form an extension to the Common Lisp type system. The Common Lisp Object System is based on a meta-object protocol that renders it possible to alter the fundamental structure of the Object System itself. The Common Lisp Object System has been proposed as a standard for ANSI Common Lisp and has been tentatively endorsed by X3J13. Common Lisp Object System by Linda G. DeMichiel and Richard P. Gabriel with Major Contributions by Daniel Bobrow, Gregor Kiczales, and David Moon 1. History of the Common Lisp Object System The Common Lisp Object System is an object-oriented programming paradigm de- signed for Common Lisp. Over a period of eight months a group of five people, one from Symbolics and two each from Lucid and Xerox, took the best ideas from CommonLoops and Flavors, and combined them into a new object-oriented paradigm for Common Lisp. This combination is not simply a union: It is a new paradigm that is similar in its outward appearances to CommonLoops and Flavors, and it has been given a firmer underlying semantic basis. The Common Lisp Object System has been proposed as a standard for ANSI Common Lisp and has been tentatively endorsed by X3J13.
    [Show full text]
  • COMMON LISP an Interactive Approach PRINCIPLES of COMPUTER SCIENCE SERIES Series Editors Alfred V
    COMMON LISP An Interactive Approach PRINCIPLES OF COMPUTER SCIENCE SERIES Series Editors Alfred V. Aho, Bellcore, Morristown, New Jersey Jeffrey D. Ullman, Stanford University, Stanford, California Egon B¨orger, Editor Trends in Theoretical Computer Science Ruth E. Davis Truth, Deduction, and Computation: Logic and Semantics for Computer Science Nicholas J. DeLillo A First Course in Computer Science with ADA A. K. Dewdney The Turing Omnibus: 61 Excursions in Computer Science Vladimir Drobot Formal Languages and Automata Theory Eitan M. Gurari An Introduction to the Theory of Computation Martti M¨antyl¨a An Introduction to Solid Modeling Bertrand Meyer Software Engineering: Principles and Practices Shamim Naqvi and Shalom Tsur A Logical Language for Data and Knowledge Bases Christos Papadimitriou The Theory of Database Concurrency Control Richard Snodgrass The Interface Description Language: Definition and Use Steven Tanimoto Elements of Artificial Intelligence Using COMMON LISP Jeffrey D. Ullman Computational Aspects of VLSI Jeffrey D. Ullman Principles of Database and Knowledge-Base Systems, Volume I: Classical Database Systems Jeffrey D. Ullman Principles of Database and Knowledge-Base Systems, Volume II: The New Tech- nologies Jeffrey D. Ullman Theory of Relational Databases COMMON LISP An Interactive Approach STUART C. SHAPIRO State University of New York at Buffalo COMPUTER SCIENCE PRESS AN IMPRINT OF W. H. FREEMAN AND COMPANY • NEW YORK Library of Congress Cataloging-in-Publication Data Shapiro, Stuart Charles Common LISP: an interactive approach / by Stuart C. Shapiro. p. cm. Includes index. ISBN 0-7167-8218-9 1. LISP (Computer program) I. Title. II. Title: LISP. QA76.73.L23S53 1991 005. 13’3—dc20 91-12377 CIP Copyright c 1992 by Stuart C.
    [Show full text]
  • Programming Assignment 1: Lisp
    Programming Assignment 1: Lisp COS 470/570 – Spring 2019 – UMaine Assigned: 1/24/2019 Due: 2/1/2019 Lisp is one of the primary languages used in AI, and much of the homework in this class will be in Lisp. Aside from this, there are other reasons to learn (or review) Lisp. For one thing, it is one of the most rapidly-growing languages in terms of use. In addition, many programs and other languages use concepts and, more often, syntax from Lisp, and some programs use Lisp itself. Also, learning different languages, especially ones that are quite different from ones they know, is a very good thing for computer science majors—and it’s required for accreditation. And, finally, if past experience is any guide, some of you might find that you fall in love with the language and want to keep using it. What others have said about Lisp (from wikiquote1 via CLiki2.): Lisp is a programmable programming language. –John Foderaro One of the most important and fascinating of all computer languages is Lisp... –Douglas Hofstadter, /Gödel, Escher, Bach: an Eternal Golden Braid/ The greatest single programming language ever designed. –Alan Kay Lisp isn’t a language, its a building material. –Alan Kay Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot. –Eric S. Raymond, "How to Become a Hacker" Emacs is written in Lisp, which is the only computer language that is beautiful.
    [Show full text]