Module IR.AccessPath

type base = Var.t * Typ.t
val compare_base : base -> base -> int
type access =
| ArrayAccess of Typ.t * t list

array element type with list of access paths in index

| FieldAccess of Fieldname.t

field name

and t = base * access list

root var, and a list of accesses. closest to the root var is first that is, x.f.g is represented as (x, f; g)

val compare_access : access -> access -> int
val compare : t -> t -> int
val equal_access : access -> access -> bool
val equal : t -> t -> bool
val compare_access : access -> access -> int
val compare : t -> t -> int
val get_typ : t -> Tenv.t -> Typ.t option

get the typ of the last access in the list of accesses if the list is non-empty, or the base if the list is empty. that is, for x.f.g, return typ(g), and for x, return typ(x)

val base_of_pvar : Pvar.t -> Typ.t -> base

create a base from a pvar

val of_pvar : Pvar.t -> Typ.t -> t

create an access path from a pvar

val of_id : Ident.t -> Typ.t -> t

create an access path from an ident

val of_var : Var.t -> Typ.t -> t

create an access path from a var

val append : t -> access list -> t

append new accesses to an existing access path; e.g., `append_access x.f g, h` produces `x.f.g.h`

val equal_base : base -> base -> bool
val pp : Stdlib.Format.formatter -> t -> unit
val pp_base : Stdlib.Format.formatter -> base -> unit
val pp_access : Stdlib.Format.formatter -> access -> unit
module Abs : sig ... end
module BaseMap : IStdlib.PrettyPrintable.PPMap with type PPMap.key = base