Sat, 12 Apr 2008
more robot Lisp ...
The basic motivation in adding Lisp to the SRV-1 firmware is to create a mechanism by which the robot processors could build adaptive world models and reason their way through that world. Our first attempt to integrate Lisp into the Blackfin firmware didn't go so well, though it exposed several problems - limits to the code size supported by the version of ldr-utils we use to build the .ldr firmware images, issues with the old Blackfin toolchain we were using and recommending (2006R2_RC6), and limits to extensibility as well as memory issues with the lithp code itself.
After a long week of head-pounding, these issues seem to have been resolved - we have a new version of ldr-utils for Linux and Windows, we have successfully switched over to the 2008R1_RC8 version of the Blackfin toolchain, and another Lisp interpreter which may prove adequate for our near-term requirements has been integrated into firmware.
Specifically, this version of Lisp was created by Dr Gregory Chaitin of IBM Research to develop proofs for theorems in set theory. It was originally written in Mathematica and then converted to C. Though not aligned with any particular Lisp dialect, it is compact, fast, and easy to use. Descriptions of the code are found here -
http://www.umcs.maine.edu/~chaitin/rov.html (sample code at bottom of page)
The interpreter in the latest firmware has not yet been connected to SRV-1 robot functions (other than memory and console), but robot functions will be added in the coming week, and stack monitoring as well garbage collection are planned. The interpreter can run programs from the flash buffer or operate interactively. The interactive mode is interesting, as we can configure the interpreter to load Lisp libraries from flash and then operate as the robot command processor. One thought is to add a natural language capability to the command interface.
This experiment is just in its earliest stages, and we may discover that the Chaitin Lisp is similarly too limiting, requiring that we consider an Lisp implementation more fully defined such as PicoLisp or TinyScheme. For the moment, however, this seems like a reasonable starting point.