Generalization of the Feynman-Kac formula for Markov processes | Synapse