How I am testing and documenting Cat
I’m kind of proud of how I’ve been managing the documentation and testing efforts for Cat. I’m using a tab delimited text file to manage the documentation (both the HTML version and the interpreter help system) and tests for the Cat standard library. The interpreter has some hidden functionality for generating bootstrapped level-1 libraries (#lib) and help files (#html), which can be found in the file: CatHelp.cs. The text file contains:
- definition of level-1 functions for bootstrapping Cat implementations from level-0 implementations
- text descriptions
- semantics
- basic tests
- categorization of primitives by function and by level
I’ve now got a working Cat to C++ translator, but I am still doing some testing. Hopefully by tommorrow we can have a reasonably solid implementation of the kernel and a bootstrapped level-1.
In case you are wondering what I mean by bootstrapping, I mean that all level-1 primitives are defined naively using level-0 primitives. A real-world Cat implementation (e.g. the Cat interpreter) would likely provide built-in implementation of key level-1 primitives to improve performance. Bootstrapping is a very useful technique for testing.