Skip to content

Commit 718ca6c

Browse files
committed
Address review feedback
1 parent 41430e2 commit 718ca6c

6 files changed

Lines changed: 7 additions & 9 deletions

File tree

frontend/model/cabs_to_ail_aux.lem

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ let rec mk_zeroInit_aux tagDefs (Ctype.Ctype _ ty) =
152152
error "[Cabs_to_ail.mk_zeroInit_aux] - internal ERROR: Union"
153153
end
154154
| Ctype.Byte ->
155-
(* TODO: check *)
156155
A.ConstantInteger (A.IConstant 0 A.Octal Nothing)
157156
end
158157
let mk_zeroInit tagDefs ty =

frontend/model/core_aux.lem

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ let rec core_object_type_of_ctype (Ctype _ ty) =
4848
| Union tag_sym ->
4949
Just (OTy_union tag_sym)
5050
| Byte ->
51-
(* TODO add an OTy_byte? *)
51+
(* May need to revisit based on CN *)
5252
Just OTy_integer
5353
end
5454

frontend/model/defacto_memory.lem

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ let rec mkUnspec (Ctype _ ty) =
435435
let ((memb_ident, (_, _, _, ty)), _) = Ctype_aux.get_unionDef tag_sym in
436436
MVunion tag_sym memb_ident (mkUnspec ty)
437437
| Byte ->
438-
MVinteger Char (IV Prov_none IVunspecified)
438+
MVinteger (Unsigned Ichar) (IV Prov_none IVunspecified)
439439
end
440440

441441

memory/concrete/impl_mem.ml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -964,9 +964,8 @@ module Concrete : Memory = struct
964964
( AbsByte.provs_of_bytes bs1
965965
, begin match extract_unspec bs1' with
966966
| Some cs ->
967-
let char_signed = (Ocaml_implementation.get ()).is_signed_ity Char in
968-
MVinteger ( Char
969-
, mk_ival prov (int_of_bytes char_signed cs))
967+
(* C++ has std::byte typedef's to unsigned char, hence false *)
968+
MVinteger ( Char , mk_ival prov (int_of_bytes false cs))
970969
| None ->
971970
MVunspecified cty
972971
end , bs2)

memory/vip/impl_mem.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,8 @@ match ty with
452452
let (bs1, bs2) = L.split_at (Common.sizeof cty) bs in
453453
( begin match interp_bytes bs1 with
454454
| `SPECIFIED (prov_status, _, cs, _) ->
455-
let char_signed = (Ocaml_implementation.get ()).is_signed_ity Char in
456-
let n = int_of_bytes char_signed cs in
455+
(* C++ has std::byte typedef's to unsigned char, hence false *)
456+
let n = int_of_bytes false cs in
457457
MVinteger ( Char
458458
, match prov_status with
459459
| `NOPROV ->

ocaml_frontend/pprinters/pp_core_ctype.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ let rec pp_ctype (Ctype (_, ty)) =
8787
| Union sym ->
8888
!^ "union" ^^^ pp_symbol sym (*!^(Pp_symbol.to_string sym)*)
8989
| Byte ->
90-
!^ "cn_byte"
90+
!^ "byte"
9191

9292

9393
(*

0 commit comments

Comments
 (0)