statusfailed / open-hypergraphs

a datastructure for scalable combinatorial syntax
MIT License
10 stars 0 forks source link

Rust reimplementation #3

Open genos opened 3 months ago

genos commented 3 months ago

First off, thanks very much for this repo & catgrad, they're great!

Should it be of interest, I put together a Rust reimplementation of open-hypergraphs to lean on the type system & compiler in helping me understand the code. It's close to feature complete (a few more tests needed), includes proptest for property-based testing similar to hypothesis, and currently supports 2 array backends: one using the standard library's Vec and one based on ndarray.

Again, this project was mostly me using the compiler to understand open hypergraphs better (e.g. all Python assert statements become explicit Result types encoding possible failures, etc.), so feel free to ignore it. Thanks again!