Ccured Type-Safe Retrofitting of Legacy Code

Total Page:16

File Type:pdf, Size:1020Kb

Ccured Type-Safe Retrofitting of Legacy Code CCured Type-Safe Retrofitting of Legacy Code George C. Necula Scott McPeak Westley Weimer University of California, Berkeley {necula, smcpeak, weimer}@cs, berkeley, edu Abstract While in lhe 1970s sacrificing lype safely for flexibilily and perfbrmance mighl have been a sensible language design In lhis paper we propose a scheme lhai combines type in- choice, today lhere are more and more siiuaiions in which ference and run-time checking to make exisiing C programs type safety is jusi as imporiani as, if noi more importani type saI~. }V~ describe lhe CCured type sysiem, which ex- lhan, performance. Errors like array oui-of:bounds accesses lends lhat of C by separaiing poinier types according to lead boih lo painful debugging sessions chasing inadverieni lheir usage. This type sysiem allows boih poiniers whose memory updaies and lo malicious atiacks exploiiing buft>r usage can be verified siaiically to be type saI>, and poiniers overrun errors in security-criiical code. (Almost g0% of re- whose sai>ty musi be checked ai run lime. }V~ prove a type ceni CERT advisories resuli fi'om security violaiions of this soundness resuli and lhen we preseni a surprisingly simple kind [29].) Type safety is desirable for isolaiing program type inference algoriihm lhai is able lo infer lhe appropriaie componenis in a large or exiensible sysiem, wiihoui lhe loss poinier kinds for exisiing C programs. of performance of separaie address spaces. II is also valu- Our experience wiih lhe CCured sysiem shows lhai lhe able for inter-operaiion wiih sysiems wriiien in type-saf> inference is very eft~ciive for many C programs, as ii is able languages (such as type-saf> Java naiive meihods, for exam- io infer ihai most or all of the pointers are statically ver- pie). Since a great deal of useful code is already wriiien or ifiable lo be type saI>. The remaining poiniers are insiru- being wriiien in C, ii would be useful to have a praciical menied wiih efficieni run-lime checks lo ensure lhai lhey are scheme lo bring type safety lo lhese programs. used sai>ly. The resuliing performance loss due lo run-lime The work described in lhis paper is based on lwo main checks is 0 15056, which is several limes belier lhan com- premises. Firsi, we believe lhai even in programs wriiien in parable approaches lhai use only dynamic checking. Using unsaf~ languages like C, a large pari of lhe program can be CCured we have discovered programming bugs in esiablished verified siatically to be type saf~. Then lhe remaining pari C programs such as several SPECINT95 benchmarks. of lhe program can be insirumenied wiih run-lime checks lo ensure lhai lhe execuiion is memory saf>. The second 1 Introduction premise of our work is lhai in many applicaiions, some loss of performance due lo run-lime checks is an accepiable price The C programming language provides programmers wiih a for type safety, especially when compared lo lhe alternaiive greai deal of flexibility in lhe represeniaiion of daia and lhe cosi of reprogramming lhe sysiem in a type-saf~ language. use of poiniers. These f~aiures make C lhe language of choice The main coniribuiion of lhis paper is lhe CCured type for sysiems programming. Unforiunaiely, lhe cosi is a weak sysiem, an exiension of lhe C type sysiem wiih explicii types type sysiem and consequenlly a greai deal of "flexibility" in for poiniers inio arrays, and wiih dynamic types. II exiends iniroducing sublle bugs in programs. previous work on adding dynamic types lo siaiically typed This research was supported in part by the National Sci- languages: types and capabiliiies for lhe siaiically-typed el- ence I~bundation Career Grant No. CCR-9875171, and ITR Grants emenis are known ai compile lime, while lhe dynamically- No. CCR-0085949 and No. CCR-0081588, and gifts from AT&T typed elemenis are guarded by run-lime checks. Our type Research and Microsoft Research. The information presented here sysiem is inspired by common C usage, and includes sup- does not necessarily reflect the position or the policy of the Gov- pori for physical type equivalence [8] and special "sequence" ernment and no official endorsement should be inferred. poiniers for accessing arrays. The second coniribuiion of lhe paper is a simple yei eft~ciive type-inf>rence algoriihm Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided lhai can lranslaie ordinary C programs inio CCured mostly that copies are not made or distributed for profit or commercial auiomaiically and in a mailer of seconds even for a0,000- advantage and that copies bear this notice and the full citation on line programs. }V~ have used lhis inference algoriihm lo the first page. 2b copy otherwise, to republish, to post on servers produce type-sat~ versions of several C programs for which or to redistribute to lists, requires prior specific permission and/or we observed a slowdown of 0 15056. In lhe process, we have a fee. POPL '02, Jan. 16-18, 2002 Portland, OR USA (c) 2002 ACM ISBN 1-58118-450-9/02/01...$5.00 128 also found programming bugs in the analyzed code, the most iint "i *2 a; // array surprising being several array out-of-bounds errors in the 2 int i; // index SPECINT95 compress, go and ijpeg benchmarks. int acc; // accumulator }V~ continue in Section 2 with an informal overview of the 4 int *a *4 p; // elem ptr system in the context of a small example program. Then 5 int *5 e; // unboxer in Section 3 we present a simple language of pointers, with 6 acc = 0; its type system (in Section 4) and operational semantics (in for (i=O; i<lO0; i++) { Section 5), t~llowed by a discussion of the type sat~ty guar- p = a + i; // ptr arith antees of CCured programs. In Section 6 we present a simple 9 e = *p; // read elem constraint-based type int>rence algorithm for CCured. }V~ io while ((int) e ~ 2 == O) { // check tag discuss informally the extension of the language presented 11 e = * (int *6 "7) e; // unbox in this paper to the whole C programming language in Sec- le } tion 7, necessary source code changes in Section 8, and in i~ acc += ((int)e >> I); // strip tag Section 9 we relate our experience with a prototype imple- e# } mentation. Figure 1: A short C program fragment demonstrating sat> 2 Overview of the Approach and unsat> use of pointers. To ensure memory safety, tbr each pointer we must keep track of certain properties of the memory area to which it is supposed to point. Such properties include the area's size the static type of "e" as being an accurate description of and the types of the values it contains. For some pointers its values. In our type system we say that "e" has a dy- this information can be computed precisely at compile time narnic pointer type and we associate this inibrmation with and for others we must compute it at run time, in which case the pointer type constructors *s and *r. Dynamic point- we have to insert run-time sai~ty checks. ers always point into memory areas whose contents do not These two kinds of pointers appear in the example C pro- have a reliable static type and must therefore store extra gram shown in Figure 1. The program operates on a hy- information to classii]y their contents as pointers or integers. pothetical disjoint union datatype we call "boxed integer" Correspondingly, the aliases of dynamic pointers can only be that has been efficiently implemented in C as follows: if a other dynamic pointers; otherwise a saI~ pointer's static type boxed integer value is odd then it represents a 31-bit integer assumptions could be violated aider a memory write through in the most significant bits along with a least significant tag a dynamic pointer alias. This means that the type construc- bit equal to one, otherwise it represents a pointer to another tors *l, *a and *s must also be classified as dynamic point- "boxed integer". }V~ use the C datatype int • to represent ers. In this example program, we have a mixture of pointers boxed integers. The variable a is a pointer to an array of whose static type can be relied upon and thus require lit- boxed integers. The purpose of the function is to accumu- tle or no access checks (the saI~ and sequence pointers), and late in the variable acc the sum of the first 100 boxed integers also pointers whose static type is unreliable and thus require in the array. In line 8 we compute the address of a boxed more extensive checking. integer and in line 9 we t>tch the boxed integer. The loop in lines 10 12 unboxes the integer. The subscripts on the pointer type constructors "*" have been added to simplii~v cross-referencing from the text. Motivated by this and similar examples, the CCured lan- By inspection of the program we observe that the values guage is essentially the union of two languages: a strongly of the variables a and p are supposed to point into the same typed language (containing sat> and sequence pointers), and array. Neither of these variables is subject to casts (and an untyped language for which the type information is main- they have no other aliases) and thus we know that the type rained and checked at run time. of the values they point to is indeed "int *".
Recommended publications
  • 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]
  • Balancing the Eulisp Metaobject Protocol
    Balancing the EuLisp Metaob ject Proto col x y x z Harry Bretthauer and Harley Davis and Jurgen Kopp and Keith Playford x German National Research Center for Computer Science GMD PO Box W Sankt Augustin FRG y ILOG SA avenue Gallieni Gentilly France z Department of Mathematical Sciences University of Bath Bath BA AY UK techniques which can b e used to solve them Op en questions Abstract and unsolved problems are presented to direct future work The challenge for the metaob ject proto col designer is to bal One of the main problems is to nd a b etter balance ance the conicting demands of eciency simplicity and b etween expressiveness and ease of use on the one hand extensibili ty It is imp ossible to know all desired extensions and eciency on the other in advance some of them will require greater functionality Since the authors of this pap er and other memb ers while others require greater eciency In addition the pro of the EuLisp committee have b een engaged in the design to col itself must b e suciently simple that it can b e fully and implementation of an ob ject system with a metaob ject do cumented and understo o d by those who need to use it proto col for EuLisp Padget and Nuyens intended This pap er presents a metaob ject proto col for EuLisp to correct some of the p erceived aws in CLOS to sim which provides expressiveness by a multileveled proto col plify it without losing any of its p ower and to provide the and achieves eciency by static semantics for predened means to more easily implement it eciently The current metaob
    [Show full text]
  • The Embeddable Common Lisp
    ACM Lisp Pointers 8(1), 1995, 30-41 The Embeddable Common Lisp Giuseppe Attardi Dipartimento di Informatica, Universit`adi Pisa Corso Italia 40, I-56125 Pisa, Italy net: [email protected] Abstract The Embeddable Common Lisp is an implementation of Common Lisp designed for being embeddable within C based applications. ECL uses standard C calling conventions for Lisp compiled functions, which allows C programs to easily call Lisp functions and viceversa. No foreign function interface is required: data can be exchanged between C and Lisp with no need for conversion. ECL is based on a Common Runtime Support (CRS) which provides basic facilities for memory management, dynamic loading and dumping of binary images, support for multiple threads of execution. The CRS is built into a library that can be linked with the code of the application. ECL is modular: main modules are the program development tools (top level, debugger, trace, stepper), the compiler, and CLOS. A native implementation of CLOS is available in ECL: one can configure ECL with or without CLOS. A runtime version of ECL can be built with just the modules which are required by the application. 1 Introduction As applications become more elaborate, the facilities required to build them grow in number and sophistica- tion. Each facility is accessed through a specific package, quite complex itself, like in the cases of: modeling, simulation, graphics, hypertext facilities, data base management, numerical analysis, deductive capabilities, concurrent programming, heuristic search, symbolic manipulation, language analysis, special device control. Reusability is quite a significant issue: once a package has been developed, tested and debugged, it is un- desirable having to rewrite it in a different language just because the application is based in such other language.
    [Show full text]
  • Some Non-Standard Issues on Lisp Standardization
    Some Non-standard Issues on Lisp Standardization Takayasu IT0 * Taiichi YUASA Introduction Lisp was born about 25 years ago as an A1 language with a precise operational semantics. Since then many Lisp dialects have been proposed, implemented and used. In 1960's Lisp 1.5 was a kind of Lisp standard, although there were many Lisp 1.5 dialects which depend on 1/0 and computer systems. In 1970's various Lisp dialects were spawned to respond to the need of more powerful Lisp systems for A1 research and symbolic computation. Among them we know that Lisp 1.6, Interlisp and Maclisp had big influences in the development of Lisp; especially, Maclisp brought us various interesting successors, including Franzlisp, Scheme, Zet alisp and Common Lisp. Common Lisp [STEELE] may be taken as a result of standardization activities of Maclisp and its successors, and Scheme is one of the first steps to try to settle and resolve some syntactic and semantic incompatibilities in Maclisp families. Eulisp [PADGET] may be taken to be another attempt along with this line with greater ambition for Lisp standardization, employing the design philosophy of extensible languages based on "leveling of languages". Various design and standardization issues have been considered and examined in the course of designing Common Lisp and Eulisp. The current standardization activities in US and Europe are mainly placed on "clean-upn of Common Lisp and "refinement and development" of Eulisp, in addition to efforts of designing object-oriented features in Lisp systems. In a sense major (standard) issues in Lisp standardization have been considered in these efforts of clean-up of Common Lisp and design of Eulisp.
    [Show full text]
  • Programming Language Eulisp
    Programming Language Eulisp Version 0.99 Programming Language EuLisp, version 0.99 Contents Page Foreword :::::::::::::::::::::::::::::::::::::::::::::::::: 1 Introduction ::::::::::::::::::::::::::::::::::::::::::::::: 2 1 Language Structure :::::::::::::::::::::::::::::::::::::: 2 2 Scope :::::::::::::::::::::::::::::::::::::::::::::::::: 3 3 Conformance Definitions :::::::::::::::::::::::::::::::::: 3 4 Error Definitions :::::::::::::::::::::::::::::::::::::::: 3 5 Compliance ::::::::::::::::::::::::::::::::::::::::::::: 4 6 Conventions :::::::::::::::::::::::::::::::::::::::::::: 4 6.1 Layout and Typography ::::::::::::::::::::::::::::::::: 4 6.2 Meta-Language :::::::::::::::::::::::::::::::::::::::: 6 6.3 Naming ::::::::::::::::::::::::::::::::::::::::::::: 6 7 Definitions :::::::::::::::::::::::::::::::::::::::::::::: 6 8 Syntax ::::::::::::::::::::::::::::::::::::::::::::::::: 9 8.1 Whitespace and Comments ::::::::::::::::::::::::::::::: 9 8.2 Objects ::::::::::::::::::::::::::::::::::::::::::::: 9 9 Modules :::::::::::::::::::::::::::::::::::::::::::::::: 10 9.1 Directives :::::::::::::::::::::::::::::::::::::::::::: 10 9.2 Export Directive ::::::::::::::::::::::::::::::::::::::: 10 9.3 Import Directive ::::::::::::::::::::::::::::::::::::::: 10 9.4 Expose Directive :::::::::::::::::::::::::::::::::::::: 11 9.5 Syntax Directive ::::::::::::::::::::::::::::::::::::::: 11 9.6 Definitions and Expressions :::::::::::::::::::::::::::::: 11 9.7 Module Processing ::::::::::::::::::::::::::::::::::::: 12 9.8 Module Definition ::::::::::::::::::::::::::::::::::::::
    [Show full text]
  • Einführung in LISP
    Einführung in LISP Simon Lutz, Frank Preiswerk “Real Programmers don't write in LISP. Only idiots' programs contain more parenthesis than actual code.” “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.” 04/19/06 Seminar 10 Programmiersprachen - Lisp/Scheme - Simon Lutz, Frank Preiswerk 1 Zeitlicher Überblick 1958: Lisp wurde von John McCarthy am MIT speziell für nicht-numerische Probleme designed und von Steve Russell auf einer IBM 704 Maschine implementiert. Der Name bedeutet “List Processing Language”. 1968: Erster Lisp Compiler geschrieben in Lisp von Tim Hart und Mike Levin. 1968-70: Implementation von SHRDLU mittels Lisp, berühmtes AI-System. 1970er Jahre: Performanz von bestehenden Lisp-Systemen wird zum Thema, es entstehen optimierte Lisp-Maschinen. Heute wieder verschwunden. 1980er – 1990er Jahre: Bemühungen für eine Vereinheitlichung der vielen bestehenden Lisp-Dialekte: Common Lisp entsteht. 1994: ANSI veröffentlicht Common Lisp Standard. Dies zu einem Zeitpunkt, als der Weltmarkt für Lisp viel kleiner war als in den früheren Zeiten. 04/19/06 Seminar 10 Programmiersprachen - Lisp/Scheme - Simon Lutz, Frank Preiswerk 2 Lisp heute Nach einem Rückgang in den 90er Jahren ist das Interesse seit 2000 wieder gestiegen, massgeblich im Rahmen von Open Source Implementationen von Common Lisp. 2004: Peter Seibel’s “Practical Common Lisp” ist für kurze Zeit an zweiter Stelle von Amazon’s populärsten Programmierbüchern. April 2006: Tiobe Software rankt Lisp auf Platz 14 der populärsten Programmiersprachen. Neue “Lisper” beschreiben die Sprache gerne als “eye-opening experience” und behaupten, in Lisp deutlich produktiver zu sein als in anderen Sprachen.
    [Show full text]
  • An Overview of Eulisp
    LISP AND SYMBOLIC COMPUTATION An International Journal c Kluwer Academic Publishers Manufactured in The Netherlands An overview of EuLisp JULIAN PADGET japmathsbathacuk University of Bath School of Mathematical Sciences Bath BA AY United Kingdom GREG NUYENS nuyensilogcom Ilog Inc Landings Drive Mountain View CA USA HARRY BRETTHAUER bretthauergmdde German National Research Centre for Computer Science GMD POBox W Sankt Augustin FRG Keywords Lisp mo dules concurrency ob jectoriented programming conditions re ection Abstract This pap er is an abstracted version of the EuLisp denition As such it emphasizes those parts of the language that we consider the most imp ortant or note worthy while we just mention without much detail the elements that are included for completeness This is reected in the structure of the pap er which describ es the mo dule scheme the ob ject system and supp ort for concurrent execution in the main part and consigns the ma jority of the datatyp es to an app endix Intro duction EuLisp is a dialect of Lisp and as such owes much to the great b o dy of work that has b een done on language design in the name of Lisp over the last thirty years The distinguishing features of EuLisp are i the integration of the classical Lisp typ e system and the ob ject system into a single class hierarchy ii the complementary abstraction facilities provided by the class and the mo dule mechanism iii supp ort for concurrent execution Here is a brief summary of the main features of the language Classes are rstclass ob jects The
    [Show full text]
  • New Model for VDT Associated Visual Comfort in Office Spaces
    Niloofar Moghbel New Model for VDT Associated Visual Comfort in Office Spaces Dissertation Department of Architecture Karlsruhe Institute of Technology (KIT) New Model for VDT Associated Visual Comfort in Office Spaces Zur Erlangung des akademischen Grades eines Doktor-Ingenieurs von der Fakultät für Architektur des Karlsruher Instituts für Technologie (KIT) genehmigte Dissertation von Niloofar Moghbel Tag der mündlichen Prüfung: 19. April 2012 Referent: Prof. Dipl.-Ing. Andreas Wagner, Karlsruhe Korreferent: Prof. Dr. Sc. nat. Christoph Schierz, TU Ilmenau Weiteres Mitglied: Prof. Dr. Ing. Rosemarie Wagner Vorsitzender: Prof. Dipl.-Ing. Matthias Pfeifer 2 Acknowledgements This thesis has been carried out during my tenure at the Fraunhofer Institute for Solar Energy Systems (ISE) in Freiburg, Germany. I am indebted to the Fraunhofer ISE for providing me with an excellent scientific environment, financial support and research facilities. I appreciate Prof. Weber, Dr. Henning, S. Herkel. T. Kuhn and J. Wienold for their support to realize and conduct this work. My Ph.D. thesis has been conducted within the framework of a DFG funded project (QUANTA). I acknowledge the QUANTA partners, Fraunhofer Institute for Solar Energy Systems (Freiburg) and department of Architecture at the Karlsruhe Institute of Technology (KIT). I want to thank Prof. Andreas Wagner for accepting me as a Ph.D. student at the department of Architecture of the Karlsruhe Institute of Technology (KIT), Germany and for supervising my Ph.D. thesis. Many thanks to Prof. Christoph Schierz (TU Ilmenau, D) for accepting to be the co-advisor of my thesis, for all his kind support and advice whilst conducting this research including performing the experimental procedure in person described in chapter 5 which provided valuable insight.
    [Show full text]
  • Kein Folientitel
    1 11. Artificial Intelligence Prof. Dr.-Ing. habil. Wolfgang Oertel Goals: - Concepts of intelligent systems - Overview of basic concepts Contents: • Intelligent System • Knowledge Representation • Problem Solving Focus: Intelligent artificial systems 2 Intelligent Systems Universe of discourse System Perception Environment Sensors Information System (States, Processes, (Programs + Data, Regularities) Effectors Interpreter + Knowledge) Action Universe of discourse: Whole area relevant for the system behaviour Precondition: States and processes exist in space and time according to regularities Task: Control of actions depending on perceptions Goal: correct behaviour, multi-dimensional performance criteria, survival Intelligence levels: - map-controlled (look-up table) - reflex-controlled (fix program) - state controlled (environment mappings) - behaviour-controlled(adaptation by learning) - knowledge-controlled (explicit regularities) - goal-controlled (planning) - use-controlled (optimisation) Knowledge Representation 3 Knowledge Representation Agent: Agent getting knowledge about the real world that - consists of the description of possible states, operations and dependencies, - is used for derivation of state features and operation sequences - can be changed and learned Knowledge base: Set of statements as representations of facts of the real world Inference method: Mechanism to derive new statements from existing statements Knowledge representation language: Language for the specification of definitions, changes, and queries on the
    [Show full text]
  • 2010 Workshop on Scheme and Functional Programming
    2010 Workshop on Scheme and Functional Programming Montreal,´ Quebec,´ Canada Saturday and Sunday August 21-22, 2010 2 Preface This report contains the papers presented at the Eleventh Workshop on Scheme and Functional Programming, held on Saturday and Sunday, August 21 and 22, 2010 at the Universite´ de Montreal.´ Eight papers were submitted in response to the call for papers. Each paper was evaluated by three reviewers. After due deliberation, the program committee decided to accept all papers. This year the program includes lightning talks which we hope will help the exchange of new ideas and developments between the participants. We thank Olin Shivers and Robby Findler who have graciously accepted our invitation to present their work. The Scheme Language committees will report on their progress towards the next Scheme standard. The workshop has been extended from its traditional one day format to a day and a half to accommodate all of the presentations. Finally we would like to thank Robby Findler for helping out with the formatting of the proceedings, and Virginie Allard-Cameus,´ Marie-Josee´ Boulay, and Line Pariseau for taking care of the catering and other local arrangements. Marc Feeley Universite´ de Montreal´ Organizer and Program Chair Program Committee Alan Bawden (independent consultant) Felix S. Klock II (Adobe Systems Incorporated) Olivier Danvy (Aarhus University) Jay McCarthy (Brigham Young University) Christopher Dutchyn (University of Saskatchewan) Scott McKay (ITA software) Marc Feeley (Universite´ de Montreal)´ Steering Committee William D. Clinger (Northeastern University) Christian Queinnec (Universite´ Pierre et Marie Curie) Marc Feeley (Universite´ de Montreal)´ Manuel Serrano (INRIA Sophia Antipolis) Robby Findler (Northwestern University) Olin Shivers (Northeastern University) Dan Friedman (Indiana University) Mitchell Wand (Northeastern University) 3 4 Schedule & Table of Contents Saturday, August 21 8:15 On-site registration and breakfast 9:00 Invited Talk: Eager parsing and user interaction with call/cc ........................
    [Show full text]
  • Applications of Telos
    LISP AND SYMBOLIC COMPUTATION An International Journal c Kluwer Academic Publishers Manufactured in The Netherlands Applications of Telos PETER BROADBERY pabmathsbathacuk CHRISTOPHER BURDORF cbmathsbathacuk School of Mathematical Sciences University of Bath Bath BA AY United Kingdom Keywords Eulisp Telos p ersistence nalizatio n virtual shared memory Abstract EULISP has an integrated ob ject system with reective capabiliti es We discuss some example application s which use these facilities to exp eriment with some advanced and p owerful concepts namely nalization virtual shared memory and p ersis tence A secondary goal is to attempt to illustrate the additional p ossibili ties of metaob ject programming over nonmetalevel techniques Intro duction EULISP provides an ob ject system called Telos which is fully inte grated with the rest of the language and includes a metaob ject proto col MOP which allows programs to reect on the structure and inheri tance relationships b etween classes Reection here is the pro cess of taking a system ob ject such as a class and transforming it into a userlevel ob ject which a program can read and p erhaps mo dify Using this structure a pro gram is free to change the representation and computation of these asp ects to obtain new b ehaviour by sub classing existing classes and metaclasses These new classes have the same status as the systemdened classes so the extensions b ecome a part of the original languageno sp ecial co de is needed to use them This pap er comes in ve parts First we intro duce
    [Show full text]
  • Programming Language Eulisp, Version 0.99
    Programming Language Eulisp Version Programming Language EuLisp version Contents Page Foreword Intro duction Language Structure Scop e Conformance Denitions Error Denitions Compliance Conventions Layout and Typ ography MetaLanguage Naming Denitions Syntax Whitespace and Comments Ob jects Mo dules Directives Exp ort Directive Imp ort Directive Exp ose Directive Syntax Directive Denitions and Expressions Mo dule Pro cessing Mo dule Denition Ob jects System Dened Classes Single Inheritance Dening Classes Dening Generic Functions and Metho ds Sp ecializin g Metho ds Metho d Lo okup and Generic Dispatch Creating and Initializi ng Ob jects Accessing Slots Concurrency Threads Lo cks Conditions Condition Classes Condition Handling ii Programming Language EuLisp version Expressions Denitions and Control Forms Simple Expressions Functions creation denition and application Destructive Op erations Conditional Expressions Variable Binding and Sequences Events Quasiquotation Expressions Summary of Level Expressions and Denitions Syntax of Level dening forms Syntax of Level expressions Syntax of Level macros Annexes ALevel Mo dule Library A Characters A Collections A Comparison A Conversion A Copying A Double Precision Floats A Elementary Functions A Floating Point Numbers A Fixed Precision Integers
    [Show full text]