let cond_unop mem op tyr e te =
let ct1 = object_of te in
let ctr = object_of tyr in
match op with
| Neg ->
begin
match ctr,ct1 with
| C_int ir , C_int i1 ->
boolean_of_int (A.i_neg ir (expr_int mem i1 ir e))
| C_float fr , C_float f1 ->
boolean_of_float (R.f_neg fr (expr_float mem f1 fr e))
| _ -> assert false
end
| BNot ->
begin
match ctr,ct1 with
| C_int ir , C_int i1 ->
boolean_of_int (A.bits_not ir (expr_int mem i1 ir e))
| _ -> assert false
end
| LNot ->
let term = !expr_rec mem e in
begin
match ct1 with
| C_int i1 ->
(A.i_cmp i1 Formula.Ceq (int_of_value term) (F.e_int 0))
| C_float f1 ->
(R.f_cmp f1 Formula.Ceq (float_of_value term)
(F.e_float 0.0))
| C_pointer _ ->
(D.is_null (M.pointer_of_loc(loc_of_value term)))
| _ -> assert false
end