Skip to content

Commit 6bbd04c

Browse files
committed
CHB: revert chk_flows_to_argument mode to cons param
1 parent 4be9f01 commit 6bbd04c

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

CodeHawk/CHB/bchlib/bCHTypeConstraintUtil.ml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -467,14 +467,18 @@ let add_stack_address_capability (offset: int) (tv: type_variable_t)
467467

468468
let convert_function_capabilities_to_attributes
469469
(paramindex: int) (caps: type_cap_label_t list): b_attributes_t =
470-
let type_arg_mode_to_attr_string (m: type_arg_mode_t) =
470+
let type_arg_mode_to_cons_attrparam (m: type_arg_mode_t) =
471+
let mkcons (s: string) (i: int option) =
472+
match i with
473+
| Some i -> ACons (s, [AInt i])
474+
| _ -> ACons (s, []) in
471475
match m with
472-
| ArgDerefReadWrite _ -> "read_write"
473-
| ArgDerefRead _ -> "read_only"
474-
| ArgDerefWrite _ -> "write_only"
475-
| ArgDeallocate -> "deallocate"
476-
| ArgFunctionPointer -> "fp"
477-
| ArgScalarValue -> "sv" in
476+
| ArgDerefReadWrite size -> mkcons "read_write" size
477+
| ArgDerefRead size -> mkcons "read_only" size
478+
| ArgDerefWrite size -> mkcons "write_only" size
479+
| ArgDeallocate -> ACons ("deallocate", [])
480+
| ArgFunctionPointer -> ACons ("fp", [])
481+
| ArgScalarValue -> ACons ("sv", []) in
478482
let result = new CHUtils.IntCollections.set_t in
479483
let _ =
480484
List.iter (fun cap ->
@@ -486,7 +490,7 @@ let convert_function_capabilities_to_attributes
486490
AStr callsite;
487491
AStr callee;
488492
AInt argindex;
489-
AStr (type_arg_mode_to_attr_string mode)]) in
493+
type_arg_mode_to_cons_attrparam mode]) in
490494
result#add (bcd#index_attribute attr)
491495
| _ -> ()) caps in
492496
List.map bcd#get_attribute result#toList

CodeHawk/CHB/bchlib/bCHVersion.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ end
9595

9696

9797
let version = new version_info_t
98-
~version:"0.6.0_20260329"
99-
~date:"2026-03-29"
98+
~version:"0.6.0_20260330"
99+
~date:"2026-03-30"
100100
~licensee: None
101101
~maxfilesize: None
102102
()

0 commit comments

Comments
 (0)