A six-vertex model as a diffusion problem: derivation of correlation functions