-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit recursion depth based on size instead of configuration value #37
Comments
I have no idea; @moodmosaic? |
The sized approach of FsCheck is more elegant since you can use the size parameter via |
Some thoughts around the |
That is what I expected. @cmeeren, how do you feel about removing I am interested to implement this simply because I think it might be a good challenge for me. |
Yes, I really like the |
I'm happy to use |
They’ll have that control through the size... What happens when |
How so? Isn't |
Yes, but you can interpret it (in this case) any way you want, e.g. halve it on each recursion (as FsCheck mentions in the docs). |
Ok. (For reference, here's the mentioned docs.) I won't be able to work on this, but I'm more than happy to take a PR that makes sure that auto-generating recursive types aren't unnecessarily slow (i.e., be conservative with the defaults, e.g. exponential with a max depth of, say, 3? Open to suggestions), and gives the user some kind of control over the recursion depth. The readme should have an example of how to control it. |
PR #21 added a configuration value called
RecursionDepth
to prevent stack overflows when generating a recursive type (c.f. #19 (comment)).FsCheck solves this problem by relating the recursion depth to the size parameter.
This seems like a better solution to me, but I am just getting seriously into property-based testing, so I am probably unaware of all the considerations.
What are the tradeoffs for this configuration value vs utilizing the size parameter?
The text was updated successfully, but these errors were encountered: