A Formal Framework for Stochastic Discrete Event