next up previous contents index
Next: C++ Model Up: Programming Interfaces Previous: BASIC Model

Lisp Model

 

Lisp has no distinction between programs and data objects. There are only two types of objects in lisp: list and atom. A list in lisp is a sequence of lists or atoms. An atom is either an identifier or a number. All atoms are chained in one of the special lists in a hash table, which serves as the inventory of all atoms.

The internal representation of a list is a pair of pointers. One points the first element of the list. The other points the rest of the list. The list is null-terminated at the end. Unreferenced lists are cleaned up in garbage collections. A file stream is also a sequence of lists. Execution images of lisp objects on main memory are dumped on a huge file to achieve persistence.



Mori Tetsuya / t2y3141592@gmail.com