Automated transpilation of imperative to functional code using neural-guided program synthesis