HilExp.AccessExpression
val of_id : IR.Ident.t -> IR.Typ.t -> access_expression
val base : AccessPath.base -> access_expression
val field_offset : access_expression -> IR.Fieldname.t -> access_expression
val array_offset :
access_expression ->
IR.Typ.t ->
t option ->
access_expression
val address_of : access_expression -> access_expression option
address_of doesn't always make sense, eg address_of (Dereference t)
is None
val address_of_base : AccessPath.base -> access_expression
val to_access_path : access_expression -> AccessPath.t
val get_base : access_expression -> AccessPath.base
val replace_base :
remove_deref_after_base:bool ->
AccessPath.base ->
access_expression ->
access_expression
val is_return_var : access_expression -> bool
val get_typ : access_expression -> IR.Tenv.t -> IR.Typ.t option
val pp : Stdlib.Format.formatter -> access_expression -> unit
val equal : access_expression -> access_expression -> bool
val to_accesses :
access_expression ->
access_expression * t option MemoryAccess.t list
return the base and a list of accesses equivalent to the input expression
val add_access :
access_expression ->
t option MemoryAccess.t ->
access_expression option
val truncate :
access_expression ->
(access_expression * t option MemoryAccess.t) option
remove and return the prefix and the last access of the expression if it's a base; otherwise return None
val append :
onto:access_expression ->
access_expression ->
access_expression option
append ~onto y
replaces the base of y
with onto
itself; this makes sense if no Dereference (AddressOf _)
instances are introduced
type nonrec t = private access_expression =
| Base of AccessPath.base
| FieldOffset of access_expression * IR.Fieldname.t
| ArrayOffset of access_expression * IR.Typ.t * t option
| AddressOf of access_expression
| Dereference of access_expression
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare