pub trait AnalysisDomain<'tcx> {
type Domain: Clone + JoinSemiLattice;
type Direction: Direction = Forward;
const NAME: &'static str;
// Required methods
fn bottom_value(&self, body: &Body<'tcx>) -> Self::Domain;
fn initialize_start_block(
&self,
body: &Body<'tcx>,
state: &mut Self::Domain,
);
}
Expand description
Defines 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 Constants§
Required Associated Types§
sourcetype Domain: Clone + JoinSemiLattice
type Domain: Clone + JoinSemiLattice
The type that holds the dataflow state at any given point in the program.
Provided Associated Types§
Required Methods§
sourcefn bottom_value(&self, body: &Body<'tcx>) -> Self::Domain
fn bottom_value(&self, body: &Body<'tcx>) -> Self::Domain
Returns the initial value of the dataflow state upon entry to each basic block.
sourcefn initialize_start_block(&self, body: &Body<'tcx>, state: &mut Self::Domain)
fn initialize_start_block(&self, body: &Body<'tcx>, state: &mut Self::Domain)
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.
Object Safety§
This trait is not object safe.