In order to write correct generators, users need to understand what should be guaranteed by the core operations.
Current status:
gen::choose(n)
- Only returns values
<= n
- For any infinite set of calls, at least one will return
0
- Satisfied by an exhaustive strategy
- Almost-certainly satisfied by a random strategy
gen::succeed()
- May not return (this is only a user hint)
gen::shrink(n)
gen::label(id)
- Does nothing by itself (only affects the behavior of other effects)
Once this is worked out these guarantees should be properly documented.
In order to write correct generators, users need to understand what should be guaranteed by the core operations.
Current status:
gen::choose(n)<= n0gen::succeed()gen::shrink(n)< ngen::label(id)Once this is worked out these guarantees should be properly documented.