The main goal of this Lisp version is to implement a fully compliant ISLISP system (when launched with --islisp flag, it is strictly restricted to ISO/IEC 13816:2007(E) specification). The secondary goal is to provide a complete embeddable Lisp system linkable to C/C++ or Java (via Java Native Interface (JNI)). A callback mechanism is used to communicate with the external program. Other goals are to be usable as scripting language or glue language and to produce standalone program executables.
;; OpenLisp v11.x.y (Build: XXXX) by C. Jullien [Jan 01 20xx - 10:49:13];; Copyright (c) Eligis - 1988-20xx.;; System 'sysname' (64-bit, 8 CPU) on 'hostname', ASCII.;; God thank you, OpenLisp is back again!?(fib20);; elapsed time = 0.003s, (0 gc).=6765?_
Alternate solutions include running OpenLisp from Emacs via setting up Emacs inferior-lisp-mode, or using an integrated development environment (IDE) which supports OpenLisp syntax. LispIDE by DaanSystems does so natively.
Technology
Memory manager
Internally, OpenLisp uses virtual memory to allocate and extend objects automatically. Small objects of the same type are allocated using a Bibop (BIg Bag Of Pages) memory organization. Large objects use a proxy which point to the real object in Lisp heap. The conservative garbage collection is a mark and sweep with coalescing heap (sweep phase can be configured to use threads).
Data types
OpenLisp uses tagged architecture (4 bits tag on 32-bit, 5 bits tag on 64-bit) for fast type checking (small integer, float, symbol, cons, string, vector). Small integers (28 bits on 32-bit, 59 bits on 64-bit) are unboxed, large (32/64-bit) integers are boxed. As required by ISLISP, arbitrary-precision arithmetic (bignums) are also implemented. Characters (hence strings) are either 8-bit (ANSI, EBCDIC) or 16/32-bit if Unicode support is enabled.
In 1988, the very first motive behind OpenLisp was to implement a Lisp subset to extend EmACT, an Emacs clone. ISLISP became an obvious choice quickly. Further development ensued.
Lisp compiler translates Lisp source code to the following intermediate code. It is followed by a peephole optimization pass that uses this intermediate format to analyze and optimize instructions.
After optimization, final LAP code is:
^Simonsen, Keld (13 March 1999). "Islisp – faq". ISO/IEC. Retrieved 11 November 2016.
^Nobuto, Izumi (Tohoku Univ., Grad. Sch.); Takayasu, Ito (Tohoku Univ., Grad. Sch.) (1999). "Interpreter and Compiler of the ISO Standard Lisp ISLISP". Transactions- Information Processing Society of Japan. Transactions of Information Processing Society of Japan. ISSN0387-5806. Archived from the original on 26 August 2018. Retrieved 17 June 2013.{{cite journal}}: CS1 maint: multiple names: authors list (link)
^McJones, Paul (2010). "ISLISP". Software Preservation Group. Retrieved 18 March 2012.
^"ISO/IEC 13816:1997(E)". International Organization for Standardization. Retrieved 11 November 2018.