Closed wrengr closed 8 years ago
The problem is that runExpect
was initializing its nextFreshNat
to the nextFree
which apparently is insufficiently fresh. I fixed this by switching to the newly defined nextFreeOrBind
in patch c9641a9
$> cat bug15.hk
bet <~ beta(5,3)
x1 <~ factor(bet)
if bet > 0.7:
return true
else:
return false
$> cat bug15.hk | ./dist/build/normalize/normalize
weight(recip(integrate x2 from 0.0 to 1.0:
x3 = unsafeProb(x2)
((x3 ** 4.0) *
(unsafeProb((1.0 + negate(fromProb(x3)))) ** 2.0) *
recip(betaFunc(5.0, 3.0)) *
x3 *
expect x5 match (0.7 < x3):
true: return true
false: return false:
1.0)),
bet <~ beta(5.0, 3.0)
x1 <~ weight(bet, return ())
match (0.7 < bet):
true: return true
false: return false)
:+1:
Email from @zaxtax:
When I call normalize on the following program:
I get the following error:
Note this happens after expect is called, as if I print out the AST for the program, every Variable has a unique ID:
Any ideas?