Open marcoct opened 7 years ago
For example, in the initial tutorial notebook, the names "foo-$n" and "foo_$n" were mixed up.
Done.
I am removing this feature temporarily, because it was confusing during my re-write of the probabilistic program tracing with subtraces (https://github.com/probcomp/Gen.jl/issues/58). There is some interaction with the design of subtraces. For example:
It seems reasonable to only check that all constrained (or proposed or intervened) top-level addresses were visited, and rely on sub-generators to check that their constrained sub-addresses were visited.
However, if we remove constraints (or proposals or interventions) to a sub-trace using delete!
, such that there are no more constraints on a given sub-trace, we need some of way of knowing that we no longer have to check that the top-level address of the sub-trace was visited.
Perhaps we should record the full list of directives (constraints, proposals, or interventions) applied to the trace, keyed by the top-level address of each subtrace. Then, in every call to delete!
, we can remove a record, and check if there are no more directives for that sub-trace address.
It is illegal to constrain the value of a random choice without also guaranteeing that that random choice exists. This requirement allows us to check that a set of constraints was valid, by checking that every constraint was visited during the execution. This is a critical error-reporting check, because otherwise common naming issues will go un-noticed.