Generating expression templates for algorithmic differentiation on domain specific languages | Synapse