Type Definition bytecode::access_path::AbsAddr

source ·
pub type AbsAddr = SetDomain<Addr>;
Expand description

Abstraction of an address: non-empty set of constant or footprint address values

Implementations§

source§

impl AbsAddr

source

pub fn constant(a: BigUint) -> Self

Create a constant address from concrete address a

source

pub fn footprint(ap: AccessPath) -> Self

Create a footprint address from access path ap

source

pub fn formal(formal_index: TempIndex, func_env: &FunctionEnv<'_>) -> Self

Create a footprint address read from formal temp_index

source

pub fn is_constant(&self) -> bool

Return true if self is a constant

source

pub fn is_statically_known(&self) -> bool

Return true if self consists only of statically known constants

source

pub fn substitute_footprint( &mut self, actuals: &[TempIndex], type_actuals: &[Type], func_env: &FunctionEnv<'_>, sub_map: &dyn AccessPathMap<AbsAddr> )

Substitute all occurences of Footprint(ap) in self by resolving the accesss path ap in sub_map

source

pub fn add_struct_offset( self, mid: &ModuleId, sid: StructId, types: Vec<Type> ) -> Self

Return a new abstract address by adding the offset mid::sid<types> to each element of self

source

pub fn add_offset(&self, offset: Offset) -> Self

Return a new abstract address by adding the offset offset to each element of self

source

pub fn prepend(self, prefix: AccessPath) -> Self

Produce a new version of self with prefix prepended to each footprint value

source

pub fn footprint_paths(&self) -> impl Iterator<Item = &AccessPath>

return an iterator over the footprint paths in self

source

pub fn get_concrete_addresses(&self) -> Vec<AccountAddress>

Return an iterator over the concrete addresses in self

source

pub fn display<'a>(&'a self, env: &'a FunctionEnv<'_>) -> AbsAddrDisplay<'a>

Return a wrapper of self that implements Display using env

Trait Implementations§

source§

impl FootprintDomain for AbsAddr

source§

fn make_footprint(ap: AccessPath) -> Option<Self>

Create a footprint value for access path ap
source§

impl From<&AccountAddress> for AbsAddr

source§

fn from(addr: &AccountAddress) -> Self

Converts to this type from the input type.