[][src]Struct gf::ai::executor::FixpointExecutorState

pub struct FixpointExecutorState<'a, D, I> where
    D: Direction,
    I: Interp<'a, D>,
    I::State: Meet
{ /* fields omitted */ }

🟢 State of a FixpointExecutor.

This structure maintains head and tail state for basic blocks. For forward interpretation, head means start of a basic block, and tail its end. For backward interpretation, the meanings are reversed.

Implementations

impl<'a, D, I> FixpointExecutorState<'a, D, I> where
    D: Direction,
    I: Interp<'a, D>,
    I::State: Meet
[src]

pub fn new(fragment_cfg: FragmentCfg<'a, D>) -> Self[src]

Create a fixpoint executor state for a fragment where all head and tail states are initially set to ⊤.

pub fn with_head_state(
    fragment_cfg: FragmentCfg<'a, D>,
    head_state: I::State
) -> Self
[src]

Create a fixpoint executor state for a fragment with given head state, while initializing all other basic block states to ⊤.

pub fn fragment(&self) -> Fragment<'a>[src]

Return the fragment.

pub fn fragment_cfg(&self) -> FragmentCfg<'a, D>[src]

Return the fragment CFG.

pub fn head_interp_state(&self, basic_block: BasicBlock<'a>) -> &I::State[src]

Return head interpretation state of basic_block.

pub fn set_head_interp_state_meet(
    &mut self,
    basic_block: BasicBlock<'a>,
    state: &I::State
) -> bool
[src]

Set head interpretation state of basic_block by applying the meet operation.

Returns true iff the state has changed.

pub fn tail_interp_state(&self, basic_block: BasicBlock<'a>) -> &I::State[src]

Return tail interpretation state of basic_block.

pub fn set_tail_interp_state_meet(
    &mut self,
    basic_block: BasicBlock<'a>,
    state: &I::State
) -> bool
[src]

Set tail interpretation state of basic_block by applying the meet operation.

Returns true iff the state has changed.

pub fn fragment_head_interp_state(&self) -> &I::State[src]

Return head interpretation state of the entire fragment.

pub fn fragment_tail_interp_state(&self) -> &I::State[src]

Return tail interpretation state of the entire fragment.

pub fn initial_queue(&self) -> VecDeque<PathExecutorState<'a, D, I>>[src]

Return the initial worklist queue, which is the reverse postorder of head states for all basic blocks of the fragment.

Trait Implementations

impl<'a, D: Clone, I: Clone> Clone for FixpointExecutorState<'a, D, I> where
    D: Direction,
    I: Interp<'a, D>,
    I::State: Meet,
    I::State: Clone,
    I::State: Clone
[src]

Auto Trait Implementations

impl<'a, D, I> RefUnwindSafe for FixpointExecutorState<'a, D, I> where
    D: RefUnwindSafe,
    <I as Interp<'a, D>>::State: RefUnwindSafe

impl<'a, D, I> Send for FixpointExecutorState<'a, D, I> where
    D: Sync,
    <I as Interp<'a, D>>::State: Send

impl<'a, D, I> Sync for FixpointExecutorState<'a, D, I> where
    D: Sync,
    <I as Interp<'a, D>>::State: Sync

impl<'a, D, I> Unpin for FixpointExecutorState<'a, D, I> where
    <I as Interp<'a, D>>::State: Unpin

impl<'a, D, I> UnwindSafe for FixpointExecutorState<'a, D, I> where
    D: RefUnwindSafe,
    <I as Interp<'a, D>>::State: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.