pub struct State<V>(StateData<V>);
Expand description

The dataflow state for an instance of ValueAnalysis.

Every instance specifies a lattice that represents the possible values of a single tracked place. If we call this lattice V and set of tracked places P, then a State is an element of {unreachable} ∪ (P -> V). This again forms a lattice, where the bottom element is unreachable and the top element is the mapping p ↦ ⊤. Note that the mapping p ↦ ⊥ is not the bottom element (because joining an unreachable and any other reachable state yields a reachable state). All operations on unreachable states are ignored.

Flooding means assigning a value (by default ) to all tracked projections of a given place.

Tuple Fields§

§0: StateData<V>

Implementations§

Copies source to target, including all tracked places beneath.

If target contains a place that is not contained in source, it will be overwritten with Top. Also, because this will copy all entries one after another, it may only be used for places that are non-overlapping or identical.

Retrieve the value stored for a place, or ⊤ if it is not tracked.

Retrieve the value stored for a place index, or ⊤ if it is not tracked.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

This is used to visualize the dataflow analysis.

Print the difference between self and old. Read more
Computes the least upper bound of two elements, storing the result in self and returning true if self has changed. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 24 bytes