SICL documents

A CLOS protocol for lexical environments

We give an overview of implementations of the CLtL2 environment protocol in various Common Lisp implementations, and we suggest an alternative protocol based on generic functions and standard classes. The protocol is implemented in the Trucler library.

Published in the proceedings of the 15th European Lisp Symposium (ELS 2022).

Call-site optimization for Common Lisp

A technique for call-site optimization that can significantly lower the cost of function calls in Common Lisp.

Published in the proceedings of the 14th European Lisp Symposium (ELS 2021).

Omnipresent and low-overhead application debugging

We describe a technique for debugging in languages such as Common Lisp, whereby one thread is used to debug another thread.

Published in the proceedings of the 13th European Lisp Symposium (ELS 2020).

Representing method combinations

Method combinations are underspecified in the Common Lisp standard, and the standard contains some ambiguities. We describe a way to represent method combinations and a way to resolve the ambiguities.

Published in the proceedings of the 13th European Lisp Symposium (ELS 2020).

Bootstrapping Common Lisp using Common Lisp

A description of how the SICL bootstrapping procedure works.

Published in the proceedings of the 12th European Lisp Symposium (ELS 2019).

make-method-lambda revisited

Often, the function make-method-lambda is seen as problematic because of its compile-time behavior. We show how the perceived problems with this function can be solved with some additional information managed by the compiler.

Published in the proceedings of the 12th European Lisp Symposium (ELS 2019).

Partial Inlining Using Local Graph Rewriting

A technique for inlining that works on the intermediate representation in the form of an instruction graph, and that inlines one instruction at a time.

Published in the proceedings of the 11th European Lisp Symposium (ELS 2018).

Fast, Maintainable, and Portable Sequence Functions

We describe a technique for implementing the Common Lisp sequence functions that allows a good compiler to optimize for several special combinations of sequence types and keyword arguments. By using a few custom macros, we are able to express the semantics of these functions in a compact and easy to understand way. Furthermore, only these macros need to be customized for the host Common Lisp implementation, thereby making our code highly portable.

Published in the proceedings of the 10th European Lisp Symposium (ELS 2017).

Removing redundant tests by replicating control paths

We describe a technique for removing redundant tests in intermediate code by replicating the control paths between two identical tests where the second one is dominated by the first. The two different replicas encode two different outcomes of the test, so that the second test can be removed. Our technique uses local graph rewriting, which makes is easy to prove correctness. We also prove that the algorithm always terminates.

Published in the proceedings of the 10th European Lisp Symposium (ELS 2017).

First-class Global Environments in Common Lisp

In a traditional Common Lisp implementation, there is a single global environment, and it is spread out. For instance, the mapping from function names to functions might be in the form of slots in symbols, whereas the mapping from package names to packages might be in a hash table in a special variable.

However, the Common Lisp standard already allows for multiple global environments during file compilation, namely the startup environment, the evaluation environment, and the compilation environment. The standard also allows for all those to be the same, which is how most (all?) existing implementations manage to conform to the standard.

But multiple global environments are useful for other things than compilation. They can be used to isolate different subsystems from each other, which in turn would allow for different versions of a system to be simultaneously present in an image.

In this paper, we describe a CLOS protocol for first-class global environments that make it possible to have multiple global environments in a single image. This technique is also used for SICL bootstrapping, in order to isolate host functionality from target functionality.

Published in the proceedings of the 8th European Lisp Symposium (ELS 2015).

A modern implementation of the LOOP macro

We describe a modern implementation of the Common Lisp loop macro. Most Common Lisp implementations use a derivative of MIT loop, but this implementation predates the Common Lisp standard, which means that it does not use some of the features of the language that were added relatively late. Our implementation uses instances of standard classes to represent loop clauses, and it uses generic functions in order for the code to be modular and extensible.

Published in the proceedings of the 9th European Lisp Symposium (ELS 2016).

Processing List Elements in Reverse Order

We describe a general technique for processing list elements in reverse order, as required by several standard functions when the keyword argument :from-end is supplied with a true value. Several major Common Lisp implementation handle this keyword argument by creating a copy of the original list with the elements in reverse order, and then processing the copy instead of the original. Our paper describes a technique that avoids the memory allocation required to copy the list. Instead, we use a recursive technique that uses a logarithmic amount of stack space, and some additional traversals of the list.

Published in the proceedings of the 8th European Lisp Symposium (ELS 2015).

Fast Generic Dispatch for Common Lisp

This paper describes a technique for fast generic dispatch that can be used in implementations of languages such as Common Lisp. The technique uses inline tests of an object against a series of small integers, in order to determine the class of the object. Existing techniques often use table lookup which is getting sub-optimal due to the cost of memory references in modern processors.

Furthermore, our technique automatically detects obsolete instances, resulting from modifications to a class with existing instances.

Published in the proceedings of the 2014 International Lisp Conference (ILC 2014).

An Improvement to Sliding Garbage Collection

Sliding garbage collection is a technique for compacting garbage collection where the allocation order of objects is preserved. In the literature, this technique is considered impractical because of its cost. However, that cost is based on a particular implementation technique. This paper describes a different implementation technique for sliding garbage collection, that decreases the cost while preserving all the virtues of the basic technique.

Published in the proceedings of the 2014 International Lisp Conference (ILC 2014).

Resolving Metastability Issues During Bootstrapping

Appendix C of the AMOP book ("Living with Circularity) mentions two kinds of issues with metacircularity, namely "bootstrapping issues", and "metastability issues", the latter kind being the most difficult to cope with. In this paper, we develop a technique that we call "satiation", that is able to resolve many metastability issues during bootstrapping, thereby simplifying the overall design of the system.

Published in the proceedings of the 2014 International Lisp Conference (ILC 2014).


robert.strandh@gmail.com