rsonquery / rsonpath

Blazing fast JSONPath query engine written in Rust.
https://rsonquery.github.io/rsonpath/
MIT License
50 stars 8 forks source link

Proptests for automaton compilation #59

Open V0ldek opened 1 year ago

V0ldek commented 1 year ago

Is your feature request related to a problem? Please describe. In the unending quest to proptest all the things, we should have tests for the automata we compile. This is a big ask, since we don't really have automata infrastructure.

Describe the solution you'd like The only reasonable proptest design for this seems to be fuzzing paths and checking whether they are accepted. We would take a query, compile the automaton, and then generate arbitrary paths that should be accepted by the query. The same for paths that should not be accepted.

This can be done for both the NFA and the DFA.

Describe alternatives you've considered For our NFA -> minimal DFA code, we can also test parity between the input and output automaton. We can simulate both of them side by side, making sure they're the same. This might be a potential additional issue.

github-actions[bot] commented 1 year ago

Tagging @V0ldek for notifications