CMUCL
Encyclopedia
CMUCL is a free
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 Common Lisp
Common Lisp
Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in ANSI standard document ANSI INCITS 226-1994 , . From the ANSI Common Lisp standard the Common Lisp HyperSpec has been derived for use with web browsers...

 implementation, originally developed at Carnegie Mellon University
Carnegie Mellon University
Carnegie Mellon University is a private research university in Pittsburgh, Pennsylvania, United States....

.

CMUCL runs on most Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

 platforms, including Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

 and BSD
Berkeley Software Distribution
Berkeley Software Distribution is a Unix operating system derivative developed and distributed by the Computer Systems Research Group of the University of California, Berkeley, from 1977 to 1995...

; there is an experimental Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 port as well. Steel Bank Common Lisp
Steel Bank Common Lisp
Steel Bank Common Lisp is a free Common Lisp implementation that features ahigh performance native compiler, Unicode support and threading....

 is derived from CMUCL. The Scieneer Common Lisp
Scieneer Common Lisp
Scieneer Common Lisp is a commercial implementation of the Common Lisp programming language featuring support for Symmetric multiprocessing on a range of Linux, Solaris and HP-UX platforms. The compiler generates fast 64-bit and 32-bit native code.-License:...

 is a commercial derivative from CMUCL.

History

The earliest implementation predates Common Lisp and was part of Spice Lisp
Spice Lisp
Spice Lisp is a Lisp dialect and its implementation originally written by CMU's Spice Lisp Group which targeted the microcode of the 16-bit PERQ workstation and its Accent operating system; it used that workstation's microcode abilities to implement a stack architecture to store its data...

, around 1980. In 1985 Rob MacLachlan started re-writing the compiler to what would become the Python compiler and CMUCL was ported to Unix workstations such as the IBM PC RT, MIPS and SPARC. Early CMUCL releases did not support Intel's x86 architecture due to a lack of registers. CMUCL strictly separated type-tagged and immediate data types and the garbage collector would rely on knowing that one half of the CPU registers could only hold tagged types and the other half only untagged types. This did not leave enough registers for a Python backend.

After CMU canceled the project (in favor of a Dylan implementation using some of CMUCL's compiler base) maintenance has been taken over by a group of volunteers. By 1996 this group was making regular releases on its own infrastructure.

Around the same time a port to Intel's x86 architecture was completed, first running on FreeBSD
FreeBSD
FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...

, later Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...

. The problem of lacking registers was solved by a new conservative garbage collector. This new garbage collector accepts any value of any type in the registers, and treats anything that might be a pointer as a pointer for the purpose of not collecting or moving its target.

Compiler and other code execution units

  • CMUCL features an interpreter that is mainly used for the REPL, but can be used for faster loading of Lisp files that don't need compilation.
  • A machine to interpret compact bytecode (which can be emitted from the compiler). This is rarely used now, but was popular in early CMUCL releases because image sizes were drastically reduced at a time where download bandwidth on the Internet was low.
  • A native code compiler
    Compiler
    A compiler is a computer program that transforms source code written in a programming language into another computer language...

     named "Python" (not to be confused with the Python programming language
    Python (programming language)
    Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

    ). If Common Lisp source code has been written with appropriate declarations and is organized with speed in mind the Python compiler generates code that is almost free from overhead compared to code compiled from languages like C++. Some inefficiencies such as function call interfaces and lack of pointer-free arrays of user-defined data types are dictated by the Common Lisp standard and still need to be worked around (e.g. by inlining more and using macros to build constructs that look like user-defined structures but are actually accessing fields in preallocated specialized arrays). The Python compiler also features powerful type inference
    Type inference
    Type inference refers to the automatic deduction of the type of an expression in a programming language. If some, but not all, type annotations are already present it is referred to as type reconstruction....

    s, helping the programmer in writing overhead-free code by either inferring types automatically or issuing hints about missed optimization opportunities.

Features

  • Generational garbage collection
    Garbage collection (computer science)
    In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program...

     and multiprocessing capability on the x86 ports.
  • A foreign function interface
    Foreign function interface
    A foreign function interface is a mechanism by which a program written in one programming language can call routines or make use of services written in another. The term comes from the specification for Common Lisp, which explicitly refers to the language features for inter-language calls as...

     which allows interfacing with C code and system libraries, including shared libraries on most platforms, and direct access to Unix
    Unix
    Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

     system calls.
  • Support for interprocess communication and remote procedure calls.
  • An implementation of CLOS
    CLOS
    The Common Lisp Object System is the facility for object-oriented programming which is part of ANSI Common Lisp. CLOS is a powerful dynamic object system which differs radically from the OOP facilities found in more static languages such as C++ or Java. CLOS was inspired by earlier Lisp object...

    , the Common Lisp Object System, which includes multimethods and a metaobject protocol.
  • A graphical source-level debugger using a Motif interface, and a code profiler.
  • An interface to the X11 Window System (CLX
    CLX (Common Lisp)
    CLX is the standard X Window System protocol client library for the Common Lisp programming language,1:3 the C equivalence of which is Xlib....

    ), and a sophisticated graphical widget library (Garnet).
  • Programmer-extensible input and output streams.
  • Hemlock
    Hemlock (editor)
    Hemlock is a free Emacs-style text editor for most POSIX-compliant Unix systems. It follows the tradition of the Lisp Machine editor ZWEI and the ITS/TOPS-20 implementation of Emacs, but differs from many other Emacs variants in that is written in Common Lisp rather than the usual Emacs Lisp — that...

    , an Emacs
    Emacs
    Emacs is a class of text editors, usually characterized by their extensibility. GNU Emacs has over 1,000 commands. It also allows the user to combine these commands into macros to automate work.Development began in the mid-1970s and continues actively...

    -like editor implemented in Common Lisp.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK