ArticleslgStudy

computer science

CMU Common Lisp

CMU Common Lisp is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand CMU Common Lisp rather than just read about it. In short: CMUCL is a free Common Lisp implementation, originally developed at Carnegie Mellon University. CMUCL runs on most Unix-like platforms, including Linux and BSD; there is an experimental Windows port as well.

Key takeaways

  • CMU Common Lisp belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect CMU Common Lisp to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of CMU Common Lisp from memory before moving on to harder problems.

Reference excerpt

CMUCL is a free Common Lisp implementation, originally developed at Carnegie Mellon University. CMUCL runs on most Unix-like platforms, including Linux and BSD; there is an experimental Windows port as well. Steel Bank Common Lisp is derived from CMUCL. The Scieneer Common Lisp was a commercial derivative from CMUCL.

History The earliest implementation predates Common Lisp and was part of Spice Lisp, 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, later Linux. 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 when download bandwidth on the Internet was low. A native code compiler named "Python" (not to be confused with the Python programming language). 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 inferences, helping the programmer in writing overhead-free code by either inferring types automatically or issuing hints about missed optimization opportunities.

Features Generational garbage collection and multiprocessing capability on the x86 ports. A foreign function interface which allows interfacing with C code and system libraries, including shared libraries on most platforms, and direct access to Unix system calls. Support for interprocess communication and remote procedure calls. An implementation of CLOS, 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), and a sophisticated graphical widget library (Garnet). Programmer-extensible input and output streams. Hemlock, an Emacs-like editor implemented in Common Lisp.

See also

Steel Bank Common Lisp List of public domain projects

References

External links CMUCL Home Page

Worked examples

Example 1 — a first encounter with CMU Common Lisp

Start with the simplest possible case. Write down what CMU Common Lisp claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to CMU Common Lisp before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about CMU Common Lisp ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of CMU Common Lisp

In research
CMU Common Lisp appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses CMU Common Lisp in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
CMU Common Lisp is common in secondary-school and first-year university syllabi. It links to neighbouring topics Carnegie Mellon University software, Common Lisp (programming language) software, Common Lisp implementations, so understanding it makes those chapters shorter.
In everyday life
Look for CMU Common Lisp outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “CMU Common Lisp” →

How to study CMU Common Lisp in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what CMU Common Lisp means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain CMU Common Lisp out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is CMU Common Lisp in simple terms?

CMUCL is a free Common Lisp implementation, originally developed at Carnegie Mellon University. CMUCL runs on most Unix-like platforms, including Linux and BSD; there is an experimental Windows port as well.

Why does CMU Common Lisp matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study CMU Common Lisp?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on CMU Common Lisp.

Tags

  • Carnegie Mellon University software
  • Common Lisp (programming language) software
  • Common Lisp implementations
  • Free and open source compilers
  • Free and open source interpreters
  • Public-domain software with source code

Keep exploring