I just tested this on Gen 0.4.5, and this particular claim about choices being retained by regenerate seems to be wrong?
|
The previous value for `:c` will always be retained. |
In particular, if a choice is sampled within an if statement, and the ancestor choice is regenerate s.t. that branch of the if statement no longer gets executed, it seems like regenerate discards that choice, rather than retaining it.
I'm not entirely sure what's meant to be the correct behavior here, but it seems to me that the actual behavior is what we want, and the documented behavior is wrong.
I just tested this on Gen 0.4.5, and this particular claim about choices being retained by
regenerateseems to be wrong?Gen.jl/docs/src/ref/gfi.md
Line 290 in 262f96f
In particular, if a choice is sampled within an
ifstatement, and the ancestor choice is regenerate s.t. that branch of theifstatement no longer gets executed, it seems likeregeneratediscards that choice, rather than retaining it.I'm not entirely sure what's meant to be the correct behavior here, but it seems to me that the actual behavior is what we want, and the documented behavior is wrong.