A slicing-based approach for locating type errorsAn algebraic programming style for numerical software and its optimization