let cil_unop unop ty e =
let op = match unop with
| Neg
(** Unary minus *) |
when Cil.isLogicIntegralType ty ->
"neg_int" (* from integers.why : int -> int *)
| Neg
(** Unary minus *) |
when Cil.isLogicRealOrFloatType ty ->
"neg_real" (* from real.why : real -> real *)
| BNot
(** Bitwise complement (~) *) |
when Cil.isLogicIntegralType ty ->
"bnot" (* from acsl.why : int -> int *)
| LNot
(** Logical Not (!) *) |
->
"bool_not" (* from bool.why : bool -> bool *)
| _ ->
let str = Pretty_utils.sfprintf "%a" !Ast_printer.d_logic_type ty in
raise (UnnamedCilOp ("unary operation for type "^str))
in Fol.Tapp (op, [e])