I am currently reading a proof of the Feynman-Kac representation theorem. The main step in the proof is to consider an "interpolation martingale" which has the form $$M_s := \varphi(t-s, x+B_s)\exp \left( \int_0^t \psi(x+B_r) dr \right).$$ The author claims that since $$dM_s = \exp \left( \int_0^t \psi(x+B_r) ds \right) \partial_x \varphi(t-s,x+B_s) dB_s,$$ it follows that $M_s$ is a local martingale.
I am not familiar with this condition. From my understanding, suppose we may write $M_t$ as $f(t,B_t)$. Then $M_t$ is a local martingale if and only if $$\left( \partial_t - \frac{1}{2} \partial_x^2 \right) f(t,x)=0.$$ Can someone point out to me what the author is use here? Note that such an explicit representation of $M_s$, that is, of the form $f(t,B_t)$, I do not believe is possible. Perhaps I am wrong. Thanks in advance.