pub struct ProgramDescription {
    pub controllers: ControllerMap,
    pub type_info: TypeInfoMap,
    pub instruction_info: HashMap<GlobalLocation, InstructionInfo>,
    pub def_info: HashMap<DefId, DefInfo>,
    pub marker_annotation_count: u32,
    pub rustc_time: Duration,
    pub dedup_functions: u32,
    pub dedup_locs: u32,
    pub seen_functions: u32,
    pub seen_locs: u32,
    /* private fields */
}
Expand description

The annotated program dependence graph.

Fields§

§controllers: ControllerMap

Entry points we analyzed and their PDGs

§type_info: TypeInfoMap

Metadata about types

§instruction_info: HashMap<GlobalLocation, InstructionInfo>

Metadata about the instructions that are executed at all program locations we know about.

§def_info: HashMap<DefId, DefInfo>

Metadata about the DefIds

§marker_annotation_count: u32

How many marker annotations were found

§rustc_time: Duration

How long rustc ran before out plugin executed

§dedup_functions: u32

The number of functions we produced a PDG for

§dedup_locs: u32

The lines of code corresponding to the functions from Self::dedup_functions.

§seen_functions: u32

The number of functions we produced PDGs for or we inspected to check for markers.

§seen_locs: u32

The lines of code corresponding to the functions from Self::seen_functions. This is the sum of all analyzed_locs of the controllers but deduplicated.

Implementations§

source§

impl ProgramDescription

source

pub fn canonical_write(&self, path: impl AsRef<Path>) -> Result<()>

Write self using the configured serialization format

source

pub fn canonical_read(path: impl AsRef<Path>) -> Result<Self>

Read self using the configured serialization format

source§

impl ProgramDescription

source

pub fn all_nodes(&self) -> HashSet<GlobalNode>

Gather all data sources that are mentioned in this program description.

Essentially just self.controllers.flat_map(|c| c.keys())

source

pub fn all_call_sites(&self) -> HashSet<CallString>

Gather all CallStrings that are mentioned in this program description.

Trait Implementations§

source§

impl Debug for ProgramDescription

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ProgramDescription

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ProgramDescription

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,