let cast_op t1 te e = 
  let t1 = Ctype t1 in
  if Cil.isLogicIntegralType t1 && Cil.isLogicIntegralType te then e
  else if Cil.isLogicRealOrFloatType t1 && Cil.isLogicRealOrFloatType te then e
  else 
    let str1 = Pretty_utils.sfprintf "%a" !Ast_printer.d_logic_type t1 in
    let str2 = Pretty_utils.sfprintf "%a" !Ast_printer.d_logic_type te in
      raise (UnnamedCilOp ("cast from ["^str2^"] to ["^str1^"]"))