GNU Jitter

GNU Jitter is a software automatically generating a portable, very efficient language virtual machine with performance close to native code, starting from a relatively high-level specification provided by the user.

The VM state may include registers, stacks or a combination of both along with any runtime structure defined by user code; whenever possible the generator attempts to map such state data structures into hardware machine registers.

The specification contains some C code associated to every VM instruction; the generator takes care of combining such small blocks of C into a whole body of code with low—usually zero—dispatching and branching overhead.

The generated code includes a simple C API to dynamically emit and execute VM code, an optional self-contained driver program for running VM routines from text files, and development features such as disassembling and profiling. The Jitter runtime also features efficient support for conditional branching operations difficult to implement using just C such as value tag checking as required by dynamically typed languages, and arithmetic with overflow checking. VM code has access to procedure call and return operations, in most cases relying on efficient hardware mechanisms.

The generated C code is heavily conditionalised and can be configured to run using different dispatching techniques of varying sophistication; the most efficient dispatching techniques rely on some architecture-specific—but not VM-specific—assembly support provided by Jitter; every dispatching model but one also rely on GNU C extensions.

As a fallback case, in the interest of portability, one dispatching technique is provided, switch dispatching, requiring nothing more than standard C.

Configuration parameters are transparent with respect to the VM semantics and even the C API: a VM routine will always behave in the same way independently from the dispatching technique and other configuration parameters, the only observable difference being execution speed.

A new exact-pointer-finding garbage collector is in preparation. Garbage collection is compatible with Jittery VMs but optional; alternatives such as the Boehm-Demers-Weiser garbage collector are also supported.

Jitter is highly portable and a correct VM will exhibit the exact same behaviour on any platform featuring just a standard C compiler and library; however performance will be best using one of the supported architectures (currently: M68k, MIPS, PowerPC, RISC-V, SPARC, x86_64; second-tier: Aarch64, Alpha, ARM, S390x) on ELF systems with GCC. Of course Jitter is part of the GNU project and is mainly meant for use on the GNU system.

Download

Jitter has had no official release yet, but everybody is welcome to download a source snapshot from the git repository.

Source repository

The GNU Jitter sources are currently managed in a git repository hosted on the author's personal server, from which anybody can download a copy over HTTPS without authentication. Project members with write permission may request SSH access.

Quick introduction

Similarly to most other GNU projects, a source tarball for Jitter contains some machine-generated files, as a convenience for users who are interested in compiling the software but may not have advanced development tools available such as flex, Bison, Autoconf, Automake and the like. In the interest of portability and simplicity Jitter has no unusual compile-time or run-time dependencies.

Using a tarball

Since Jitter has had no official release yet we cannot yet provide a link to an official source tarball; however source tarballs are trivial to automatically generate for developers with access to a reasonably modern GNU system.
We may consider publishing snapshot tarballs if sufficient interest arises.

At the present time the user will have to download a copy of the current sources from the git repository, as explained in the following section.

Downloading the sources from git and preparing the configuration system

The following command line suffices to download a snapshot:

  git clone https://git.ageinghacker.net/jitter

After downloading a git snapshot please follow the instructions in README-hacking. This will involve a line such as

  cd jitter && ./bootstrap

The bootstrap script serves to generate the files needed for configuring and building Jitter, including a configure script.

Compiling the sources

Jitter follows the GNU conventions for configuration and building and supports building out of the source directory; in fact it supports cross-compilation and even running the test suite in a cross build through an emulator.

Of course the simple default way of configuring and building is supported. The following will work from the source directory:

  ./configure && make

After this point, one may want to run

  make check

In the case of make check, after the first build has succeeded and when building with GNU Make the user could invoke make check with -j8 or even dare -j on a sufficiently powerful machine. Please note that building the test suite programs in parallel has steep RAM requirements, at least in the order of gigabytes.

Exploring

At this point a user will find the included Jitter examples such as Structured and JitterLisp already compiled and usable in the build tree under bin/. All Jitter examples support a clean command-line interface including --help: along with the preliminary documentation they are a good starting point for exploring.

Tutorials

The resources below provide introductions to GNU Jitter.

Documentation

The documentation for Jitter is, alas, not yet in a usable state and is therefore not published here at this time. Three manuals will exist:

Structured and JitterLisp are two complete examples of how Jitter can be used, each complex enough to deserve its own manual, and its own examples. Structured is easier and meant as a tutorial for beginners; its manual is still an empty stub. JitterLisp is more advanced and complex, but also has a more complete manual.

All the manuals, in their current state, are accessible from the Jitter repository and can be easily be compiled from their Texinfo source into any format among GNU Info, PDF, PostScript, DVI, HTML. For example executing the following line from the build directory will build all the manuals in PDF format, and show their location in the build tree:

  make pdf && find -name '*pdf'

Every program distributed with Jitter also comes with a man page, automatically generated from the program's output when called with --help and --version.
Invoking each program from the source distribution—including the examples—with such options is a good way to start exploring them.

Occasional informal articles

Luca Saiu's blog will feature the occasional post about Jitter, as might the Jitter project page on Savannah.
Such posts are also included in the GNU Planet federation.

Mailing lists

Right now Jitter has no mailing list of its own, but discussions about Jitter are considered on-topic on the epsilon-devel mailing list: that includes Jitter development and enhancement requests, as well as bug reports and more. The list is public and anybody is welcome to subscribe, even without participating actively.

As per the GNU convention there exists a bug-jitter mail address on the gnu.org server; this address, however, is just an alias for the list above and is not itself associated to a subscription web interface: please use the epsilon-devel Mailman web interface for subscribing.
Given the current low traffic on the list this arrangement seems practical. Should the situation change in the future we could very easily add more independent mailing lists specific to Jitter.

Announcements about Jitter and most other GNU software are made on the info-gnu mailing list (archives).

Security reports that should not be made immediately public can be sent directly to the maintainer. If there is no response to an urgent issue, you can escalate to the general security mailing list for advice.

Notice that Jitter's autor can also be contacted in private.

Online chat

The author is usually logged in as lucasaiu, on the Libera IRC network, in the ##jitter channel (double # sign).

IRC works well for quick discussions or questions where one expects quick turnaround when everybody involved is online at the same time. For every other case email communication is preferred.

Getting involved

Development of Jitter, and GNU in general, is a volunteer effort, and you can contribute. For information, please read How to help GNU. If you'd like to get involved, it's a good idea to join the discussion mailing list (see above).

Other development tools
The Jitter project currently does not use any bug or issue tracker, and the source repository is hosted on the author's personal server. Should more resources of that kind be needed in the future we could easily enable them on GNU Savannah. Right now the Jitter page on Savannah is not useful for the general public.
Maintainer
Jitter is written and maintained by Luca Saiu. He can be contacted through the mailing list or personally.

Licensing

Jitter is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.