Software Design For Probabilistic Safety: Stochastic Reachability And Circadian Control