Re:Paradigms of Artificial Intelligence Programming (1992)
by lispm on Tuesday February 27, 2018 @03:44AM
(#16471989)
If you look at code with really low-level operators like CAR, CDR, CONS, ATOM, NULL, etc then this is the assembly level of Lisp. If you look at some Lisp Machines, which had a processor with a for Lisp optimized instruction set, many of those mapped relatively direct to corresponding machine instructions - using a mostly stack machine.
The CLISP implementation of Common Lisp has a virtual machine implementation.
Unrelated to that there is also the idea to program assembler code embedded in Lisp - this is often called LAP code (Lisp Assembler Program). Several implementations are using this.
The CLISP implementation of Common Lisp has a virtual machine implementation.
Let's take some simple demonstration code:
Now we compile it for the CLISP virtual machine: If we look at the disassembled virtual machine code, you'll see that the machine code has actually similar primitives for its stack machine: Unrelated to that there is also the idea to program assembler code embedded in Lisp - this is often called LAP code (Lisp Assembler Program). Several implementations are using this.