This page moved

This page is now deprecated in favor of Google code/discuss. See:

Forklift

Forklift is a compiler for fluidly interfacing high level languages with C. It reads a set of unannotated C header files and a set of pattern matching rules about their use, and outputs ready to use library for your favorite high level language.

Skip to a demo of the typestub algebra. A demo of the patttern matching frontend is forthcoming.

What is the forklift view of library software development?

What are economic substitutes to the forklift view of library software development?

What makes forklift different?

Why are virtual machines listed as an economic substitute?

Virtual machines attempt to solve Forklift's problem domain from a different angle. Instead of solving the langugage integration problem, they rewrite the basic functionality of an operating system and make it available to languages conforming to a particular notion of memory management and function calling convention. Aggregating libraries into high level languages has always been possible for single languages (eg, CPAN). But VMs have been effective in making the economics of this wrapping labor scale better. That is, the same number of labor hours go to connecting larger number of language,library pairs. The forklift way divorces the library annotation part from the method of memory management, allowing forklift-annotated libraries to be called from unorthodox kinds of runtime environments.

Limitations

Further Reading

Here are some readings for getting a better sense of what forklift is about.

Design Discussions

Downloads

Browse the source code via cvsweb.

Download release 0.5.1. (92k .tar.gz)

Download release 0.5.2. (198k .tar.gz) (June 2007)

Credits

Special thanks for the systems which came before, which gave good examples of what works and what doesn't. Systems observed include:

Reini Urban has an interesting survey "Design Issues for Foreign Function Interfaces: A survey of existing native interfaces for several languages and some suggestions." http://xarch.tu-graz.ac.at/autocad/lisp/ffis.html

Olin Shivers years back had a project bullet that got me thinking on the back burner about FFI auto generation.

Ken Russell gave me the first experience of how fun it can be to have language bindings. His system Ivy bound OpenInventor in Scheme and was 90% automatically generated. The compiler munched on C++ header files. I believe it only handles the call-ins and he wrote the Ivy call-outs by hand.

LablGTK is a really nice binding, IMHO. It binds GTK in Objective Caml with labels which were optional in O'Caml until version 3.05.





Forklift is a subcomponent of the adlibitum project.



Return to Jeff's top page

Send mail to Jeff: jehenrik (put an at here) yahoo (put a dot here) com.