@@ -3218,8 +3218,13 @@ type memory_base_t =
32183218| BRealignedStackFrame (* * local stack frame after realignment *)
32193219| BAllocatedStackFrame (* * extended stack frame from alloca *)
32203220| BGlobal (* * global data *)
3221- | BaseVar of variable_t (* * base provided by an externally controlled variable,
3222- e.g., argument to the function, or return value from malloc *)
3221+ | BaseVar of variable_t
3222+ (* * base provided by an externally controlled variable,
3223+ e.g., argument to the function, or return value from malloc *)
3224+
3225+ | BaseArray of variable_t * btype_t
3226+ (* * base provided by a typed array address *)
3227+
32233228| BaseUnknown of string (* * address without interpretation *)
32243229
32253230
@@ -3228,7 +3233,8 @@ type memory_offset_t =
32283233 | NoOffset
32293234 | ConstantOffset of numerical_t * memory_offset_t
32303235 | FieldOffset of fielduse_t * memory_offset_t
3231- | IndexOffset of variable_t * int * memory_offset_t
3236+ | IndexOffset of variable_t * int * memory_offset_t (* deprecated *)
3237+ | ArrayIndexOffset of xpr_t * memory_offset_t (* scaled by element type size *)
32323238 | UnknownOffset
32333239
32343240
@@ -3269,6 +3275,7 @@ object
32693275 method mk_allocated_stack_reference : memory_reference_int
32703276 method mk_realigned_stack_reference : memory_reference_int
32713277 method mk_basevar_reference : variable_t -> memory_reference_int
3278+ method mk_base_array_reference : variable_t -> btype_t -> memory_reference_int
32723279 method mk_unknown_reference : string -> memory_reference_int
32733280
32743281 (* accessors *)
@@ -3375,8 +3382,8 @@ and constant_value_variable_t =
33753382 assigned by the callee at call site [iaddr] to the argument with
33763383 name [name].*)
33773384
3378- | MemoryAddress of int * memory_offset_t * string option
3379- (* * [MemoryAddress (memrefix, offset, optname) represents a memory
3385+ | MemoryAddress of int * memory_offset_t * string option * btype_t option
3386+ (* * [MemoryAddress (memrefix, offset, optname, opttype ) represents a memory
33803387 address with external meaning (e.g., a global arrray) *)
33813388
33823389 | BridgeVariable of ctxt_iaddress_t * int (* call site, argument index *)
@@ -3427,7 +3434,8 @@ object ('a)
34273434 Returns [Error] if this variable is not a memory variable. *)
34283435 method get_memory_offset: memory_offset_t traceresult
34293436
3430- method get_memory_address_meminfo: (int * memory_offset_t * string option )
3437+ method get_memory_address_meminfo:
3438+ (int * memory_offset_t * string option * btype_t option )
34313439
34323440 (* * Returns the name of the associated function pointer.
34333441
@@ -3658,7 +3666,10 @@ object
36583666 -> assembly_variable_int
36593667
36603668 method make_global_memory_address :
3661- ?optname:string option -> numerical_t -> assembly_variable_int
3669+ ?optname:string option
3670+ -> ?opttype:btype_t option
3671+ -> numerical_t
3672+ -> assembly_variable_int
36623673
36633674 (* * {2 Auxiliary variables}*)
36643675
@@ -3820,7 +3831,7 @@ object
38203831 method is_memory_address_variable : variable_t -> bool
38213832
38223833 method get_memory_address_meminfo :
3823- variable_t -> (int * memory_offset_t * string option )
3834+ variable_t -> (int * memory_offset_t * string option * btype_t option )
38243835
38253836
38263837 (* * {2 Memory offsets} *)
@@ -4215,7 +4226,10 @@ class type function_environment_int =
42154226 ?size:int -> ?offset:memory_offset_t -> numerical_t -> variable_t
42164227
42174228 method mk_global_memory_address :
4218- ?optname: string option -> numerical_t -> variable_t
4229+ ?optname: string option
4230+ -> ?opttype: btype_t option
4231+ -> numerical_t
4232+ -> variable_t
42194233
42204234 method mk_initial_memory_value : variable_t -> variable_t
42214235
@@ -4243,7 +4257,10 @@ class type function_environment_int =
42434257 (* * {2 Memory address variables} *)
42444258
42454259 method mk_global_memory_address :
4246- ?optname: string option -> numerical_t -> variable_t
4260+ ?optname: string option
4261+ -> ?opttype: btype_t option
4262+ -> numerical_t
4263+ -> variable_t
42474264
42484265 (* * {2 Other variables} *)
42494266
@@ -5449,6 +5466,9 @@ class type floc_int =
54495466 (* returns the memory reference that corresponds to the address expression *)
54505467 method decompose_address : xpr_t -> (memory_reference_int * memory_offset_t)
54515468
5469+ method decompose_array_address :
5470+ xpr_t -> (memory_reference_int * memory_offset_t) option
5471+
54525472 (* returns the variable associated with the address expression *)
54535473 method get_lhs_from_address : xpr_t -> variable_t
54545474
0 commit comments