Programming Languages Interlisp

Total Page:16

File Type:pdf, Size:1020Kb

Programming Languages Interlisp PROGRAMMING LANGUAGES INTERLISP SUBMITTED BY: DIVYA BHOJ RISHISH CHANDRA 2 HISTORY: Interest in artificial intelligence first surfaced in the mid 1950. Linguistics, psychology, and mathematics were only some areas of application for AI. Linguists were concerned with natural language processing, while psychologists were interested in modeling human information and retrieval. Mathematicians were more interested in automating the theorem proving process. The common need among all of these applications was a method to allow computers to process symbolic data in lists. IBM was one of the first companies interested in AI in the 1950s. At the same time, the FORTRAN project was still going on. Because of the high cost associated with producing the first FORTRAN compiler, they decided to include the list processing functionality into FORTRAN. The FORTRAN List Processing Language (FLPL) was designed and implemented as an extention to FORTRAN. In 1958 John McCarthy took a summer position at the IBM Information Research Department. He was hired to create a set of requirements for doing symbolic computation. The first attempt at this was differentiation of algebraic expressions. This initial experiment produced a list of of language requirements, most notably was recursion and conditional expressions. At the time, not even FORTRAN (the only high-level language in existance) had these functions. It was at the 1956 Dartmouth Summer Research Project on Artificial Intelligence that John McCarthy first developed the basics behind Lisp. His motivation was to develop a list processing language for Artificial Intelligence. By 1965 the primary dialect of Lisp was created (version 1.5). By 1970 special-purpose computers known as Lisp Machines, were designed to run Lisp programs. 1980 was the year that object-oriented concepts were integrated into the language. By 1986, the X3J13 group formed to produce a draft for ANSI Common Lisp standard. Finally in 1992, X3J13 group published the American National Standard for Common Lisp. The key feature of the Lisp family is that they all are late-bound languages that use parentheses as the basic delimiter of evaluation forms, and all forms are expressions without exception. The uniform syntax turned out to allow the use of metaprogramming through manipulation (via macros) of the list-representation of this syntax, called symbolics expressions, or S-Expressions for short (even shorter, "SEXP"). 2 3 Lisp is also defined as a program in itself: (loop (print (eval (read)))), called the read- eval-print loop. LISP stands for LISt Processing.INTERLISP is a dialect of Lisp developed in 1967 by Bolt, Beranek and Newman (Cambridge, MA) as a descendant of BBN-Lisp. It emphasises user interfaces. It is currently supported by Xerox PARC. INTRODUCTION: Interlisp was once one of two main branches of LISP (the other being MACLISP). In 1981 Common LISP was begun in an effort to combine the best features of both. Interlisp includes a Lisp programming environment. It is dynamically scoped. NLAMBDA functions do not evaluate their arguments. Any function could be called with optional arguments. Machine code can be intermixed with interlisp expressions via the assemble directive of the compiler.the compiler also contains a facility for “block compilation” which allows a group of functions to be compiled as a unit suppressing internal names.Each successive level of computation,from interpreted through compiled,to block- compiled provides greater speed at a cost of debugging ease. Interlisp has been designed to be a good on-line interactive system.Some of the features provided include elaborate debugging facilities with tracing and conditional brealpoints and a sophisticated LISP oriented editor within the system.Utilization of a uniform error processing through user accessible routines has allowed the implementation of DWIM – “Do-what-I-mean” facility,which automatically corrects many types of errors without losing the context of computation. DATA TYPES: INTERLISP operates in an 18-bit address space. This address space is divided into 512 word pages with a limit of 512 pages, or 262,144 words , but only that portion of address space currently in use actually exists on any storage medium. INTERLISP itself and all data storage are contained within this address space. A pointer to a data element such as a number, atom , etc., is simply the address of the data element in this 18-bit address space. The data types of interlisp are lists, atoms, pnames , arrays, large and small integers, floating point numbers, string characters and string pointers. Compiled code and hash 3 4 arrays are currently included with arrays. Here is a brief description of each of the data types that are used in interlisp. 1. LITERAL ATOM: A literal atom is input as any string of non-delimiting characters that cannot be interpreted as a number.The syntactic characters that delimit atoms are space,end- of-line,line feed.%( ) “ ] and ].However, these characters may be included in atoms by preceding them with the escape character %.Literal atoms are printed by print and prin2 as a sequence of characters with %’s inserted before all delimiting characters(so that the atom will read back in properly. 2. PNAMES: The pnames of atoms,pointed to in the third word of the atom,comprise another data type with storage assigned as it is needed.this data type only occurs as a component of an atom or a strinh.It does not appear ,for example as an element of a list.Pnames have no input syntax or output format as they can be directly referenced by user programs.A pname is a sequence of 7 bit characters packed 5 to a word ,beginning at a word boundary.The first character of a pname contains its length,thus the maximum length of a pname is 126 characters. 3. NUMERICAL ATOMS: Numerical atoms ,or simply numbers ,do not have property lists ,value cells ,functions definition cells ,or explicit pnames .There are currently two types of numbers in INTERLISP: integers ,and floating point numbers. Integer: An integer is stored in one 36 bit word;thus its magnitude must be less than 2+(35^7) .To avoid having to store(and hence garbage collect) the values of small integers,a few pages of address space ,overlapping the INTERLISP machine language code,are reserved for their representation.The small number pointer itself,minusa constant,is the value of the number.Currently the range of 4 5 ‘small’integers is –1536 through +1535.The predicate smallp is used to test whether an integer is ‘small’. Floating Point Number: A floating point number is input as a signed integer ,followed by a decimal point ,followed by another sequence of digits called the fraction ,followed by an exponent (represented by E followed by a signed integer).Both signs are optional ,and either the fraction following the decimal point ,or the integer preceding the decimal point may be omitted .One or the other of the decimal point or exponent may also be omitted ,but at least one of them must be present to distinguish a floating point number from an integer. 4. LIST’s: The input syntax for a list is a sequence (at least one) of INTERLISP data elements ,e.g literal atoms ,other lists ,etc. enclosed in parentheses or brackets .A bracket can be used to terminate several lists .If there are 2 or more elements in a list, the final element can be preceded by a . (Delimited on both sides), indicating that cdr of the final node in the list is to be the element immediately following the.,e.g. (A.B) or (A B C . D), otherwise cdr of the last node in a list will be NIL. 5. ARRAY: An array in interlisp is a one-dimensional block of contiguous storage of arbitrary length. Arrays do not have input syntax; they can only be created by the function array. Arrays are printed by both print, prin2, and prin1 as # followed by the address of the array pointer (in octal). Array elements can be referenced by the functions elt and elt, and set by the functions seta and setd. 6. STRING: The input syntax for a string is a “, followed by a sequence of any characters except “ and %, terminated by a “.” and % may be included in a string by proceeding them with the escape character %. An array in interlisp is a one 5 6 dimensional block of contiguous storage of arbitrary length. Arrays do not have input syntax: they can only be created by the function array. FUNCTION TYPES: In INTERLISP, each function may independently have: • Its arguments evaluated or not evaluated. • A fixed number of arguments or an indefinite number of arguments. • Be defined by an INTERLISP expression, by built-in machine code, or by compiled machine code. Hence there are twelve function types (2 * 2 * 3). Exprs: Functions defined by interlisp expressions are called exprs. Exprs must begin with either LAMBDA or NLAMBDA indicating whether whether the arguments to the function are to be evaluated or not evaluated, respectively. Compiled Functions: The INTERLISP compiler can compile functions defined by expressions. Functions may also written directly in machine code the ASSEMBLE directive of the compiler. Functions created by the compiler, whether from S-expressions or ASSEMBLE directives. Function Type: The function fntype returns the function type of its argument .The value of fntype is one of the following 12 types: 6 7 EXPR CEXPR SUBR FEXPR CFEXPR FSUBR EXPR* CEXPR* SUBR* FEXPR* CFEXPR* FSUBR* Progn progn is a function of an arbitrary number of arguments .prong evaluates the arguments in order and returns the value of the last ,i.e. it is an extension of the function prog2 of LISP .Both cond and lambda/nlambda expressions have been generalized to permit ‘implicit progns’.
Recommended publications
  • Implementation Notes
    IMPLEMENTATION NOTES XEROX 3102464 lyric Release June 1987 XEROX COMMON LISP IMPLEMENTATION NOTES 3102464 Lyric Release June 1987 The information in this document is subject to change without notice and should not be construed as a commitment by Xerox Corporation. While every effort has been made to ensure the accuracy of this document, Xerox Corporation assumes no responsibility for any errors that may appear. Copyright @ 1987 by Xerox Corporation. Xerox Common Lisp is a trademark. All rights reserved. "Copyright protection claimed includes all forms and matters of copyrightable material and information now allowed by statutory or judicial law or hereinafter granted, including, without limitation, material generated from the software programs which are displayed on the screen, such as icons, screen display looks, etc. " This manual is set in Modern typeface with text written and formatted on Xerox Artificial Intelligence workstations. Xerox laser printers were used to produce text masters. PREFACE The Xerox Common Lisp Implementation Notes cover several aspects of the Lyric release. In these notes you will find: • An explanation of how Xerox Common Lisp extends the Common Lisp standard. For example, in Xerox Common Lisp the Common Lisp array-constructing function make-array has additional keyword arguments that enhance its functionality. • An explanation of how several ambiguities in Steele's Common Lisp: the Language were resolved. • A description of additional features that provide far more than extensions to Common Lisp. How the Implementation Notes are Organized . These notes are intended to accompany the Guy L. Steele book, Common Lisp: the Language which represents the current standard for Co~mon Lisp.
    [Show full text]
  • Document Number Scco24
    Stanford University Libraries Dept. of Special Cr*l!«ctkjns &>W Title Box Series I Fol 5C Fo<. Title " LISP/360 REFERENCE MANUAL FOURTH EDITION # CAMPUS COMPUTER FACILITY STANFORD COMPUTATION CENTER STANFORD UNIVERSITY STANFORD, CALIFORNIA DOCUMENT NUMBER SCCO24 " ■ " PREFACE This manual is intended to provide the LISP 1.5 user with a reference manual for the LISP 1.5 interpreter, assembler, and compiler on the Campus Facility 360/67. It assumes that the reader has a working knowledge by of LISP 1.5 as described in the LISP_I.is_Primer Clark Weissman, and that the reader has a general knowledge of the operating environment of OS 360. Beginning users of LISP will find the sections The , Functions, LI SRZIi O_Syst em , Organiz ation_of_St orage tlSP_Job_Set-]i£» and t.tsp/360 System Messages Host helpful in obtaining a basic understanding of the LISP system. Other sections of the manual are intended for users desiring a more extensive knowledge of LISP. The particular implementation to which this reference manual is directed was started by Mr. J. Kent while he was at the University of Waterloo. It is modeled after his implemention of LISP 1.5 for the CDC 3600. Included in this edition is information on the use of the time-shared LISP system available on the 360/67 which was implemented by Mr. Robert Berns of the " Computer staff. Campus Facility " II TABLE OF CONTENTS Section PREFACE " TABLE OF CONTENTS xxx 1. THE LISP/360 SYSTEM 1 2. ORGANIZATION OF STORAGE 3 2.1 Free Cell Storage (FCS) 3 2.1.1 Atoms 5 2.1.2 Numbers 8 2.1.3 Object List 9 2.2 Push-down Stack (PDS) 9 2.3 System Functions 9 2.4 Binary Program Space (BPS) 9 W 2.5 Input/Output Buffers 9 10 3.
    [Show full text]
  • PUB DAM Oct 67 CONTRACT N00014-83-6-0148; N00014-83-K-0655 NOTE 63P
    DOCUMENT RESUME ED 290 438 IR 012 986 AUTHOR Cunningham, Robert E.; And Others TITLE Chips: A Tool for Developing Software Interfaces Interactively. INSTITUTION Pittsburgh Univ., Pa. Learning Research and Development Center. SPANS AGENCY Office of Naval Research, Arlington, Va. REPORT NO TR-LEP-4 PUB DAM Oct 67 CONTRACT N00014-83-6-0148; N00014-83-K-0655 NOTE 63p. PUB TYPE Reports - Research/Technical (143) EDRS PRICE MF01/PC03 Plus Postage. DESCRIPTORS *Computer Graphics; *Man Machine Systems; Menu Driven Software; Programing; *Programing Languages IDENTIF7ERS Direct Manipulation Interface' Interface Design Theory; *Learning Research and Development Center; LISP Programing Language; Object Oriented Programing ABSTRACT This report provides a detailed description of Chips, an interactive tool for developing software employing graphical/computer interfaces on Xerox Lisp machines. It is noted that Chips, which is implemented as a collection of customizable classes, provides the programmer with a rich graphical interface for the creation of rich graphical interfaces, and the end-user with classes for modeling the graphical relationships of objects on the screen and maintaining constraints between them. This description of the system is divided into five main sections: () the introduction, which provides background material and a general description of the system; (2) a brief overview of the report; (3) detailed explanations of the major features of Chips;(4) an in-depth discussion of the interactive aspects of the Chips development environment; and (5) an example session using Chips to develop and modify a small portion of an interface. Appended materials include descriptions of four programming techniques that have been sound useful in the development of Chips; descriptions of several systems developed at the Learning Research and Development Centel tsing Chips; and a glossary of key terms used in the report.
    [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]
  • Implementing a Vau-Based Language with Multiple Evaluation Strategies
    Implementing a Vau-based Language With Multiple Evaluation Strategies Logan Kearsley Brigham Young University Introduction Vau expressions can be simply defined as functions which do not evaluate their argument expressions when called, but instead provide access to a reification of the calling environment to explicitly evaluate arguments later, and are a form of statically-scoped fexpr (Shutt, 2010). Control over when and if arguments are evaluated allows vau expressions to be used to simulate any evaluation strategy. Additionally, the ability to choose not to evaluate certain arguments to inspect the syntactic structure of unevaluated arguments allows vau expressions to simulate macros at run-time and to replace many syntactic constructs that otherwise have to be built-in to a language implementation. In principle, this allows for significant simplification of the interpreter for vau expressions; compared to McCarthy's original LISP definition (McCarthy, 1960), vau's eval function removes all references to built-in functions or syntactic forms, and alters function calls to skip argument evaluation and add an implicit env parameter (in real implementations, the name of the environment parameter is customizable in a function definition, rather than being a keyword built-in to the language). McCarthy's Eval Function Vau Eval Function (transformed from the original M-expressions into more familiar s-expressions) (define (eval e a) (define (eval e a) (cond (cond ((atom e) (assoc e a)) ((atom e) (assoc e a)) ((atom (car e)) ((atom (car e)) (cond (eval (cons (assoc (car e) a) ((eq (car e) 'quote) (cadr e)) (cdr e)) ((eq (car e) 'atom) (atom (eval (cadr e) a))) a)) ((eq (car e) 'eq) (eq (eval (cadr e) a) ((eq (caar e) 'vau) (eval (caddr e) a))) (eval (caddar e) ((eq (car e) 'car) (car (eval (cadr e) a))) (cons (cons (cadar e) 'env) ((eq (car e) 'cdr) (cdr (eval (cadr e) a))) (append (pair (cadar e) (cdr e)) ((eq (car e) 'cons) (cons (eval (cadr e) a) a)))))) (eval (caddr e) a))) ((eq (car e) 'cond) (evcon.
    [Show full text]
  • Obstacles to Compilation of Rebol Programs
    Obstacles to Compilation of Rebol Programs Viktor Pavlu TU Wien Institute of Computer Aided Automation, Computer Vision Lab A-1040 Vienna, Favoritenstr. 9/183-2, Austria [email protected] Abstract. Rebol’s syntax has no explicit delimiters around function arguments; all values in Rebol are first-class; Rebol uses fexprs as means of dynamic syntactic abstraction; Rebol thus combines the advantages of syntactic abstraction and a common language concept for both meta-program and object-program. All of the above are convenient attributes from a programmer’s point of view, yet at the same time pose severe challenges when striving to compile Rebol into reasonable code. An approach to compiling Rebol code that is still in its infancy is sketched, expected outcomes are presented. Keywords: first-class macros, dynamic syntactic abstraction, $vau calculus, fexpr, Ker- nel, Rebol 1 Introduction A meta-program is a program that can analyze (read), transform (read/write), or generate (write) another program, called the object-program. Static techniques for syntactic abstraction (macro systems, preprocessors) resolve all abstraction during compilation, so the expansion of abstractions incurs no cost at run-time. Static techniques are, however, conceptionally burdensome as they lead to staged systems with phases that are isolated from each other. In systems where different syntax is used for the phases (e. g., C++), it results in a multitude of programming languages following different sets of rules. In systems where the same syntax is shared between phases (e. g., Lisp), the separa- tion is even more unnatural: two syntactically largely identical-looking pieces of code cannot interact with each other as they are assigned to different execution stages.
    [Show full text]
  • 1960 1970 1980 1990 Japan California………………… UT IL in PA NJ NY Massachusetts………… Europe Lisp 1.5 TX
    Japan UT IL PA NY Massachusetts………… Europe California………………… TX IN NJ Lisp 1.5 1960 1970 1980 1990 Direct Relationships Lisp 1.5 LISP Family Graph Lisp 1.5 LISP 1.5 Family Lisp 1.5 Basic PDP-1 LISP M-460 LISP 7090 LISP 1.5 BBN PDP-1 LISP 7094 LISP 1.5 Stanford PDP-1 LISP SDS-940 LISP Q-32 LISP PDP-6 LISP LISP 2 MLISP MIT PDP-1 LISP Stanford LISP 1.6 Cambridge LISP Standard LISP UCI-LISP MacLisp Family PDP-6 LISP MacLisp Multics MacLisp CMU SAIL MacLisp MacLisp VLISP Franz Lisp Machine Lisp LISP S-1 Lisp NIL Spice Lisp Zetalisp IBM Lisp Family 7090 LISP 1.5 Lisp360 Lisp370 Interlisp Illinois SAIL MacLisp VM LISP Interlisp Family SDS-940 LISP BBN-LISP Interlisp 370 Spaghetti stacks Interlisp LOOPS Common LOOPS Lisp Machines Spice Lisp Machine Lisp Interlisp Lisp (MIT CONS) (Xerox (BBN Jericho) (PERQ) (MIT CADR) Alto, Dorado, (LMI Lambda) Dolphin, Dandelion) Lisp Zetalisp TAO (3600) (ELIS) Machine Lisp (TI Explorer) Common Lisp Family APL APL\360 ECL Interlisp ARPA S-1 Lisp Scheme Meeting Spice at SRI, Lisp April 1991 PSL KCL NIL CLTL1 Zetalisp X3J13 CLTL2 CLOS ISLISP X3J13 Scheme Extended Family COMIT Algol 60 SNOBOL METEOR CONVERT Simula 67 Planner LOGO DAISY, Muddle Scheme 311, Microplanner Scheme 84 Conniver PLASMA (actors) Scheme Revised Scheme T 2 CLTL1 Revised Scheme Revised2 Scheme 3 CScheme Revised Scheme MacScheme PC Scheme Chez Scheme IEEE Revised4 Scheme Scheme Object-Oriented Influence Simula 67 Smalltalk-71 LOGO Smalltalk-72 CLU PLASMA (actors) Flavors Common Objects LOOPS ObjectLisp CommonLOOPS EuLisp New Flavors CLTL2 CLOS Dylan X3J13 ISLISP Lambda Calculus Church, 1941 λ Influence Lisp 1.5 Landin (SECD, ISWIM) Evans (PAL) Reynolds (Definitional Interpreters) Lisp370 Scheme HOPE ML Standard ML Standard ML of New Jersey Haskell FORTRAN Influence FORTRAN FLPL Lisp 1.5 S-1 Lisp Lisp Machine Lisp CLTL1 Revised3 Zetalisp Scheme X3J13 CLTL2 IEEE Scheme X3J13 John McCarthy Lisp 1.5 Danny Bobrow Richard Gabriel Guy Steele Dave Moon Jon L White.
    [Show full text]
  • Lisp: Program Is Data
    LISP: PROGRAM IS DATA A HISTORICAL PERSPECTIVE ON MACLISP Jon L White Laboratory for Computer Science, M.I.T.* ABSTRACT For over 10 years, MACLISP has supported a variety of projects at M.I.T.'s Artificial Intelligence Laboratory, and the Laboratory for Computer Science (formerly Project MAC). During this time, there has been a continuing development of the MACLISP system, spurred in great measure by the needs of MACSYMAdevelopment. Herein are reported, in amosiac, historical style, the major features of the system. For each feature discussed, an attempt will be made to mention the year of initial development, andthe names of persons or projectsprimarily responsible for requiring, needing, or suggestingsuch features. INTRODUCTION In 1964,Greenblatt and others participated in thecheck-out phase of DigitalEquipment Corporation's new computer, the PDP-6. This machine had a number of innovative features that were thought to be ideal for the development of a list processing system, and thus it was very appropriate that thefirst working program actually run on thePDP-6 was anancestor of thecurrent MACLISP. This earlyLISP was patterned after the existing PDP-1 LISP (see reference l), and was produced by using the text editor and a mini-assembler on the PDP-1. That first PDP-6 finally found its way into M.I.T.'s ProjectMAC for use by theArtificial lntelligence group (the A.1. grouplater became the M.I.T. Artificial Intelligence Laboratory, and Project MAC became the Laboratory for Computer Science). By 1968, the PDP-6 wasrunning the Incompatible Time-sharing system, and was soon supplanted by the PDP-IO.Today, the KL-I 0, anadvanced version of thePDP-10, supports a variety of time sharing systems, most of which are capable of running a MACLISP.
    [Show full text]
  • Directly Reflective Meta-Programming
    Directly Reflective Meta-Programming ∗ Aaron Stump Computer Science and Engineering Washington University in St. Louis St. Louis, Missouri, USA [email protected] Abstract Existing meta-programming languages operate on encodings of pro- grams as data. This paper presents a new meta-programming language, based on an untyped lambda calculus, in which structurally reflective pro- gramming is supported directly, without any encoding. The language fea- tures call-by-value and call-by-name lambda abstractions, as well as novel reflective features enabling the intensional manipulation of arbitrary pro- gram terms. The language is scope safe, in the sense that variables can neither be captured nor escape their scopes. The expressiveness of the language is demonstrated by showing how to implement quotation and evaluation operations, as proposed by Wand. The language's utility for meta-programming is further demonstrated through additional represen- tative examples. A prototype implementation is described and evaluated. Keywords: lambda calculus, reflection, meta-programming, Church en- coding, Mogensen-Scott encoding, Wand-style fexprs, alpha equivalence, language implementation. 1 Introduction This paper presents a new meta-programming language called Archon, in which programs can operate directly on other programs as data. Existing meta- programming languages suffer from defects such as encoding programs at too low a level of abstraction, or in a way that bloats the encoded program terms. Other issues include the possibility for variables either to be captured or escape their static scopes. Archon rectifies these defects by trading the complexity of the reflective encoding for additional programming constructs. We adopt ∗This work is supported by funding from the U.S.
    [Show full text]
  • CONS Y X)))) Which Sets Z to Cdr[X] If Cdr[X] Is Not NIL (Without Recomputing the Value As Woirld Be Necessary in LISP 1.5
    NO. 1 This first (long delayed) LISP Bulletin contains samples of most of those types of items which the editor feels are relevant to this publication. These include announcements of new (i.e. not previously announced here) implementations of LISP !or closely re- lated) systems; quick tricks in LISP; abstracts o. LISP related papers; short writeups and listings of useful programs; and longer articles on problems of general interest to the entire LISP com- munity. Printing- of these last articles in the Bulletin does not interfere with later publications in formal journals or books. Short write-ups of new features added to LISP are of interest, preferably upward compatible with LISP 1.5, especially if they are illustrated by programming examples. -A NEW LISP FEATURE Bobrow, Daniel G., Bolt Beranek and Newman Inc., 50 oulton Street, Cambridge, Massachusetts 02138. An extension of ro 2, called progn is very useful. Tht ralue of progn[el;e ; ,..;e Y- is the value of e . In BBN-LISP on t .e SDS 940 we ha6e extenaed -cond to include $n implicit progn in each clause, putting It In the general form (COND (ell e ) . (e21 . e 2n2) (ekl e )) In1 ... ... kn,_ where nl -> 1. This form is identical to the LISP 1.5 form if n ni = 2. If n > 2 then each expression e in a clause is evaluated (in order) whh e is the first true (nohkN1~)predicate found. The value of the &And Is the value of the last clause evaluated. This is directly Gapolated to the case where n, = 1, bxre the value of the cond is the value of this first non-~ILprewcate.
    [Show full text]
  • GLISP User's Manual
    «* " GLISP User's Manual Gordon S. Novak Jr. Computer Science Department Stanford University " Stanford, California 94305 Revised: 23 November 1982 " This research was supported in part by NSF grant SED-7912803 in the Joint National Science Foundation - National Institute of Education Program of Research on Cognitive Processes and the Structure of Knowledge in Science and Mathematics, and in part by the Defense Advanced Research Projects Agency under contract MDA-903-80-C-007. " W i Table of Contents 1 Introduction 1 1.1. Overview of GLISP 1 " 1.2. Implementation 2 1.3. Error Messages 3 1.4. Interactive Features of GLISP 3 2. Object Descriptions 5 2.1. Declaration of Object Descriptions 5 2.1.1. Property Descriptions 6 2.1.2. Supers Description 6 2.1.3. Values Description 6 2.2. Structure Descriptions 7 2.2.1. Syntax of Structure Descriptions 7 2.2.2. Examples of Structure Descriptions 9 2.3. Editing of Object Descriptions 9 2.4. Interactive Editing of Objects 10 2.5. Global Variables 10 2.6. Compile-Time Constants and Conditional Compilationimpilation 10 3. Reference To Objects 13 3.1. Accessing Objects 13 3.2. Creation of Objects 14 3.3. Interpretive Creation of Objects 14 3.4. Predicates on Objects 14 3.4.1. Self-Recognition Adjectives 15 3.4.2. Testing Object Classes 15 " 4. GLISP Program Syntax 17 4.1. Function Syntax 17 4.2. Expressions 18 4.2.1. Interpretation of Operators 19 4.2.1.1. Operations on Strings 19 4.2.1.2. Operations on Lists 19 4.2.1.3.
    [Show full text]