From: John Morrison <jm@ma...> - 2005-06-09 17:00:04
Now that I have gotten a first cut of my first cut at an sb-alien (and
hopefully other) FFI generator to work, I am seeking packaging advice.
I don't know the stylistically best way to do this so other people can
The software is broken into parts:
(1) The part that reads gccxml's XML and produces sb-alien bindings.
There is currently only a functioning backend for SBCL, but I am going
to do a STELLA backend, and I figure CMUCL shouldn't be too dissimilar
from SBCL. (Aside from some substantive limitations like an inability
to get at structure tag members due to gcc producing
synthetic/artificial structures/classes of non-zero size but with NO
slots defined, right now it just eats the XML and spits out a .lisp
file. In order to get to the slots (which I don't need to do as the
several million lines of C++ I'm chewing on contains accessors and
mutators for all slots), I might eventually want to go the sb-grovel
route and product a C++ file that, when compiled, will spit out all
this info). Right now, also, I bind C++ methods to Lisp functions,
but I'd like to emit a CLOS class for each C++ class (and mirror the
C++ hierarchy so no casting is required) and emit CLOS methods for
each C++ method.
(2) A small directed graph library which is needed to figure out the
right order in which the bindings should be emitted, as alien types
need to be declared before they are used in functions as either return
or parameters types. (I will need to significantly enhance this graph
library later as I wish to draw orthogonal graphs in McCLIM for my
application, amongst other graph traversal uses.)
(3) XP-TEST, which I use in the graph library's test suite (debugging
the graph library was easier with this test suite, and I know the
further enhancements -- whether done by me or somebody else -- will be
easier with it, too).
What's the Right Thing To Do? One big defsystem with three modules?
Three separate defsystems with judicious use of "require?"
Thanks in advance for the advice!
==== John Morrison
==== MAK Technologies Inc.
==== 10 Fawcett Street, Cambridge, MA 02138
==== vox:617-876-8085 x115