You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main issue is the use of out-of-bounds label 3 in the generated matrix equations.
The following version of the program (where p is sampled from uniform[1,2]) produces no error:
main:
p <~ uniform([1, 2]:[int])
x <~ bernoulli(1/2)
y <~ bernoulli(1/2)
return x
My working hypothesis is that there's a label generated for uniform[1] but no corresponding equation (because uniform[1] is essentially p <- 1), leading to the OOB error. This violates an assumption of the SparseLinAlg backend, that the highest occurring label is less than the total number of subtrees.
Two possible solutions:
Do alpha-renaming of labels before generating equations.
Desugar x <~ uniform([c]) to x <- c.
Solution 2 is easier but doesn't solve the more general issue (the assumption on labels made by the SparseLinAlg backend).
The text was updated successfully, but these errors were encountered:
leading to OOB errors in the SparseLinAlg backend on programs like:
which produces output:
The main issue is the use of out-of-bounds label 3 in the generated matrix equations.
The following version of the program (where p is sampled from
uniform[1,2]
) produces no error:My working hypothesis is that there's a label generated for
uniform[1]
but no corresponding equation (becauseuniform[1]
is essentiallyp <- 1
), leading to the OOB error. This violates an assumption of the SparseLinAlg backend, that the highest occurring label is less than the total number of subtrees.Two possible solutions:
x <~ uniform([c])
tox <- c
.Solution 2 is easier but doesn't solve the more general issue (the assumption on labels made by the SparseLinAlg backend).
The text was updated successfully, but these errors were encountered: