pub trait AnalysisDomain<'tcx> {
    type Domain: Clone + JoinSemiLattice;
    type Direction: Direction = Forward;

    const NAME: &'static str;

    fn bottom_value(&self, body: &Body<'tcx>) -> Self::Domain;
    fn initialize_start_block(
        &self,
        body: &Body<'tcx>,
        state: &mut Self::Domain
    ); }
Expand description

Define the domain of a dataflow problem.

This trait specifies the lattice on which this analysis operates (the domain) as well as its initial value at the entry point of each basic block.

Required Associated Types

The type that holds the dataflow state at any given point in the program.

Provided Associated Types

The direction of this analysis. Either Forward or Backward.

Required Associated Constants

A descriptive name for this analysis. Used only for debugging.

This name should be brief and contain no spaces, periods or other characters that are not suitable as part of a filename.

Required Methods

The initial value of the dataflow state upon entry to each basic block.

Mutates the initial value of the dataflow state upon entry to the START_BLOCK.

For backward analyses, initial state besides the bottom value is not yet supported. Trying to mutate the initial state will result in a panic.

Implementors