Home

Awesome

pilisp

Build Status codecov Github Pages docs

Introduction

Pilisp aims to be a small LISP interpreter for the 1.5 version of the language described here.

Features

Performance

These are the performances compared to other Lisp interpreters: CLisp, Yoctolisp (similar performances to Femtolisp) and SBCL.

alt text

Language

The language accepted by the interpreter is inspired to the Common Lisp, but keeps the homoiconicity feature of the original definition of the LISP 1.5: data and instructions are kept together in the same data structure, the cons cell.

Builtin functions

Bytecode instruction set

You can optionally produce one mid-representation for some expression. The bytecode will run faster than normal LISP code. To achieve this goal Pilisp interpreter adds these instructions to the language:

Instruction set

CodeMeaning
!load constant
?load symbol
@load name from stack
$apply builtin lambda
[A-Z]numbers from 0 to 25

Documentation

Full code documentation can be found on github pages. It is automatically generated using Doxygen, with Bootstrap CSS (using this guide). The code documentation is generated every push with Travis CI, so it should be always up to date.

Installation

Prerequisites

Installing with Meson

These commands should run on any OS. To build the ninja.build file run. The -Dc_args will add optimizations.

meson build -Dc_args=-Og

To build the executable in the build directory run

ninja -C build

To install pilisp run with root permissions

ninja install -C build

To run tests use

ninja test -C build

By default Meson won't allow debugging: if you want to run a debbuger you have to write:

meson build -Db_coverage=true

Run with Valngrid:

meson test --wrap=valgrind 'testname'