This PR changes the IR generation process so that value/observed variables are never rewritten and their identities are necessarily preserved in the log-probability results. Basically, we create dummy variables for them during IR rewriting and replace them with the value variables at the end (i.e. when log-probabilities are constructed). Most of the changes have to do with the special case of transformations, which demand the ability to change transformed value variables after IR rewriting.
This PR changes the IR generation process so that value/observed variables are never rewritten and their identities are necessarily preserved in the log-probability results. Basically, we create dummy variables for them during IR rewriting and replace them with the value variables at the end (i.e. when log-probabilities are constructed). Most of the changes have to do with the special case of transformations, which demand the ability to change transformed value variables after IR rewriting.