Separating language dependent and independent tasks for the semantic transformation of numerical programs