Omega.jl
Omega.jl copied to clipboard
Expand the types of things that can be ids
Currently, in #lang, we are using integer and integer like types for indices. It makes sense to broaden these to basically any type, e.g.:
:name ~ Normal(0, 1)
This will allow us to index into the space of random variables using any type. One consequence is that we'll be able to do what mem is currently doing in other PPLs without any additional machinery. For instance if we want a strength random variable that depends on a person as in the Tug-of-War example from https://probmods.org/chapters/conditioning.html, we'd simply do
strength(person) = person ~ TruncatedNormal(1, 1, 0, Inf)