We present the design and implementation of a generative geometric kernel. The kernel generator is generic, type-safe, parametrized by many design-level choices and extensible. The resulting code has minimal traces of the design abstractions. We achieve genericity through a layered design deriving concepts from affine geometry, linear algebra and abstract algebra. We achieve parametrization and type-safety by using OCaml's module system, including higher order modules. The cost of abstraction is removed by using MetaOCaml's support for code generation coupled with some annotations atop the code type.
The code is available (as .tar.gz).
In order to compile the code, you'll need
More precisely you need MetaOCaml_309_alpha_030; in particular, this code
currently do not work with ber-metaocaml. [It does work with the 'head'
version of ber-metaocaml, which is not yet released].
make allshould compile the main executables. Please refer to the README file for more instructions on the tests.
The code generation tests are under the directory ctest/ which is described in the README file. For reference purposes, we describe some of the tests and include some of their outputs in the following links: