Module 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 dereference : access_expression -> access_expression
guarantees that we never build
Dereference (AddressOf t)
expressions: these becomet
val address_of : access_expression -> access_expression option
address_of doesn't always make sense, eg
address_of (Dereference t)
isNone
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_base : access_expression -> bool
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 Access.t list
return the base and a list of accesses equivalent to the input expression
val add_access : access_expression -> t option Access.t -> access_expression option
val truncate : access_expression -> (access_expression * t option Access.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 ofy
withonto
itself; this makes sense if noDereference (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
val fold_vars : (t, IR.Var.t, 'accum) IStdlib.IStd.Container.fold