The inv_gamma(0.001, 0.001) thing comes from the BUGS examples
which tried to use it to approximate flat priors. No idea where
the interval priors are coming from, but I assume the same desire
not to add information to the data.
The uniform() is really just there because it seemed like it
was necessary for completeness. As is, the only possible use for
it is if you need a normalized probability. Otherwise, it's
redundant with the constraint declarations. And it's definitely
bad if you have an unconstrained variable drawn according to
a uniform.
We could try to detect some of these. We have the parse tree for
the Stan program as an abstract syntax tree before we do code
generation. Or we could try to catch it as it happens.
- Bob