Representing Structural and Functional Knowledge with Stochastic Petri Nets