Collapsiv
Collapsiv is a methodology for allocating term data structures in a space-efficient manner. It implements maximal sharing in the same manner that hash consing does, but without the overhead of a hash table. Instead, terms are constructed on a stack, the bottom of which serves to persist term structures; this storage is searched recursively whenever a new term is created, and aliases (pointers into the stack) are returned when an existing identical term structure is found therein.
In this respository is a proof-of-concept implementation of Collapsiv in
C99 as a shared library. The included GNU-compatible Makefile will build
static and dynamically linked versions of this library, as well as the
executable test_collapsiv
which will run the tests.
TODO
- better documentation
- more tests
- better naming convention for functions
- convert to C89 aka ANSI C
- translate to 6502 assembly language
Commit History
@master
git clone https://git.catseye.tc/Collapsiv/
- Do not normally expose in header the functions used for testing. Chris Pressey 10 days ago
- Switch from build script to Makefile. Silence compiler warnings. Chris Pressey 10 days ago
- Place under 2-clause BSD license, following REUSE 3.2 convention. Chris Pressey 2 months ago
- Source and tests for initial Collapsiv implementation in C99. Chris Pressey 2 months ago
- Provisional first commit - add README describing this project. Chris Pressey 2 months ago