Shorted the code for translate_arith_exp and translate_bool_exp