(* From: Distribution Estimation for Probabilistic Loops https://arxiv.org/pdf/2205.07639#page=3.a:= 0.5b:= 0.2σ:= 0.2w:= 0r:= 2while true dow:= Normal(0,1)r:= (1−a)r+ ab+ σwend while A flip(1/2) loop guard gives almost-sure termination while retaininginfinitely many reachable states after determinization. The stoppingcoins remain random when the Gaussian draws become their means.*)let a = 0.5 inlet b = 0.2 inlet sigma = 0.8 inlet w = 0 inlet r = 2 inlet loop = rec loop w => fun r => if flip(1/2) then let w = gauss(0, 1) in let r = (1 - a) * r + a * b + sigma * w in loop w r else rinloop w r