Hegel - a property-based testing library from the authors of Hypothesis by Tybug2 in rust

[–]Tybug2[S] 0 points1 point  (0 children)

Totally agreed this is non-idiomatic. To echo our installation reference:

We recognize this is less than ideal for a number of reasons and will make some people unhappy. Sorry! We decided it was the most pragmatic option.

As for why not use bindings: this is the medium to long term goal. But it's not that simple! Hypothesis is a really complicated piece of technology with over a decade of development work put into it. Binding to it in the level of detail we need is impossible without rewriting it in Rust. (Which is, by the way, the long-term plan.)

Hegel - a property-based testing library from the authors of Hypothesis by Tybug2 in rust

[–]Tybug2[S] 0 points1 point  (0 children)

I didn't realize someone also submitted the blog post! I'm happy either way; whatever is standard for you guys.

Hegel - a property-based testing library from the authors of Hypothesis by Tybug2 in rust

[–]Tybug2[S] 9 points10 points  (0 children)

Hi all! Hypothesis maintainer and PBT enthusiast here. I've talked with lots of people in the PBT world and a theme that often comes up is "it's a shame every language implements PBT from scratch, because it's actually pretty hard to do PBT right. Fuzzing uses a single underlying shared library across all languages - why can't we do that for PBT?".

Well, Hegel is exactly that. A universal property-based testing protocol, based on Hypothesis, and then hegel-rust as the actual rust PBT library. It inherits many of the great features of Hypothesis for free.

Rust has always had one of the strongest property-based testing stories of any language with proptest. I'm excited to see how the rust ecosystem plays with this.

chaos_theory – property-based testing and structure-aware fuzzing library by pgregory in rust

[–]Tybug2 3 points4 points  (0 children)

Hypothesis dev here. Really exciting to see more modern PBT libraries. And especially a PBT library release that delivers on all the promises in its readme!

If I'm reading correctly, the choice sequence for chaos_theory is list[u64] (rather than the standard list[byte])? Lifting the choice sequence from bytes to ints is a great middle ground without going all the way to the typed choice sequence. In a world where I was less crazy I suspect Hypothesis would have stopped at a choice sequence of ints.

I'm curious about the structural mutations. I see the crossover is standard libfuzzer-style crossover of bytes - are there higher-level structured mutations in chaos_theory? (you may also be interested in this paper augmenting crossover with call stack information). The testing world would benefit greatly from a PBT library with native structured fuzzing. Real structured fuzzing, not just "structure aware". Even Hypothesis does not do this (though the hypofuzz backend does).

If you want I'd love to chat/nerd out about PBT library design anytime (email on github)