-
Notifications
You must be signed in to change notification settings - Fork 162
Description
Some discussion in the PR for the involution DSL (https://github.com/probcomp/Gen/pull/216) and TODO notes from the original PR, spur suggestion of several possible improvements and extensions. I am putting them all in one issue now for conciseness -- if someone wants to address one of these, they can create a specific issue for it and link to/from this issue.
-
Automating detection of discrete / continuous, and simplification of the syntax, resulting in 4 read/write macros, instead of the current 8. The copy macros already do not distinguish between the two.
-
Adding the ability to check whether an address exists or not. (But without reading its value)
-
Currently, the proposal_retval is not allowed to depend on the values of any continuous random choices in the model or proposal trace, because otherwise continuous choice data leaks into the involution and avoids accounting by the Jacobian correction. Perhaps we could allow the dependency, while still ensuring the JAcobian is computed correctly, by using a call to
choice_gradients
on the proposal generative function? -
We could add more checks that we don't write to, or copy to, the same address twice (these can be only enabled in 'check' mode). Also, because it creates noninvertible Jacobian, it is invalid to copy from the same address twice and we could check for that to
-
Users should be able to read and write multivariate random choices (i.e. array-valued) in the involution DSL. The implementation would probably need to flatten them alongside the scalar dimensions for input/output to f_array.
-
Add the ability to pass two optional address namespaces to
@callinv
(one for the proposal, one for the model). Any addresses used by reads, writes or copies will occur under that address namespace. -
In the LaTex doc, explain relationship and differences from http://proceedings.mlr.press/v89/roberts19a.html